0

We host an intranet web-site within our manufacturing plant and I came across this solution to display a URL on a Chrome-cast device using a cast sender app. It works well but I'd like to automate it in two ways:

  1. I want the sender app to send the URL directly to a Chrome-cast device instead of having to select the device from a prompt.

  2. If 1. can be done, I would create a web-page with a button on it that would send a message to the sender app to load up the URL (using SignalR to send the request to the sender app).

Thanks in advance!

1 Answers1

0

We can't connect to the device directly. The best answer would be to use a JavaScript automated testing framework to interact with the UI and select the device for testing.

To load a specific URL: The testing framework can trigger a load request to load the URL upon connection or use a custom namespace for custom interactions.

You can wire up a button to send the load request to the receiver: https://developers.google.com/cast/docs/chrome_sender/integrate#media_control

After connecting, they can use a custom namespace to send data back and forth: https://developers.google.com/cast/docs/caf_receiver/advanced#custom-messages

  • Thanks. I will try this. My end goal was to able to provide our supervisors the ability to cast slides, photos or videos from their iPhone when they needed to and then have the ability to put the dashboard page back up on the screen and walk away. I removed the routine for the disconnect event on the receiver app so that the URL stays up on the Chromecast even if I close the sender app page. – Byte-Size Images May 22 '19 at 17:27