WIP
This commit is contained in:
@@ -65,20 +65,8 @@ struct ExternalWorkoutDetailView: View {
|
||||
}
|
||||
}
|
||||
.onChange(of: bridgeModule.currentExercise, perform: { newValue in
|
||||
var _url: URL?
|
||||
if showNSFWVideos {
|
||||
if let viddd = newValue?.exercise.nsfwVideoURL,
|
||||
let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||
_url = url
|
||||
}
|
||||
} else {
|
||||
if let viddd = newValue?.exercise.videoURL,
|
||||
let url = URL(string: BaseURLs.currentBaseURL + viddd) {
|
||||
_url = url
|
||||
}
|
||||
}
|
||||
if let __url = _url {
|
||||
avPlayer = AVPlayer(url: __url)
|
||||
if let videoURL = newValue?.videoURL(nsfw: showNSFWVideos) {
|
||||
avPlayer = AVPlayer(url: videoURL)
|
||||
avPlayer.play()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user