WIP
This commit is contained in:
@@ -13,18 +13,12 @@ struct ExerciseListView: View {
|
||||
@ObservedObject var bridgeModule = BridgeModule.shared
|
||||
var workout: Workout
|
||||
@State var avPlayer = AVPlayer(url: URL(string: "https://dev.werkout.fitness/media/exercise_videos/2_Dumbbell_Lateral_Lunges.mp4")!)
|
||||
|
||||
@State var videoExercise: ExerciseExercise? {
|
||||
didSet {
|
||||
if showNSFWVideos {
|
||||
if let viddd = self.videoExercise?.nsfwVideoURL,
|
||||
let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||
avPlayer = AVPlayer(url: url)
|
||||
}
|
||||
} else {
|
||||
if let viddd = self.videoExercise?.videoURL,
|
||||
let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||
avPlayer = AVPlayer(url: url)
|
||||
}
|
||||
if let videoURL = self.videoExercise?.videoURL(nsfw: showNSFWVideos) {
|
||||
avPlayer = AVPlayer(url: videoURL)
|
||||
avPlayer.play()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user