[remote-playback] RemotePlaybackState enum can become misleading when changing media.src (#125)

jernoble has just created a new issue for https://github.com/w3c/remote-playback:

== RemotePlaybackState enum can become misleading when changing media.src ==
The steps for `prompt()` allow the promise returned to be rejected with `NotSupportedErr` if the media element cannot support remote playback. This allows, e.g., UAs which support MSE to indicate that a media element backed by a MediaSource cannot be played back remotely, and further allows sites to switch to file-based playback. But a page that changes the media's src/srcObject from a file-based URL to a MediaSource would only get a `"disconnect"` event, and would be unable to tell whether the user explicitly disconnected the remote playback session or whether the new src is unsupported.

This could be mitigated by adding a new `RemotePlaybackState` enum, such as (straw man) `"unsupported"`, with a matching `"unsupported"` and `onunsupported` message and event handler.

Sites who start loading a media element with a file-based URL, successfully initiate remote playback with `prompt()`, and then switch the src/srcObject to a MediaSource would (straw man) receive a `"unsupported"` message which would allow them to switch back to a file-based URL.

Please view or discuss this issue at https://github.com/w3c/remote-playback/issues/125 using your GitHub account

Received on Wednesday, 17 July 2019 23:32:27 UTC