1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 22:00:31 +05:30

Fix player controls progress bar warning

This commit is contained in:
Arkadiusz Fal 2022-01-06 17:47:07 +01:00
parent 792db567ed
commit f29dc792c2
2 changed files with 2 additions and 2 deletions

View File

@ -159,7 +159,7 @@ final class PlayerModel: ObservableObject {
} }
var videoDuration: TimeInterval? { var videoDuration: TimeInterval? {
currentItem?.duration ?? currentVideo?.length currentItem?.duration ?? currentVideo?.length ?? player.currentItem?.asset.duration.seconds
} }
func togglePlay() { func togglePlay() {

View File

@ -132,7 +132,7 @@ struct PlayerControlsView<Content: View>: View {
} }
private var progressViewTotal: Double { private var progressViewTotal: Double {
model.playerItemDuration?.seconds ?? model.currentVideo?.length ?? 100 model.videoDuration ?? 100
} }
} }