Commit Graph
1 Commits
Author SHA1 Message Date
Eric W 5d43ba8a67 Correct forever spinners on short explore videos.
The core fix is switching the VOD request from /vod/clip/ (which forces HLS
discontinuity markers) to /vod/, and extending the start time to align with the
first recording segment's boundary (recordings[0].start_time). Previously, the
backend applied a clipFrom offset to trim the first recording segment to the
exact requested start time. For short events or cameras with large GOP
intervals, this trimming could skip past all keyframes in the segment, leaving
hls.js with no decodable starting frame — so it buffered forever. By aligning
to the recording boundary, the full segment is included and keyframes are
always available.

The remaining changes adjust for the fact that the video now starts earlier
(at the recording boundary rather than the padded event start). The
timestampToVideoTime and videoTimeToTimestamp functions are simplified since
there's no longer an inpoint offset to account for. The onPlayerLoaded callback
uses a seek-then-play pattern (matching DynamicVideoPlayer's waitAndPlay) to
skip past the extra content at the start and begin playback at the correct
position. The player rendering is also gated on recordings being loaded so
the timestamp mapping always has accurate data.

Fix wayward 0 — classic React falsy rendering bug.
2026-03-15 11:51:36 -04:00