Search results for

All search results
Best daily deals

Affiliate links on Android Authority may earn us a commission. Learn more.

How Chromecast works: HTML5, WebRTC, and the technology behind casting

Chromecast is cheap, simple and sold out nearly everywhere. The fact that it's so hard to get only adds fuel to the HDMI media streaming device's hype. We've already stated that Chromecast has the potential to disrupt the way that we watch TV. Let's take a look at some of the technology behind Chromecast and how Chromecast compatible apps and casting web pages work.
By

Published onJuly 26, 2013

chromecast angle aa

Chromecast is cheap, simple and sold out nearly everywhere. The fact that it’s so hard to get only adds fuel to the HDMI media streaming device’s hype. We’ve already stated that Chromecast has the potential to disrupt the way that we watch TV. Let’s take a look at some of the technology behind Chromecast and how Chromecast compatible apps and casting web pages work.

Method 1: Google Cast API

This first method is how Google Play Movies and TV, Google Play Music, YouTube, Netflix, and Pandora work. This method allows you to fling content from your device to your Chromecast by using supported applications on your mobile device. Chromecast doesn’t just download or stream audio and video from a provided URL. It’s a little more complicated than that. When you send content to your Chromecast, the device loads a special lightweight webpage using HTML5, Javascript, and CSS. It’s not the same web page that you would view if you were using the sites web application. This webpage then loads the content using the HTML5 <video> tag and waits for commands such as pausing, fast forwarding and rewinding.

For now, Google has tight reins on whom can use their Cast API and what apps are created with it. Developers must first get approval by Google to use and access the API and have their Chromecast device white-listed for development. Next, they they have to get written approval from Google before their apps will run on Chromecast devices. It seems Google wants to maintain a healthy user experience by keeping a watchful eye over Chromecast apps. If you’re a developer interested in the Google Cast API, you can get started by requesting access here. In fact, it seems you can add support to your existing application with less than 200 lines of code.

Casting with Chromecast

Method 2: Google Cast Extension

The second method bypasses the Google Cast API and allows you to project web content to your Chromecast through a Chrome web browser tab. You do this by installing the Google Cast extension for Chrome on your computer. This method, while will be extremely popular until more applications are built using the above method, will yield different results for different people depending on their computer speed. When you’re casting or mirroring a webpage using the extension, the Chromecast loads your current webpage using an HTML5 standard called WebRTC. If you’ve heard of WebRTC before, you normally would associate it with video chatting. That’s still what’s going on here, basically. Your computer essentially video chats or streams a video of the current tab in Chrome over to the Chromecast. The video is constantly encoding and transmitting. This is why you need a powerful computer. If your computer and network can’t handle a higher bit-rate, the extension allows you to choose between 480p, 720p, and a higher bit-rate 720p to adjust accordingly.

At this time, Hulu, Amazon, Crackle and other Internet TV and movie streaming sites do not have officially supported apps. To view their content, you’ll need to cast it with method 2. Your mileage may vary when it comes to viewing this technically unsupported content. As I mentioned, depending on your computer and network speed, you may end up experiencing audio syncing issues or dropped frames.

Wrap up

Chromecast uses a lightweight Chrome OS along with the standard web technologies of HTML5, WebRTC, APIs and Chrome extensions. It seems at least for now, Google wants to provide a great user experience by keeping a watchful eye over new Chromecast applications. Additionally, if you’re going to stream content from a Chrome tab, you better have a modern computer to do so.

Stay tuned to Android Authority, we have some Chromecast tips and tricks we’d like to share coming up soon.

 

You might like