-
Notifications
You must be signed in to change notification settings - Fork 57
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
MSE-in-Workers: Centrally define the window/worker HTMLMediaElement<->MSE API communication mechanism #279
Comments
wolenetz
added a commit
to wolenetz/media-source
that referenced
this issue
Jun 18, 2021
Steps in the [=attaching to a media element=] will need similar clarification. |
wolenetz
added a commit
to wolenetz/media-source
that referenced
this issue
Jun 30, 2021
wolenetz
added a commit
to wolenetz/media-source
that referenced
this issue
Jul 26, 2021
Specifies expansion of MSE API to usage from DedicatedWorker contexts. This is an MSEv2 feature tracked by issue w3c#175. See also earlier WICG explainer [1]. This is a squashed commit of 23 original commits, notably: * Adds `closing` issue and link to w3c#276. * Adds the `github:` respecConfig key and an issues-summary appendix. * Removes redundant 'Repository' otherLinks config (addition of 'github' to respecConfig has make the manual enumeration in the 'Repository' otherLinks portion of respecConfig redundant.) * Adds subsections for each of the extended HTMLMediaElement's .seekable and .buffered attributes. * Adds more normative detail to the .buffered extension. * Specifies what .seekable and .buffered do when worker has terminated, and references w3c#277 for further discussion. * Describes cross-context track object aliasing. AudioTrack, VideoTrack, TextTrack extensions' sourceBuffer attribute must be null in the Window context's alias of the track if the track is an alias to a worker-created track from MSE-in-Worker. This is to prevent any assumption that cross-context object references are somehow now allowed in MSE or HTMLMediaElement+MSE. * Describes a MessageChannel-based cross-context communication mechanism in a new section, including how MessagePorts on that channel are given to each side (media element, MediaSource) for communicating state needed by algorithms. Updates multiple algorithms and methods to use this mechanism where necessary. Resolves w3c#279. * Specifies how to detect this feature using new `canConstructInDedicatedWorker` attribute without requiring the detection happening in a DedicatedWorker context. * Modernizes to use respec's new variable syntax (`|...|` with types inlined)) for related lines. Wider modernization is an editorial item that is out of scope of this feature. * Modernizes to use internal slots for the new cross-context communication mechanism's channel and ports. Wider modernization is an editorial item out of scope of this feature.o Note, multiple simultaneous changes to track's `selected`, `enabled` or `hidden`/`showing` states could be in-flight from window to worker, and from worker to window. A non-normative note might be good to add here to warn API users of this possibility. See w3c#278. Note, {Audio,Video,Track}{,List} IDL need to be exposed in DedicatedWorker. This might need to be directly in the media element spec. See w3c#280. Note, a reference to an MSE-in-Worker example/demo would be good in the merged PR. Such a demo exists already at [2]. [1] https://github.com/wicg/media-source/blob/mse-in-workers-using-handle/mse-in-workers-using-handle-explainer.md [2] https://wolenetz.github.io/mse-in-workers-demo/mse-in-workers-demo.html
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MSE-in-Workers feature issue is #175.
This issue tracks clarifying and centrally defining the communication mechanism(s) necessary for interoperable implementations MSE-in-Workers.
The initial draft spec (https://github.com/wolenetz/media-source/tree/mse-in-workers-initial-spec) has repeated large blocks of text, rather than concise reusable references, to describe the communication mechanisms in a black-box fashion. Clarity would be greatly improved, I think, if the mechanism and constraints were described in a separate section in detail in the spec.
Example of an instance that would be improved:
Potential improvement:
New Algorithm X
to communicate the change to the HTMLMediaElement in the window context.New Algorithm X
would use someWell-defined internal, nonexposed MessageChannel pair
established at attachment time to send the change message, with a handler in the window context that would update an internalrecent duration
andrecent live seekable range
cache for the media element.New Algorithm X
describing why this cache is useful and that it can lag behind the actual state in the worker.New Algorithm X
indicating that implementations MAY use internal communication channels that are faster than MessageChannels for on-demand querying the current live seekable range and duration. (Chrome's experimental implementation includes this optimization with careful locking and cross-thread data sharing abstractions.)Various other places would need similar, including some that communicate from window HTMLMediaElement to worker MSE.
Currently, the following are known places in the feature draft spec that could use this improvement:
recent live seekable range
(for seekable attribute value determination)recent duration
(for seekable attribute value determination)recent intersection ranges
(for HTMLMediaElement's buffered attribute value determination)The text was updated successfully, but these errors were encountered: