VLCUI
VLCUI copied to clipboard
Add skipInitialTimeSet to prevent seeking on live streams
Summary
- Adds
skipInitialTimeSet: Boolproperty toConfiguration(defaultfalse, no breaking changes) - When
true,setConfigurationValuesskips theplayer.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:
- VLC connects at the live edge correctly
setConfigurationValuesseeks to position 0 (start of timeshift buffer)- VLC flushes buffers and re-acquires segments, causing 3+ minute rebuffer
- 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 = truestarts at live edge without rebuffering - [ ] Verify VOD playback with
skipInitialTimeSet = false(default) behaves unchanged - [ ] Verify VOD playback with explicit
startTimestill seeks correctly
🤖 Generated with Claude Code