WIP
This commit is contained in:
@@ -130,9 +130,12 @@ struct VideoPlayerView: View {
|
||||
var body: some View {
|
||||
VideoPlayer(player: player)
|
||||
.onAppear{
|
||||
player = AVPlayer(url: Bundle.main.url(forResource: "Straight_Leg_Sit_Up", withExtension: "mp4")!)
|
||||
let url = URL(string: BaseURLs.dev.rawValue + currentExercise.videoURL)!
|
||||
player = AVPlayer(url: url)
|
||||
}
|
||||
.onAppear{
|
||||
player.play()
|
||||
|
||||
|
||||
NotificationCenter.default.addObserver(forName: .AVPlayerItemDidPlayToEndTime, object: nil, queue: .main) { _ in
|
||||
player.seek(to: .zero)
|
||||
player.play()
|
||||
|
||||
Reference in New Issue
Block a user