Skip to content

Fix setting MediaSource's duration

Created by: bbert

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

Merge request reports