How to cast a webpage to chromecast

logicrulez picture logicrulez · Mar 26, 2015 · Viewed 12k times · Source

I have a webpage with self-updating news and weather information. Is there an example page that is able to cast it's URL to chromecast? The browser tab casting from within Chrome can stream the content to the TV just fine, but I want to be able to turn off the PC, and leave the news and weather page on my TV.

The Chrome Sender method seems to do this, so I may be just looking for a simple webpage example. Hello world!

References: https://developers.google.com/cast/docs/chrome_sender https://www.youtube.com/watch?v=Qsw9Ogb6t4Y

Answer

Andy picture Andy · Mar 26, 2015

If you're casting from Chrome, closing Chrome (including turning off your PC), will stop the cast, it doesn't matter if it's casting your tab or casting from a cast ready application/webpage.

If you want to cast your webpage, you'll need to write an application that uses a custom receiver. A custom receiver can load webpages. If it's just casting your single webpage, then just have that as the receiver. If you want to use it like a browser and cast different webpages, you can do something like have your sender pass a url to your receiver (maybe use an iframe to load the webpage on the receiver). For the latter, casting a tab is probably far better though.

I suggest you take a look at the Google Cast samples on their Github page. HelloText-Chrome is probably a good place to start, to familiarize yourself with Cast.