While adding reporting media errors to devtools console (https://codereview.chromium.org/1858073002/), I noticed that mediasource-addsourcebuffer.html layout test was issuing a DEMUXER_ERROR_COULD_NOT_OPEN in "Test addSourceBuffer() in 'ended' state.", even if the attempt to addSourceBuffer is removed from the test.
TLDR: endOfStream() on a MediaSource that is attached to an element (e.g. in 'open' state) should be allowed. It is allowed by Blink, but ChunkDemuxer aborts with DEMUXER_ERROR_COULD_NOT_OPEN.
This bug tracks fixing this divergence from MSE spec.
Comment 1 by yini...@chromium.org
, Jun 12 2017