w3c / media-source

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

Restrict handle getter visibility to dedicated worker #317

Closed wolenetz closed 2 years ago

wolenetz commented 2 years ago

Removes the MediaSource handle attribute visibility from the main Window context, leaving it visible only in dedicated worker contexts. Also removes the conditional throwing of NotSupportedError exceptions on getting this attribute's value if the implementation doesn't support that.

Overall, this change is to undo the backwards incompatibility issue found when older versions of MSE web app libraries enumerated main thread MediaSource attribute values, hitting exception in the Chromium feature implementation through milestone 107. This change replaces that with simpler and safer visibility restriction of this getter to just the context where it must be supported if the implementation supports MSE-in-Workers.

Note, this change replaces the alternative fix discussed in w3c/media-source PR #316.

Reference feature tracking spec issue for MSE-in-Workers w3c/media-source issue #175.


Preview | Diff

wolenetz commented 2 years ago

@karlt @jernoble @jan-ivar @mwatson2 - please take a look. I intend to update the Chromium MSE-in-Workers implementation ASAP to behave per this PR's adjusted behavior. Thank you for your previous comments on the discussion of alternatives in #316 and in the recent Media Working Group meeting at TPAC (https://www.w3.org/2022/09/16-mediawg-minutes.html#t10).

wolenetz commented 2 years ago

@mwatson2 if you have any comment on this, please file a spec issue or otherwise get my attention. I'm going to land this today, as it has obtained one reviewer approval and is intended to match the discussion so far on #316 and at last Friday's TPAC Media WG meeting.