BlueGit

timfa filemanager

Document periodic subtitle resync

Updates the technical reference with the new periodic subtitle drift correction behaviour and refreshes the generated test index so repository metadata remains current.

timfa Tim Falken · pushed by timfa

Authored 2026-05-29 · 5 months ago

Hash
dd6b1b29d638dafdbaa0271b6e9b390a5b2cc0fa
Parent
275f660d
1 file changed +1 −0
.github/technical-reference.md +1 −0
@@ -217,6 +217,7 @@
217 217 - bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Double-buffering for smooth rapid-transition captions: maintains two image buffers (primary/secondary), pre-loads next caption on secondary while displaying current on primary, swaps smoothly when transition occurs to eliminate flicker when captions appear in quick succession; tracks which frame is loaded in each buffer (`primaryBufferIndex`, `primaryFrameKey`, `secondaryFrameKey`) so the sync loop can detect pre-loaded frames and swap immediately without re-rendering.
218 218 - bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Playback clock sync now prefers `HTMLVideoElement.requestVideoFrameCallback` media-time metadata (fallback: raf/timeout + `player.currentTime()`), and proactively pre-warms the secondary buffer with the next cached frame after the current media time to reduce late/missed transitions when captions are densely packed.
219 219 - bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Cue-boundary scheduler now sets a follow-up timer to the next subtitle start/end boundary, so dense captions stay accurate even when the display loop misses an intermediate frame; seeked and ratechange events force an immediate resync so pause/jump actions still snap to the correct cached caption.
220 - bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Periodic drift resync now runs on a configurable interval (`periodicResyncIntervalMs`, default 10s) while playing; if a caption is currently visible, resync is deferred and automatically executed after the caption ends so long sessions recover from transient startup/playback stutter without mid-caption disruption.
220 221 - bindStreamAheadPrefetch(opts) - Starts a background HLS walker that repeatedly fetches the session playlist, discovers variant playlists and media segments, and prefetches those assets into the browser cache so playback can read already-fetched segments while the backend prunes old files; tracks cached-through timeline progress (primary from playlist segment durations, with filename-based segment-index fallback for `.ts/.m4s` naming and a section-ratio fallback from fetched segments/total discovered segments when absolute timing metadata is missing) and returns a controller with stop()/done()/getStatus()/subscribe().
221 222 - bindStreamAheadSeekMarker(player, streamAheadPrefetch, opts) - Renders a non-interactive `:` marker on the playback seek bar showing how far the stream-ahead walker has cached through the timeline; subscribes to walker progress updates, updates tooltip text with formatted cached-through time, and removes itself on detach.
222 223 - enableVideoStreamClientCache() - Registers a shared service worker (`/stream-cache-sw.js`) that caches HLS playlist/segment responses so already-downloaded stream assets remain playable on rewind after server-side segment pruning.
@@ -217,6 +217,7 @@
217- bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Double-buffering for smooth rapid-transition captions: maintains two image buffers (primary/secondary), pre-loads next caption on secondary while displaying current on primary, swaps smoothly when transition occurs to eliminate flicker when captions appear in quick succession; tracks which frame is loaded in each buffer (`primaryBufferIndex`, `primaryFrameKey`, `secondaryFrameKey`) so the sync loop can detect pre-loaded frames and swap immediately without re-rendering.
217- bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Double-buffering for smooth rapid-transition captions: maintains two image buffers (primary/secondary), pre-loads next caption on secondary while displaying current on primary, swaps smoothly when transition occurs to eliminate flicker when captions appear in quick succession; tracks which frame is loaded in each buffer (`primaryBufferIndex`, `primaryFrameKey`, `secondaryFrameKey`) so the sync loop can detect pre-loaded frames and swap immediately without re-rendering.
218- bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Playback clock sync now prefers `HTMLVideoElement.requestVideoFrameCallback` media-time metadata (fallback: raf/timeout + `player.currentTime()`), and proactively pre-warms the secondary buffer with the next cached frame after the current media time to reduce late/missed transitions when captions are densely packed.
218- bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Playback clock sync now prefers `HTMLVideoElement.requestVideoFrameCallback` media-time metadata (fallback: raf/timeout + `player.currentTime()`), and proactively pre-warms the secondary buffer with the next cached frame after the current media time to reduce late/missed transitions when captions are densely packed.
219- bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Cue-boundary scheduler now sets a follow-up timer to the next subtitle start/end boundary, so dense captions stay accurate even when the display loop misses an intermediate frame; seeked and ratechange events force an immediate resync so pause/jump actions still snap to the correct cached caption.
219- bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Cue-boundary scheduler now sets a follow-up timer to the next subtitle start/end boundary, so dense captions stay accurate even when the display loop misses an intermediate frame; seeked and ratechange events force an immediate resync so pause/jump actions still snap to the correct cached caption.
220- bindImageSubtitleOverlay(player, videojs, prefs, session, opts) - Periodic drift resync now runs on a configurable interval (`periodicResyncIntervalMs`, default 10s) while playing; if a caption is currently visible, resync is deferred and automatically executed after the caption ends so long sessions recover from transient startup/playback stutter without mid-caption disruption.
220- bindStreamAheadPrefetch(opts) - Starts a background HLS walker that repeatedly fetches the session playlist, discovers variant playlists and media segments, and prefetches those assets into the browser cache so playback can read already-fetched segments while the backend prunes old files; tracks cached-through timeline progress (primary from playlist segment durations, with filename-based segment-index fallback for `.ts/.m4s` naming and a section-ratio fallback from fetched segments/total discovered segments when absolute timing metadata is missing) and returns a controller with stop()/done()/getStatus()/subscribe().
221- bindStreamAheadPrefetch(opts) - Starts a background HLS walker that repeatedly fetches the session playlist, discovers variant playlists and media segments, and prefetches those assets into the browser cache so playback can read already-fetched segments while the backend prunes old files; tracks cached-through timeline progress (primary from playlist segment durations, with filename-based segment-index fallback for `.ts/.m4s` naming and a section-ratio fallback from fetched segments/total discovered segments when absolute timing metadata is missing) and returns a controller with stop()/done()/getStatus()/subscribe().
221- bindStreamAheadSeekMarker(player, streamAheadPrefetch, opts) - Renders a non-interactive `:` marker on the playback seek bar showing how far the stream-ahead walker has cached through the timeline; subscribes to walker progress updates, updates tooltip text with formatted cached-through time, and removes itself on detach.
222- bindStreamAheadSeekMarker(player, streamAheadPrefetch, opts) - Renders a non-interactive `:` marker on the playback seek bar showing how far the stream-ahead walker has cached through the timeline; subscribes to walker progress updates, updates tooltip text with formatted cached-through time, and removes itself on detach.
222- enableVideoStreamClientCache() - Registers a shared service worker (`/stream-cache-sw.js`) that caches HLS playlist/segment responses so already-downloaded stream assets remain playable on rewind after server-side segment pruning.
223- enableVideoStreamClientCache() - Registers a shared service worker (`/stream-cache-sw.js`) that caches HLS playlist/segment responses so already-downloaded stream assets remain playable on rewind after server-side segment pruning.