diff --git a/Dreamio/VLCNativePlaybackBackend.swift b/Dreamio/VLCNativePlaybackBackend.swift index 0fa779a..128042f 100644 --- a/Dreamio/VLCNativePlaybackBackend.swift +++ b/Dreamio/VLCNativePlaybackBackend.swift @@ -92,7 +92,8 @@ final class VLCNativePlaybackBackend: NSObject, NativePlaybackBackend { let cachingOptions = [ ":network-caching=\(Self.seekBufferMilliseconds)", ":http-caching=\(Self.seekBufferMilliseconds)", - ":file-caching=\(Self.seekBufferMilliseconds)" + ":file-caching=\(Self.seekBufferMilliseconds)", + ":live-caching=\(Self.seekBufferMilliseconds)" ] cachingOptions.forEach { media.addOption($0) } @@ -114,7 +115,11 @@ final class VLCNativePlaybackBackend: NSObject, NativePlaybackBackend { guard isSeekable else { return } - mediaPlayer.position = max(0, min(1, position)) + let nextPosition = max(0, min(1, position)) +#if DEBUG + print("[DreamioVLC] seek position from=\(mediaPlayer.position) to=\(nextPosition) currentTime=\(currentTime) duration=\(duration)") +#endif + mediaPlayer.position = nextPosition #endif } @@ -124,6 +129,9 @@ final class VLCNativePlaybackBackend: NSObject, NativePlaybackBackend { return } let nextTime = max(0, min(duration, currentTime + seconds)) +#if DEBUG + print("[DreamioVLC] jump seconds=\(seconds) from=\(currentTime) to=\(nextTime) duration=\(duration) seekBufferMilliseconds=\(Self.seekBufferMilliseconds)") +#endif mediaPlayer.time = VLCTime(int: Int32(nextTime * 1000)) #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 a5334da..988f0be 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 @@ -258,6 +258,42 @@ index c3c2318..0fa779a 100644
  • Consider a follow-up Beads issue only if device testing shows the 30-second cache should be adjusted or made configurable.
  • + +
    +

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

    +

    Summary of changes

    +

    After device testing showed VLC still reported state=buffering on 15-second skip actions, the native backend now also applies :live-caching with the same centralized 30-second value and prints DEBUG seek/jump telemetry.

    + +

    Why this change was made

    +

    Some VLC inputs can use the live/access cache path even when the app treats them as direct native streams. Adding :live-caching keeps the cache policy consistent across VLC's relevant access paths. The new logs help distinguish normal post-seek buffering from a longer restart-like stall.

    + +

    Code diffs

    +
    diff --git a/Dreamio/VLCNativePlaybackBackend.swift b/Dreamio/VLCNativePlaybackBackend.swift
    +@@
    +         let cachingOptions = [
    +             ":network-caching=\(Self.seekBufferMilliseconds)",
    +             ":http-caching=\(Self.seekBufferMilliseconds)",
    +-            ":file-caching=\(Self.seekBufferMilliseconds)"
    ++            ":file-caching=\(Self.seekBufferMilliseconds)",
    ++            ":live-caching=\(Self.seekBufferMilliseconds)"
    +         ]
    +@@
    +-        mediaPlayer.position = max(0, min(1, position))
    ++        let nextPosition = max(0, min(1, position))
    ++#if DEBUG
    ++        print("[DreamioVLC] seek position from=\(mediaPlayer.position) to=\(nextPosition) currentTime=\(currentTime) duration=\(duration)")
    ++#endif
    ++        mediaPlayer.position = nextPosition
    +@@
    +         let nextTime = max(0, min(duration, currentTime + seconds))
    ++#if DEBUG
    ++        print("[DreamioVLC] jump seconds=\(seconds) from=\(currentTime) to=\(nextTime) duration=\(duration) seekBufferMilliseconds=\(Self.seekBufferMilliseconds)")
    ++#endif
    +         mediaPlayer.time = VLCTime(int: Int32(nextTime * 1000))
    + +

    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.

    +