[media-source] MSE-in-Workers: Consider transitioning attached element to error upon termination of MediaSource's worker (#277)

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

== MSE-in-Workers: Consider transitioning attached element to error upon termination of MediaSource's worker ==
MSE-in-Workers feature issue is #175 

This issue tracks discussing whether or not the `HTMLMediaElement` should do any error transition upon the termination of the `DedicatedWorkerGlobalScope` that owns the attached `MediaSource`.

The Chromium experimental implementation just leaves the element's readyState, networkState and error attributes as they were prior to the termination, and simply forces the element's `seekable` and `buffered` attributes to each return an empty TimeRange. This is sufficient to prevent unexpected playback of a resource that is no longer available. Note that the termination of the worker is typically caused either by worker.terminate() or DedicatedWorkerGlobalScope.close() from the application side, or as part of teardown of the dedicated workers owned by a Window that is terminating.

There may be important edge cases where the app may not know the MediaSource's worker scope is terminated, when it needs to. Hence this issue to discuss and see if an explicit error transition on the element would be useful in this case.

Note that such error transition might not occur until sometime *after* the termination of the worker has completed, since the termination steps are run in parallel with whatever is running on the element's context, so there will still be a window of time where the app might get empty buffered or seekable TimeRanges and not immediately know why, even if there were some eventual error transition of the element later due to the worker's termination.

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


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

Received on Thursday, 17 June 2021 00:35:24 UTC