Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error and switch on SourceBuffer append requests for non-existing tracks #5485

Merged
merged 2 commits into from
May 27, 2023

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented May 12, 2023

This PR will...

Error and switch on SourceBuffer append requests for non-existing tracks.

Why is this Pull Request needed?

Prevents the player from stalling when encountering muxed "audiovideo" (mp4) after setting up with unmuxed "video" and "audio" SourceBuffers (TS or unmuxed main and alt-audio mp4)

Are there any points in the code the reviewer needs to double check?

There may be cases where muxed mp4 content could be appended into either a "video" or "audio" SourceBuffer (but not both). Only some MSE implementations handle this, ignoring the unrecognized tracks, but some devices do not (iPad for example). Either way, that is not correct behavior, or behavior we should support. Mixing content in HLS this way is not the best for compatibility an should not be supported.

Feature requests for unmuxing muxed mp4 when needed could be entertained (file an issue). There also may be future work that involves resetting SourceBuffers on an as-needed basis, but this comes with very obvious DOM and rendering side-effects that degrade UX. For now, handling this as an error and switching back down to a supported variant is the behavior HLS.js should take.

Resolves issues:

Related to #1510

Checklist

  • changes have been done against master branch, and PR does not conflict
  • new unit / functional tests have been added (whenever applicable)
  • API or design changes are documented in API.md

@robwalch robwalch added this to the 1.5.0 milestone May 12, 2023
@robwalch robwalch force-pushed the feature/error-and-switch-unhandled-track-type branch from 5d09386 to cbc82d3 Compare May 26, 2023 20:58
@robwalch robwalch merged commit 11b11de into master May 27, 2023
@robwalch robwalch deleted the feature/error-and-switch-unhandled-track-type branch May 27, 2023 01:41
@robwalch robwalch mentioned this pull request Aug 28, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant