New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add fixes for wolenetz comments #18225
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good. A few nits/questions. Thanks again for working on this!
api/HTMLMediaElement.json
Outdated
{ | ||
"version_added": "108", | ||
"partial_implementation": true, | ||
"notes": "Support added for <code>MediaSource</code> objects transferred from dedicated workers via <code>MediaSource.handle</code> (see <a href='https://crbug.com/878133'>bug 878133</a>)." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably best to be precise here: ...Support added for MediaSourceHandle
objects transferred from dedicated workers where they were obtained from MediaSource.handle
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, updated!
"standard_track": true, | ||
"deprecated": false | ||
"status": { | ||
"experimental": true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that MSE-in-Workers in MDN in these changes is being marked "experimental". It is shipping on-by-default in Chrome, and is implemented to follow the corresponding changes in the current MSE spec working draft. What does "experimental" mean here, given this information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the definition that MDN uses for experimental: https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental. In the time I've been contributing to MDN, we've gone back and forth on this a lot, and it still isn't perfect, but I think it's OK. MSE-in-workers is marked as experimental because it is still only available in one rendering engine, so the advice to devs would be to think carefully when considering using it. If you want to support Fx and WebKit browsers, then you might need to think about a fallback, alternative, or gracefully degrading experience. If you only need Chromium support, then you are OK. This certainly isn't the same as "don't use it".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation. https://developer.mozilla.org/en-US/docs/MDN/Writing_guidelines/Experimental_deprecated_obsolete#experimental could probably use clarification around the meaning of "It is implemented and enabled by default in less than two modern major browsers" -- I understand that it is being applied as if s/major browsers/major distinct underlying rendering engines in browsers/, but on the surface it is confusing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've filed this: mdn/content#22391. Please add to it if you have any other thoughts on the subject. I'll try to fix this at some point next week, if no one else grabs it.
@@ -1723,7 +1678,14 @@ | |||
"description": "Available in workers", | |||
"support": { | |||
"chrome": { | |||
"version_added": "108" | |||
"version_added": "108", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to note that both SourceBuffer.audioTracks and .videoTracks in a dedicated worker MediaSource's SourceBuffer is not expected to succeed even if the experimental flag is provided (there is further spec work and implementation work required to support those track lists from a worker context, and currently the implementation - if experimental flag is enabled and the app invokes the audioTracks() or videoTracks() getter on a worker SourceBuffer, then Chrome crashes the renderer process to avoid potentially worse behavior. This is known work in both spec and impl (MSE spec, HTML spec, Chrome impl), partially captured by this MSE spec issue: w3c/media-source#280
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a note to audioTracks
/videoTracks
to hopefully cover this; let me know what you think. I wasn't sure that the spec issue you linked to really explained what the issue was, so I decided not to link to it. IS there a better link available, or do you think I should link here, as that is where explanation will be added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point - I've reactivated the most closely related Chromium issue to this piece of the spec. Please link to https://bugs.chromium.org/p/chromium/issues/detail?id=487288#c24 (it also links transitively to the MSE spec issue 280 that I mentioned, above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect, that is a useful explanation. Link added.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me - please add the link to https://bugs.chromium.org/p/chromium/issues/detail?id=487288#c24 as I just commented about a few minutes ago.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for following up on this, LGTM!
Summary
This PR adds fixes in response to the review comments provided by @wolenetz in #18220
I did the following:
worker_support
items from the top-level interface support items, as the extra rows in the support tables were confusing and unnecessaryaudioTracks
andvideoTracks
support as experimental, forSourceBuffer
andHTMLMediaElement
SourceBuffer.textTracks
support asfalse
for ChromiumVideoPlaybackQuality
changesTest results and supporting details
Testing was done using the demo available at https://wolenetz.github.io/mse-in-workers-demo/mse-in-workers-demo.html
Related issues
Fixes #18220