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 setting MediaSource's duration #3532

Conversation

bbert
Copy link
Contributor

@bbert bbert commented Feb 3, 2021

When setting duration on MediaSource, if any SourceBuffer is updating it throws an InvalidStateError exception:

Uncaught DOMException: Failed to set the 'duration' property on 'MediaSource': The 'updating' attribute is true on one or more of this MediaSource's SourceBuffers

This PR fixes this issue by check if no SourceBuffer is updating when setting MediaSource duration

@dsilhavy dsilhavy self-requested a review February 8, 2021 10:11
@dsilhavy dsilhavy added this to the 3.2.1 milestone Feb 8, 2021
@dsilhavy dsilhavy merged commit ecb4fc4 into Dash-Industry-Forum:development Feb 8, 2021
@bbert bbert deleted the fix-mediasource-duration branch February 8, 2021 11:08
bbert added a commit to Orange-OpenSource/dash.js that referenced this pull request Mar 4, 2021
* Check if no SourceBuffer is updating when setting MediaSource duration

* Check if no SourceBuffer is updating when setting MediaSource duration

* fix MediaSourceController unit tests
jlks pushed a commit to bbc/dash.js that referenced this pull request Jun 21, 2021
* Check if no SourceBuffer is updating when setting MediaSource duration

* Check if no SourceBuffer is updating when setting MediaSource duration

* fix MediaSourceController unit tests
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.

2 participants