w3c / media-source

Media Source Extensions
https://w3c.github.io/media-source/
Other
268 stars 58 forks source link

api.MediaSource - appendbuffer API throwing InvalidStateError frequently. #284

Closed dhaval-sutaria closed 1 year ago

dhaval-sutaria commented 3 years ago

While using appendBuffer API on source buffer it is throwing error [ InvalidStateError error ] frequently. This is is observed with latest chrome version only [ 91.0.4472.124 ], when running same code on chrome version [ 86.0.4240.75] we are not getting error. we are appending fragmented mp4 data in source buffer and observed this behavior with latest chrome.

dhaval-sutaria commented 3 years ago

is there any way to get ref. frame and ref. video for "ISO BMFF Byte Stream Format", we are passing mp4 in this format.

wolenetz commented 3 years ago

@dhaval-sutaria I'm sorry you're having issues using the MSE API. Reference fragmented mp4 can be found within the web-platform-tests suite for MSE. Specifically, see https://github.com/web-platform-tests/wpt/tree/master/media-source/mp4

If the issue you're having reproduces in Chrome or Chromium, but not on other browser implementations, please consider filing a bug a https://crbug.com.

InvalidStateError exception from MSE is most commonly seen when apps attempt to appendBuffer on a SourceBuffer while that SourceBuffer is still updating per another operation like a previous, not yet complete, appendBuffer or remove call. Many operations on the MSE API are disallowed when updating is true. Another common source of this exception is when a fatal error in a previous operation has occurred (such as a parse/decode error during asynchronous appendBuffer) but the app continues attempts to use the MSE API subsequently.

jyavenard commented 1 year ago

This bug should be closed, it's nothing to do with the spec

chrisn commented 1 year ago

@dhaval-sutaria, thank you for reporting this. Please re-open or raise another issue if you have a suggestion for the MSE specification.