Fix Video Player Tracks (#1176)
* fix and clean * Update VideoPlayer.swift * linting mishap
This commit is contained in:
parent
e89eaeec09
commit
f2f8f8be14
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue