Naamloos / Proost

Een open-source party drinking game. Drink met mate!
GNU General Public License v3.0
5 stars 0 forks source link

Add cast button. #21

Closed Naamloos closed 3 years ago

Naamloos commented 3 years ago

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)

Naamloos commented 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.

Naamloos commented 3 years ago

This needs a custom receiver, and getting my own AppID is $5. I'll implement this later down the line.

Naamloos commented 3 years ago

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.

Naamloos commented 3 years ago

I'd assume the custom app id is required to route the chromecast to our custom receiver url..

Naamloos commented 3 years ago

This has been implemented now.