You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two related bugs affect vhs-json (pre-resolved manifest object) sources:
Initial ABR selection is discarded. When a vhs-json main playlist has multiple resolved variants, the variant chosen during the first loadedplaylist is silently overridden back to playlists[0]. In PlaylistLoader.setupInitialPlaylist, the fallback guard is if (!this.request). For vhs-json, media() resolves via a fast path that sets this.media_without issuing an XHR, so this.request is never set — the guard is always true and resets the selection.
Paused players never pre-buffer. For vhs-json, PlaylistLoader.media() fires loadedmetadata synchronously; the segment loader starts, then handleUpdatedMediaPlaylist pauses it and only restarts when the tech is playing. A paused player with preload="auto" therefore downloads no segments (TTFF regression on play).
Sources
Reproducible with any vhs-json source whose main playlist has two or more resolved variants.
Note: this is hard to surface with the project's own demo page as-is, because the bundled demo manifest (scripts/dash-manifest-object.json) has only a single playlist. With one variant the playlists[0] override is a no-op — there is no alternative for ABR to select — so the bug stays invisible. Using a multi-variant resolved manifest is what makes both issues observable.
Steps to reproduce
Load a vhs-json source with ≥2 resolved variants where ABR should pick a variant other than index 0.
Observe the player plays playlists[0] regardless of the ABR choice.
With preload="auto" on a paused player, observe no segment requests in the Network tab until play.
Results
Expected: honor the ABR-selected variant, and pre-buffer for VoD when preload permits.
Actual: always playlists[0]; no pre-buffer while paused.
Demonstration
Network throttled to 3G. The player first downloads bbb_30fps_1920x1080_8000k (playlists[0], ~9.9 Mbps) — the wrong rendition for a slow link — because the playlists[0] override discards ABR's initial selection. Only on the next ABR cycle does it correct down to bbb_30fps_320x180_200k (playlists[1], ~254 Kbps). The result is a wasted high-bitrate segment fetch and delayed startup on constrained connections.
Description
Two related bugs affect
vhs-json(pre-resolved manifest object) sources:Initial ABR selection is discarded. When a
vhs-jsonmain playlist has multiple resolved variants, the variant chosen during the firstloadedplaylistis silently overridden back toplaylists[0]. InPlaylistLoader.setupInitialPlaylist, the fallback guard isif (!this.request). Forvhs-json,media()resolves via a fast path that setsthis.media_without issuing an XHR, sothis.requestis never set — the guard is always true and resets the selection.Paused players never pre-buffer. For
vhs-json,PlaylistLoader.media()firesloadedmetadatasynchronously; the segment loader starts, thenhandleUpdatedMediaPlaylistpauses it and only restarts when the tech is playing. A paused player withpreload="auto"therefore downloads no segments (TTFF regression on play).Sources
Reproducible with any
vhs-jsonsource whose main playlist has two or more resolved variants.Note: this is hard to surface with the project's own demo page as-is, because the bundled demo manifest (
scripts/dash-manifest-object.json) has only a single playlist. With one variant theplaylists[0]override is a no-op — there is no alternative for ABR to select — so the bug stays invisible. Using a multi-variant resolved manifest is what makes both issues observable.Steps to reproduce
vhs-jsonsource with ≥2 resolved variants where ABR should pick a variant other than index 0.playlists[0]regardless of the ABR choice.preload="auto"on a paused player, observe no segment requests in the Network tab until play.Results
playlists[0]; no pre-buffer while paused.Demonstration
Network throttled to 3G. The player first downloads
bbb_30fps_1920x1080_8000k(playlists[0], ~9.9 Mbps) — the wrong rendition for a slow link — because theplaylists[0]override discards ABR's initial selection. Only on the next ABR cycle does it correct down tobbb_30fps_320x180_200k(playlists[1], ~254 Kbps). The result is a wasted high-bitrate segment fetch and delayed startup on constrained connections.issue-compressed.mp4
Additional Information