seek native skips by position

This commit is contained in:
dirtydishes 2026-05-25 15:50:17 -04:00
parent 336f660bdc
commit 772f915b74
2 changed files with 30 additions and 4 deletions

View file

@ -133,11 +133,11 @@ final class VLCNativePlaybackBackend: NSObject, NativePlaybackBackend {
#if DEBUG
print("[DreamioVLC] jump seconds=\(seconds) from=\(currentTime) to=\(nextTime) duration=\(duration) seekBufferMilliseconds=\(Self.seekBufferMilliseconds)")
#endif
if seconds > 0 {
mediaPlayer.jumpForward(Int32(seconds.rounded()))
} else if seconds < 0 {
mediaPlayer.jumpBackward(Int32(abs(seconds).rounded()))
guard duration > 0 else {
return
}
mediaPlayer.position = Float(nextTime / duration)
mediaPlayer.play()
#endif
}