Closed Naamloos closed 3 years ago
Seems more complex than expected.. https://developers.google.com/cast/docs/web_receiver/basic https://developers.google.com/cast/docs/chrome_sender
Essentially, the chromecast needs both a sender and a receiver. In our case, both can be implemented on the same page, hotswapped with the #cast
url parameter.
This needs a custom receiver, and getting my own AppID is $5. I'll implement this later down the line.
https://developers.google.com/cast/docs/web_receiver
Develop a Custom Receiver: This is a custom built HTML5 app that you must host to handle the display of your app content on the TV. You may need to create a Custom Receiver if your app wants to display content other than audio/video media or if the Styled Media Receiver does not support the media types your app requires.
We most definitely need a custom receiver app.
I'd assume the custom app id is required to route the chromecast to our custom receiver url..
This has been implemented now.
Very rough sample of how it should look:
Might be a good idea to add an additional option to the query string in room join, e.g. add
#cast
to the url so the game will tell the chromecast to stop itself instead of going to the home page. (e.g.http://proost.example/game?ABCDEFG#cast
)