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
{{ message }}
Repository navigation
fix(player): register native HLS readiness before load - #546
In the native HLS fallback (hls.js unsupported, e.g. iOS Safari), media.load() was called before registering the one-shot loadedmetadata listener. A fast/cached manifest may dispatch readiness before the listener is attached, leaving an explicit Play request waiting for a callback that never arrives.
Fix
Register loadedmetadata before media.load(). Keep the existing source-version/user-pause guard, metadata integration, and bounded fallback probe. No change to autoplay policy.
Verification
Added tests/player-hls-startup.test.mjs regression assertion for listener-before-load ordering.
Connector-based check on committed branch: PASS (listener position precedes load; test present).
npm test and Safari browser QA: not run in this environment; CI and manual iOS Safari QA required.
Acceptance criteria
Native HLS loadedmetadata is subscribed before load starts.
Explicit Play works on iOS Safari with a quickly cached HLS manifest; pause/stale station selection still cannot trigger playback.
npm test and PR CI pass; no regression for hls.js/MSE playback.
Risk
Low, localized ordering change. Event delivery and actual Safari behavior still require browser QA. Independent of open PRs #542–#545; based on staging HEAD 40c33f6dcec5df051fde0b03bdc366a61a7e200f.
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reproduction / impact
In the native HLS fallback (
hls.jsunsupported, e.g. iOS Safari),media.load()was called before registering the one-shotloadedmetadatalistener. A fast/cached manifest may dispatch readiness before the listener is attached, leaving an explicit Play request waiting for a callback that never arrives.Fix
Register
loadedmetadatabeforemedia.load(). Keep the existing source-version/user-pause guard, metadata integration, and bounded fallback probe. No change to autoplay policy.Verification
tests/player-hls-startup.test.mjsregression assertion for listener-before-load ordering.npm testand Safari browser QA: not run in this environment; CI and manual iOS Safari QA required.Acceptance criteria
loadedmetadatais subscribed before load starts.npm testand PR CI pass; no regression for hls.js/MSE playback.Risk
Low, localized ordering change. Event delivery and actual Safari behavior still require browser QA. Independent of open PRs #542–#545; based on staging HEAD
40c33f6dcec5df051fde0b03bdc366a61a7e200f.