You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem:
Presentation API and Remote Playback API each has a method to start a session, namely PresentationRequest.start() and RemotePlayback.prompt().
Each shows a potentially different list of receiver devices to choose from, so the user may need to open two different device selection dialogs to find a device.
Proposed solution:
We show a single dialog showing devices capable of either presentation or remote playback. After the user chooses a device, the controlling page initiates a presentation or remote playback depending on its preference and the chosen device's capabilities.
SecondScreenDevice must expire after some time, to prevent the controller page from holding onto it and starting a session later when the user is not expecting. SecondScreenDevice should become invalid at the same time as user gesture would become inactivated (UA dependent; in about one second on Chrome). Once invalid, supportsPresentation and supportsRemotePlayback become false.
A call to startPresentation() or startRemotePlayback() gets rejected if supportsPresentation or supportsRemotePlayback is false, respectively.
The text was updated successfully, but these errors were encountered:
This looks good to me, but we should be aware that there are two limitations:
You can't pass in multiple PresentationRequests or RemotePlaybacks (unless we added an argument to startPresentation/startRemotePlayback and generalized prompt to a list of objects). But this is probably fine for PresentationRequest and RemotePlayback since they have a list of URLs.
We can't easily add new types of things to prompt for in the future, unless we generalize prompt () and maybe make a general supports(x) and start(x). This will only matter if we think this will one day support more types of devices.
This doesn't support knowing whether or not the device supports both audio and video. Maybe it would be easy to extend that with a .supportsAudio and .supportsVideo on the SecondScreenDevice?
Problem:
Presentation API and Remote Playback API each has a method to start a session, namely
PresentationRequest.start()
andRemotePlayback.prompt()
.Each shows a potentially different list of receiver devices to choose from, so the user may need to open two different device selection dialogs to find a device.
Proposed solution:
We show a single dialog showing devices capable of either presentation or remote playback. After the user chooses a device, the controlling page initiates a presentation or remote playback depending on its preference and the chosen device's capabilities.
Example code:
Web IDL:
SecondScreenDevice
must expire after some time, to prevent the controller page from holding onto it and starting a session later when the user is not expecting.SecondScreenDevice
should become invalid at the same time as user gesture would become inactivated (UA dependent; in about one second on Chrome). Once invalid,supportsPresentation
andsupportsRemotePlayback
become false.A call to
startPresentation()
orstartRemotePlayback()
gets rejected ifsupportsPresentation
orsupportsRemotePlayback
is false, respectively.The text was updated successfully, but these errors were encountered: