mirror of
https://github.com/yattee/yattee.git
synced 2024-12-22 13:33:42 +00:00
Fix player controls progress bar warning
This commit is contained in:
parent
792db567ed
commit
f29dc792c2
@ -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() {
|
||||
|
@ -132,7 +132,7 @@ struct PlayerControlsView<Content: View>: View {
|
||||
}
|
||||
|
||||
private var progressViewTotal: Double {
|
||||
model.playerItemDuration?.seconds ?? model.currentVideo?.length ?? 100
|
||||
model.videoDuration ?? 100
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user