This issue tracks discussing an additional readyState usable by apps to understand when a worker MediaSource object is in the process of being closed or detached-from by the formerly-attached HTMLMediaElement. Implementations may choose to throw InvalidStateError exception when servicing requests on a worker-owned MediaSource or SourceBuffer that require readyState to not be closed, yet the implementation has begun but not yet fully completed the steps involved in reaching closed readyState.
For example, setting the mode attribute of a SourceBuffer requires essentially that the parent MediaSource not be closed nor updating. But if it knows that it will be closing imminently due to some internal notification from the implementation of its attachment to HTMLMediaElement, then it may throw exception. Having a distinct readyState for this scenario would assist worker API usage debugging (see an example of such at https://github.com/w3c/media-source/issues/175#issuecomment-742132101).
MSE-in-Workers feature issue is #175
This issue tracks discussing an additional
readyState
usable by apps to understand when a worker MediaSource object is in the process of being closed or detached-from by the formerly-attachedHTMLMediaElement
. Implementations may choose to throwInvalidStateError
exception when servicing requests on a worker-owned MediaSource or SourceBuffer that requirereadyState
to not beclosed
, yet the implementation has begun but not yet fully completed the steps involved in reachingclosed
readyState.For example, setting the
mode
attribute of a SourceBuffer requires essentially that the parentMediaSource
not beclosed
norupdating
. But if it knows that it will be closing imminently due to some internal notification from the implementation of its attachment toHTMLMediaElement
, then it may throw exception. Having a distinctreadyState
for this scenario would assist worker API usage debugging (see an example of such at https://github.com/w3c/media-source/issues/175#issuecomment-742132101).