Fix Video Player Tracks (#1176)

* fix and clean

* Update VideoPlayer.swift

* linting mishap
This commit is contained in:
Ethan Pippin 2024-08-08 22:23:48 -06:00 committed by GitHub
parent e89eaeec09
commit f2f8f8be14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 1 deletions

View File

@ -113,7 +113,7 @@ struct VideoPlayer: View {
ZStack {
VLCVideoPlayer(configuration: videoPlayerManager.currentViewModel.vlcVideoPlayerConfiguration)
.proxy(videoPlayerManager.proxy)
.onTicksUpdated { ticks, _ in
.onTicksUpdated { ticks, information in
let newSeconds = ticks / 1000
let newProgress = CGFloat(newSeconds) / CGFloat(videoPlayerManager.currentViewModel.item.runTimeSeconds)
@ -122,6 +122,11 @@ struct VideoPlayer: View {
guard !isScrubbing else { return }
currentProgressHandler.scrubbedProgress = newProgress
videoPlayerManager.onTicksUpdated(
ticks: ticks,
playbackInformation: information
)
}
.onStateUpdated { state, _ in