-
Notifications
You must be signed in to change notification settings - Fork 20
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
Allow websites to stop the remote playback #4
Comments
/cc @jernoble I wonder if that would be compatible with the iOS routing system where Safari uses the system default route in which case, there is no such thing as |
There's no equivalent of |
@hober, it occurs to me that, per issue #6, Safari effectively has an API for stop(), namely, the page can add a However, this is just a side effect, and we may not want to provide an explicit API to do this. |
Hm, the |
It seems that a website might be interested to have a "remote" button for users to start remote playback and then have this button be used to disconnect. The same way, the fullscreen has an on and off switch. What's the rationale to not expose a way to stop the remoting from script if we want adding |
That would be a strange design pattern, as it would mean users would have to explicitly disable playback before picking a different remote device. UAs would always provide a "stop" option in the device picker, so why would a site ever switch out the "choose a device" button with a "stop" button? |
Discussed at F2F: PROPOSED RESOLUTION: For issue #4, no "stop" method, add guidance that UA should provide a way to disconnect, and rename "connect" method into something like "showDevicePicker" |
I suggest to name the method The spec should recommend the UA to show a list of devices at least when not connected and propose a way to disconnect when connected. |
Threre is already [1] https://developer.mozilla.org/en-US/docs/Web/API/Window/prompt |
It sounds to me that |
I think I'd like something a little more verbose than |
@hober, the issue here is that the UI will require the prompt to show a list of devices when disconnected (ie. to connect) and a way to disconnect when currently connected. Safari implements the UI in both states the same way but it is reasonable for other implementation to be slightly different (not offer a way to pick a new device without disconnecting for example). Is |
What would the Promise mean in the context of Seems like something along the following lines: When How does it sound? How about |
@mounirlamouri @hober @jernoble WDYT? |
Mounir and I agreed on (well, we didn't discussed the name). partial interface RemotePlayback {
Promise<void> showUI();
} The I like |
Addressed in #49. I went with prompt() as we didn't seem to have agreed on anything yet. We can rename later. |
Currently, the spec doesn't define how the remote playback is stopped. It could be some user agent provided UI that the user can trigger somehow or that can be shown when the page calls
start()
on theremote
instance that's already in aconnected
state. However, it seems natural to allow the website to have a custom control on the media element that stops the remote playback.The text was updated successfully, but these errors were encountered: