Open wolenetz opened 6 years ago
Note, this is still an active issue. I suggest adding a note to MSE vNext spec formalizing that endOfStream() prior to media element having reached HAVE_METADATA should result in steps akin to endOfStream('decode').
Looks to me like a spec bugfix in scope for V2.
In Chrome,
endOfStream()
(either no parameter, 'network', or 'decode) results with the attached HTMLMediaElement's error attribute becoming populated with a MediaError object: {code: 4, message: "DEMUXER_ERROR_COULD_NOT_OPEN"} (4 is MEDIA_ERR_SRC_NOT_SUPPORTED).This is because Chrome assumes that any attempt to endOfStream() a MediaSource before its attached HTMLMediaElement has reached HAVE_METADATA means that there is not enough metadata to consider any of it renderable, so follows the endOfStream('decode') steps:
But the endOfStream([no error]) steps for MSE don't consider the media element's readyState like this. Rather, they say to:
This issue is purely to determine what is the right route forward (does Chrome have a bug, or does the spec, or both?)