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

Fix MEDIA_ATTACHED > loadSource recursive calls #3754

Merged
merged 1 commit into from Apr 13, 2021

Conversation

robwalch
Copy link
Collaborator

@robwalch robwalch commented Apr 9, 2021

This PR will...

Do not detach and reattach media in loadSource when in an hls.js event loop.
When loadSource is called, only detach and reattach media if URL has changed, and source buffer types are set.

Why is this Pull Request needed?

Prevents recursive calls when loadSource is called in an event handler such as MEDIA_ATTACHED, or any prior to BUFFER_CODECS. This is where the BufferController's SourceBuffer configuration is set. Loading a new stream prior to that can be performed without reattaching. After that, reattaching is necessary to reset the source buffers.

Resolves issues:

Resolves #3732

Checklist

  • changes have been done against master branch, and PR does not conflict

@robwalch robwalch added this to the 1.0.1 milestone Apr 9, 2021
@robwalch robwalch added this to Top priorities in Release Planning and Backlog via automation Apr 9, 2021
…e URL has changed, and source buffer types are set

Resolves #3732
@robwalch robwalch force-pushed the bugfix/load-source-in-attach-media-and-reattach branch from 99f044e to c40420f Compare April 12, 2021 20:03
@robwalch robwalch merged commit 4234e65 into master Apr 13, 2021
@robwalch robwalch deleted the bugfix/load-source-in-attach-media-and-reattach branch April 13, 2021 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Release Planning and Backlog
  
Top priorities
Development

Successfully merging this pull request may close these issues.

v1 goes into a loop on detaching and re-attaching media
1 participant