From f2f8f8be1406b76db1fa1a4849b2473842a13a26 Mon Sep 17 00:00:00 2001 From: Ethan Pippin Date: Thu, 8 Aug 2024 22:23:48 -0600 Subject: [PATCH] Fix Video Player Tracks (#1176) * fix and clean * Update VideoPlayer.swift * linting mishap --- Swiftfin/Views/VideoPlayer/VideoPlayer.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Swiftfin/Views/VideoPlayer/VideoPlayer.swift b/Swiftfin/Views/VideoPlayer/VideoPlayer.swift index d2363121..04692272 100644 --- a/Swiftfin/Views/VideoPlayer/VideoPlayer.swift +++ b/Swiftfin/Views/VideoPlayer/VideoPlayer.swift @@ -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