show next up video
This commit is contained in:
@@ -13,7 +13,7 @@ struct ExternalWorkoutDetailView: View {
|
||||
@State var avPlayer = AVPlayer(url: URL(string: "https://dev.werkout.fitness/media/exercise_videos/2_Dumbbell_Lateral_Lunges.mp4")!)
|
||||
@State var smallAVPlayer = AVPlayer(url: URL(string: "https://dev.werkout.fitness/media/exercise_videos/2_Dumbbell_Lateral_Lunges.mp4")!)
|
||||
@AppStorage(Constants.extThotStyle) private var extThotStyle: ThotStyle = .never
|
||||
@AppStorage(Constants.extShowBothVideos) private var extShowBothVideos: Bool = false
|
||||
@AppStorage(Constants.extShowNextVideo) private var extShowNextVideo: Bool = false
|
||||
@AppStorage(Constants.thotGenderOption) private var thotGenderOption: String = "female"
|
||||
|
||||
var body: some View {
|
||||
@@ -47,7 +47,7 @@ struct ExternalWorkoutDetailView: View {
|
||||
}
|
||||
|
||||
HStack {
|
||||
if extShowBothVideos && extThotStyle != .off {
|
||||
if extShowNextVideo && extThotStyle != .off {
|
||||
ExtCountdownView()
|
||||
.frame(width: metrics.size.width * 0.8, height: metrics.size.height * 0.2)
|
||||
.padding(.leading, 50)
|
||||
@@ -85,7 +85,7 @@ struct ExternalWorkoutDetailView: View {
|
||||
avPlayer = AVPlayer(url: videoURL)
|
||||
avPlayer.play()
|
||||
|
||||
if extShowBothVideos {
|
||||
if extShowNextVideo {
|
||||
if let smallVideoURL = VideoURLCreator.videoURL(
|
||||
thotStyle: VideoURLCreator.otherVideoType(forVideoURL: videoURL),
|
||||
gender: thotGenderOption,
|
||||
@@ -110,12 +110,12 @@ struct ExternalWorkoutDetailView: View {
|
||||
avPlayer = AVPlayer(url: videoURL)
|
||||
avPlayer.play()
|
||||
|
||||
if extShowBothVideos {
|
||||
if extShowNextVideo {
|
||||
if let smallVideoURL = VideoURLCreator.videoURL(
|
||||
thotStyle: VideoURLCreator.otherVideoType(forVideoURL: videoURL),
|
||||
thotStyle: .never,
|
||||
gender: thotGenderOption,
|
||||
defaultVideoURLStr: currentExtercise.exercise.videoURL,
|
||||
exerciseName: currentExtercise.exercise.name,
|
||||
defaultVideoURLStr: BridgeModule.shared.currentExerciseInfo.nextExerciseInfo?.exercise.videoURL,
|
||||
exerciseName: BridgeModule.shared.currentExerciseInfo.nextExerciseInfo?.exercise.name,
|
||||
workout: bridgeModule.currentExerciseInfo.workout) {
|
||||
smallAVPlayer = AVPlayer(url: smallVideoURL)
|
||||
smallAVPlayer.play()
|
||||
|
||||
Reference in New Issue
Block a user