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:
parent
792db567ed
commit
f29dc792c2
@ -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() {
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user