mirror of
https://github.com/dirtydishes/dreamio.git
synced 2026-06-06 13:37:24 +00:00
seek native skips by position
This commit is contained in:
parent
336f660bdc
commit
772f915b74
2 changed files with 30 additions and 4 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue