- Provides an interface to display the app's content on the TV.
- Handles messages from the sender application to control content on the receiver device.
- Handles custom messages from the sender application that are application-specific (applicable only when using a Custom Receiver).
You can implement your receiver application in the following ways:
- Use the Styled Media Receiver.
This is a pre-built receiver application that provides a media player UI for audio and video content. It provides a default UI for the receiver application, but you can customize several elements in the UI with a CSS file.
- 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.
If you choose not to implement a receiver, your application can use the Default Media Receiver.
Choose a receiver
Styled Media Receiver
The Styled Media Receiver is a pre-built receiver application hosted by Google that is designed for streaming audio and video content. You can style the interface with your own colors and branding assets using a CSS file.
To use the Styled Media Receiver, select Styled Media Receiver when registering a new application and (optionally) provide the URL to a CSS file that defines a custom look for the receiver application's UI.
For details about the CSS styles that allow you to customize the receiver application's UI, see the Styled Media Receiver guide.
For details about how to build your receiver application with the Receiver API, see the Custom Receiver guide.
Media Player Library
The Google Cast SDK includes a Media Player Library that simplifies support for scenarios that require DRM. Use this library in conjunction with a Custom Receiver.
See the Media Player Library guide for specific instructions.
Default Media Receiver
A third option available is the Default Media Receiver. This is a pre-built receiver application hosted by Google that is designed for streaming your audio and video content. It does not require you to register with the Google Cast SDK Developer Console, but you cannot customize any of the UI in the Default Media Receiver.
Instead of registering with the developer console to receive an app ID, you can use the Default Media Receiver with the default app ID:
- For Android apps:
- For Chrome apps:
- For iOS apps:
From your sender app, you start the Default Media Receiver app on the Cast device and then use it to load the URL to your media.
All Google Cast receivers have pre-installed the following font families; each includes both normal and italic font styles as well as the bold font weight.
- Droid Sans, sans-serif
- Droid Sans Mono, monospace
- Droid Serif Regular, serif
- Cutive Mono
- Short Stack
- Alegreya Sans SC
To fully support content protected with Digital Rights Management (DRM), you need to implement a Custom Receiver. With a Custom Receiver, you can set up authentication and tailor your application according to your DRM requirements.
DRM content will play on a Styled Media Receiver or the Default Media Receiver, if you provide the DRM license/key information in the application's manifest file. But there is no way to implement authentication for the content using either of these receivers. You can't override the license URL, pass custom parameters, or authenticate users with cookies or tokens.
See the Cast Media Player Streaming DRM sample for an example using DRM.