Closed tidoust closed 8 years ago
This seems to me to be an editorial change. Please update if you disagree.
It seems to me that the only monkey-patch we need is to say that a MediaSource media provider object can be attached using src
and the MediaSource object URL.
The new resource fetch algorithm already seems to support MediaSource as a media provider object, even if we do not specify that it can be attached with srcObject
.
I guess we should also say that in the case a MediaSource is attached via src
and a MediaSource object URL then the srcObject
attribute may not reflect this.
It looks like a combination of @mwatson2's simplified monkey patch, plus @tidoust's note that references in MSE need to be updated to the new "media data processing steps", is the way to go. In VNext, we can get srcObject
hooked up appropriately for MediaSource (#28).
I'll begin work on this shortly.
Note that https://github.com/whatwg/html/pull/1037 is what moved the MediaSource objectURL piece to the "local" branch in the resource selection algorithm in HTML5.1. However, I don't see the specific text there which would effectively make this MSE issue much simpler (perhaps just a non-normative note that srcObject support for MSE is a quality of implementation issue). @foolip : Why isn't https://github.com/whatwg/html/pull/1037 reflected in https://www.w3.org/TR/html51/semantics-embedded-content.html#resource-fetch-algorithm ?
edit: Even with that PR1037, we'd still need to correct the "CORS fetch" text in the MSE monkey-patch of HTML5 to align it with the media provider object wording in HTML51.
edit: Aha -- that was the whatwg version of HTML which took the text change, not the w3c HTML51 version. @foolip, what's the prognosis of such text getting into w3c's HTML51 version? For now, it seems MSE v1 must make a monkey-patch to align with w3c HTML51's "local" mode.
This is a bit of a mess and I'm not a neutral third party, but let's see... w3c/html is maintained by a separate group of people, and copying changes from whatwg/html is a manual process because the whole spec was reformatted to use Bikeshed. Right now it looks like the focus is on reaching PR or REC and not so much on keeping up to date with upstream changes.
I think you have these options:
Sorry that you're having to deal with this situation.
Combo of (1) and (2) from https://github.com/w3c/media-source/issues/99#issuecomment-236897571 sounds like the way to go. I'll prepare an issue shortly for HTML51 w3c discussion ASAP (around (1)).
PR #143
In 2.4.1 Attaching to a media element, the Media Source Extensions specification plugs itself into the "Perform a potentially CORS-enabled fetch" step of the resource fetch algorithm, defined in HTML5.1.
This algorithm has been updated in HTML5.1 and that step no longer exists.
Actually, I think that algorithm got updated precisely to cover media provider objects à la
MediaSource
, although the expected attachment method is rather viasrcObject
, which seems planned for VNext (#28).Perhaps you can plug after the first step in this algorithm to force
mode
tolocal
, reset thedelaying-the-load-event-flag
, etc. Step 4. in "Attaching to a media element" would then not be needed anymore. I may have missed something though.Also note that steps à la "If the media data cannot be fetched at all, ..." are now defined in a separate media data processing steps list algorithm and are no longer in the resource fetch algorithm. References should be updated accordingly in the End of stream algorithm.