The New Cast Application Framework Receiver SDK

Today, we are happy to announce the new Cast Application Framework Receiver SDK.

What is Cast?

Google Cast lets your users send and control content from their phone, tablet, or laptop to their TV or speaker.

What is the Google Cast SDK?

The Google Cast SDK enables you to extend your Android, iOS or Chrome app to direct its streaming video and audio to a TV or sound system. Your app becomes the remote control to browse, play, pause, seek, rewind, stop, and otherwise control the media.

The Cast SDK has two parts. The Sender SDK is used to Cast-enable apps running on the device that the user is holding. The Receiver SDK is used to develop a Chrome application that runs on the Google Cast device (such as a Chromecast or Cast-enabled speaker). Both are necessary to enable Cast for your service.

Today we are introducing a new version of the Receiver SDK, called the Cast Application Framework Receiver SDK, or CAF Receiver SDK.

Benefits of the CAF Receiver SDK

This is a major new release that significantly reduces the complexity of adopting Cast. Developers write much less code than before, and in return the new SDK takes care of many error-prone tasks such as handling session state or managing the connect/disconnect/reconnect logic. The resulting improvements in reliability and performance benefit both existing apps that choose to upgrade as well as new apps.

CAF Receiver SDK also comes with a built-in media player, which provides a seamless and easy playback experience.

With all the simplifications and improvements, the CAF Receiver SDK provides the same flexibility as before — allowing your own player UI which can intercept and override messages and methods to execute your custom business logic.

By migrating to the CAF Receiver SDK, your app will automatically benefit from exciting upcoming new features such as Google Assistant.

To summarize, the CAF Receiver SDK lets you quickly add Cast to your app, improves reliability when Casting, and your app benefits from future improvements. We encourage new projects to use the CAF Receiver SDK, and encourage existing projects to consider upgrading from earlier versions.

Code Example

Want to see how easy it is? Check out the basic receiver app example below.

The main structure of a basic CAF receiver app, without any customization, has 3 parts:

  1. A cast-media-player element to represent the media player.
  2. A script element to load the Cast receiver framework.
  3. A JS call to start the receiver application by calling start.

Here is the code for a basic receiver application using the CAF Receiver SDK without any customization:

Easy, right?

Yes! Simply copy and paste this example into your app to start creating an amazing Cast application.

Want to learn more?

Please check out our official documentation and start building some amazing Cast apps!