NB: The shim uses a
w3c prefix for interfaces exposed on
When the user requests to present the given slide show, this page creates a
PresentationRequest and starts it to open the appropriate HTML Slidy receiver application on a second screen. The call returns a
PresentationConnection object. The page then uses that object to have the HTML Slidy receiver application open the requested slide show and to send Slidy commands afterwards.
The HTML Slidy receiver application is an empty page that retrieves the first incoming presentation connection using
navigator.w3cPresentation.receiver.getConnection() and listens to
message events on that connection. When it receives the appropriate message, it loads the requested slide show in a child
iframe that takes up 100% of the viewport and controls the Slidy instance of the slide show within that iframe in reaction to further presentation messages it receives.
Due to usual security restrictions, the origins of the HTML Slidy receiver application and of the slide show must match. The receiver application would not be able to control the slide show otherwise. This page only knows of two HTML Slidy receiver applications:
You may extend the code to support receiver applications on other domain names. Both HTML Slidy receiver applications have been registered with Google and may run on any Chromecast device.
iframe triggers the same origin constraint, it would be tempting to drop it altogether. It could be done in theory provided HTML Slidy is updated to retrieve the right incoming connection and listen to
In practice, this would require slide shows to use that updated (and likely unstable) version of HTML Slidy, which is probably not a good idea for actual slide shows. Also note that there is no way to run arbitrary receiver applications with Google Cast devices for the time being: any receiver application must first be registered with Google. Having to register all existing slide shows would be somewhat tedious.
Slidy commands can be sent to the second screen using the Slidy remote that this page will display once the presentation session has started. Key presses and gestures are also supported.
There are a few known restrictions at this stage:
For feedback on the demo or on the Presentation API itself, use the email@example.com mailing-list (with public archive) or get in touch with Francois Daoust if you do not wish your comment to appear in public.
Feel free to use GitHub issue tracker to report bugs and feature requests.
This work was done with support from the European Commission under grant agreement no: 610404 (MediaScape).
Note you may also enter commands through the keyboard or use gestures on touch-enabled screens.