VLCUI icon indicating copy to clipboard operation
VLCUI copied to clipboard

Add skipInitialTimeSet to prevent seeking on live streams

Open jaumecornado opened this issue 9 months ago • 0 comments

Summary

  • Adds skipInitialTimeSet: Bool property to Configuration (default false, no breaking changes)
  • When true, setConfigurationValues skips the player.time = assignment, preventing VLC from seeking away from the live edge on live HLS streams
  • All other configuration values (rate, subtitles, audio, aspect fill) still apply normally

Fixes #26

Problem

setConfigurationValues unconditionally sets player.time = startTime (default .ticks(0)) the first time playback advances. For live HLS streams with timeshift buffers, this causes:

  1. VLC connects at the live edge correctly
  2. setConfigurationValues seeks to position 0 (start of timeshift buffer)
  3. VLC flushes buffers and re-acquires segments, causing 3+ minute rebuffer
  4. Playback resumes hours behind real-time

Even setting startTime to the current position causes VLC to flush buffers and rebuffer, because any player.time = X call triggers a seek in VLCKit.

Test plan

  • [ ] Verify live HLS stream with skipInitialTimeSet = true starts at live edge without rebuffering
  • [ ] Verify VOD playback with skipInitialTimeSet = false (default) behaves unchanged
  • [ ] Verify VOD playback with explicit startTime still seeks correctly

🤖 Generated with Claude Code

jaumecornado avatar Feb 10 '26 22:02 jaumecornado