diff --git a/Model/Player/PlayerModel.swift b/Model/Player/PlayerModel.swift index d03d9ca7..1fe3923e 100644 --- a/Model/Player/PlayerModel.swift +++ b/Model/Player/PlayerModel.swift @@ -159,7 +159,7 @@ final class PlayerModel: ObservableObject { } var videoDuration: TimeInterval? { - currentItem?.duration ?? currentVideo?.length + currentItem?.duration ?? currentVideo?.length ?? player.currentItem?.asset.duration.seconds } func togglePlay() { diff --git a/Shared/Views/PlayerControlsView.swift b/Shared/Views/PlayerControlsView.swift index 1b7ec644..b006bac1 100644 --- a/Shared/Views/PlayerControlsView.swift +++ b/Shared/Views/PlayerControlsView.swift @@ -132,7 +132,7 @@ struct PlayerControlsView: View { } private var progressViewTotal: Double { - model.playerItemDuration?.seconds ?? model.currentVideo?.length ?? 100 + model.videoDuration ?? 100 } }