From 336f660bdc91cceb16a3209d6f83b1d41f795395 Mon Sep 17 00:00:00 2001 From: dirtydishes Date: Mon, 25 May 2026 15:25:33 -0400 Subject: [PATCH] use vlc relative jumps for native skips --- Dreamio/VLCNativePlaybackBackend.swift | 9 ++++-- ...05-25-add-native-playback-seek-buffer.html | 29 +++++++++++++++++++ 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/Dreamio/VLCNativePlaybackBackend.swift b/Dreamio/VLCNativePlaybackBackend.swift index 128042f..8ff8bc4 100644 --- a/Dreamio/VLCNativePlaybackBackend.swift +++ b/Dreamio/VLCNativePlaybackBackend.swift @@ -93,7 +93,8 @@ final class VLCNativePlaybackBackend: NSObject, NativePlaybackBackend { ":network-caching=\(Self.seekBufferMilliseconds)", ":http-caching=\(Self.seekBufferMilliseconds)", ":file-caching=\(Self.seekBufferMilliseconds)", - ":live-caching=\(Self.seekBufferMilliseconds)" + ":live-caching=\(Self.seekBufferMilliseconds)", + ":input-fast-seek" ] cachingOptions.forEach { media.addOption($0) } @@ -132,7 +133,11 @@ final class VLCNativePlaybackBackend: NSObject, NativePlaybackBackend { #if DEBUG print("[DreamioVLC] jump seconds=\(seconds) from=\(currentTime) to=\(nextTime) duration=\(duration) seekBufferMilliseconds=\(Self.seekBufferMilliseconds)") #endif - mediaPlayer.time = VLCTime(int: Int32(nextTime * 1000)) + if seconds > 0 { + mediaPlayer.jumpForward(Int32(seconds.rounded())) + } else if seconds < 0 { + mediaPlayer.jumpBackward(Int32(abs(seconds).rounded())) + } #endif } diff --git a/docs/turns/2026-05-25-add-native-playback-seek-buffer.html b/docs/turns/2026-05-25-add-native-playback-seek-buffer.html index 988f0be..8c13700 100644 --- a/docs/turns/2026-05-25-add-native-playback-seek-buffer.html +++ b/docs/turns/2026-05-25-add-native-playback-seek-buffer.html @@ -294,6 +294,35 @@ index c3c2318..0fa779a 100644

Related issues or PRs

Related Beads issue: dreamio-3yb. No new Beads issue was opened because this is a direct tuning update to the same native seek-buffer task.

+ +
+

New Changes as of 2026-05-25 15:25 EDT

+

Summary of changes

+

After real-device logs showed native 15-second jumps staying in repeated VLC buffering states, the relative skip buttons now use MobileVLCKit's native jumpForward and jumpBackward APIs instead of assigning an absolute VLCTime. The media options also include :input-fast-seek.

+ +

Why this change was made

+

The 15-second buttons are relative jumps, so using VLC's relative jump API gives libVLC the clearest signal for that action. The scrubber still uses position-based seeking, preserving precise absolute seek behavior for drag interactions.

+ +

Code diffs

+
diff --git a/Dreamio/VLCNativePlaybackBackend.swift b/Dreamio/VLCNativePlaybackBackend.swift
+@@
+             ":http-caching=\(Self.seekBufferMilliseconds)",
+             ":file-caching=\(Self.seekBufferMilliseconds)",
+-            ":live-caching=\(Self.seekBufferMilliseconds)"
++            ":live-caching=\(Self.seekBufferMilliseconds)",
++            ":input-fast-seek"
+         ]
+@@
+-        mediaPlayer.time = VLCTime(int: Int32(nextTime * 1000))
++        if seconds > 0 {
++            mediaPlayer.jumpForward(Int32(seconds.rounded()))
++        } else if seconds < 0 {
++            mediaPlayer.jumpBackward(Int32(abs(seconds).rounded()))
++        }
+ +

Related issues or PRs

+

Related Beads issue: dreamio-3yb. This remains part of the same native seek-buffer tuning task.

+