- From: Mounir Lamouri via GitHub <sysbot+gh@w3.org>
- Date: Tue, 26 Jan 2016 10:43:32 +0000
- To: public-secondscreen@w3.org
I think we could rename `start()` to `connect()` and resolve the promise as soon as there is a device to connect to. When the promise is resolved, the state moves from `disconnected` to `connecting` then from `connecting` to `connected`. The benefit for the page is that they know that when `connect()` resolves, they can show some spinner UI waiting for the connection to happen (ie. `connecting` state) but `connect()` might reject if the user, for example, cancel the call. The page might not want to show a connecting UI while the user sees a device picker. The spec might want to specify if we must have a `connecting` state or if we allow `connecting` to be skipped if the device was already `connected` (ie. at an app/system level). I think the `connect()` method can be used for implementation to show UI if they want to (like `webkitShowPlaybackTargetPicker()` or the Cast device picker) or simply connect to the default device if there is one (maybe the case on iOS if the default route is already a remote device?). We could then add a `disconnect()` method. We might need your input on this @jernoble in order to make sure it does make sense on iOS too. Is this something you would like to be a no-op there or should it revert the decision made in the `connect()` UI if the user picked a device? -- GitHub Notification of comment by mounirlamouri Please view or discuss this issue at https://github.com/w3c/remote-playback/issues/3#issuecomment-174951884 using your GitHub account
Received on Tuesday, 26 January 2016 10:43:33 UTC