[media-source] MSE-in-Workers: Clarify window/worker coherency/communication of track instance creation/removal and track enabled/selected changes (#278)

wolenetz has just created a new issue for https://github.com/w3c/media-source:

== MSE-in-Workers: Clarify window/worker coherency/communication of track instance creation/removal and track enabled/selected changes ==
MSE-in-Workers feature issue is #175.

This issue tracks specifying how track changes are communicated across the `Window` and `DedicatedWorkerGlobalScope` instances of tracks originating from a {{SourceBuffer}} in the worker.

When MSE-in-Workers is being used:

Track creation should occur in the worker MSE API, and any state necessary to populate copies of the created track metadata in the HTMLMediaElement in the window needs to be proxied/communicated to the element. Delay should be no greater than if that communication were done by an internal, nonexposed, MessageChannel between the worker and the window.

Track removal can also occur in the worker MSE API, and such removal should be proxied similarly to the window HTMLMediaElement (and similarly, can be initiated by the element removing all tracks). 

It is unclear if the `selected`, `enabled`, and `showing`/`hidden`  state needs to be writable by worker API users. The initial assumption is to not disallow that (since the MSE API internally needs this to correctly add/remove tracks and schedule appropriate events on the TrackLists). Expecting that the same internal MessageChannel proxy communication concept is used, it is entirely possible that simultaneous changes to tracks' `selected`, `enabled` and `hidden`/`showing` states could be in-flight from window to worker, and from worker to window. At least a non-normative note describing this situation might be a good idea so that it is not a surprise to API users.


Please view or discuss this issue at https://github.com/w3c/media-source/issues/278 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 18 June 2021 22:16:23 UTC