[object Object] Icon

Learn how to create, start, manage and modify Encodings

[object Object] Icon

Learn how to create, start, manage and modify Players

[object Object] Icon

Learn how to create, start, manage and modify Analyticss

Docs Home
User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Tue Apr 26 2022

Bitmovin Player CAF support

Tue Apr 26 2022

OverviewLink Icon

This article assumes that you have an existing understanding of implementing the Bitmovin Player. If this is the first time diving into our player, please take a look at our guide on getting started with the Bitmovin player

Bitmovin player is compatible with broadcasting to Chromecast via CAF (Casting Application Framework) from various platforms, namely: Web, Android and iOS.

Basic ConceptsLink Icon

Receiver app

It is basically a HTML app that is hosted on a server to the Internet. It can include any desired behaviour (e.g. by including JavaScript). When the app is launched on a Cast device the associated HTML file is fetched and interpreted in its browser. An overview of CAF Receiver app can be found here. Bitmovin offers a basic example of a receiver app, containing a basic HTML page with the video element and reference to Bitmovin SDK. You can check out the example on GitHub The receiver App for CAF version 3 integrates Shaka Player as default player, and it is not possible to replace it with any third party player, including Bitmovin. The capabilities and features support of the receiver are dependent on the ones available in Shaka Player. Moreover, it is worth noting that the version of Shaka Player used in CAF receiver does not go on par with the mainstream Shaka, generally being the CAF version slightly behind.

Sender app

A Sender app is used to launch and control the Receiver app. You can think of a Custom Receiver like a remote-controlled web browser. For some uses cases e.g. media players there are APIs provided by Google. It is also possible to exchange string messages between Sender and Receiver. The communication relies on Web Sockets and is abstracted by the Google Cast Sender APIs.

Bitmovin player contains sender functionality available for Web, Android and iOS SDKs. Customer applications can use them to implement different cast use cases (see details below on this guide).

How to launch the app?

Every app has a unique ID which can be found in the Google Cast SDK Developer Console. This ID is needed to launch the app with Google Cast Sender APIs for Chrome/Android/iOS. For Instructions on how to register your app to Google Cast SDK developer console, please visit Google Cast Registration.

RequirementsLink Icon

In order to cast content to a Chromecast device, the following prerequisites must be met:

  • If the sender device is a Desktop browser, it must be Chrome based, such as Chrome, Edge, etc.
  • The receiver device must be a certified Chromecast receiver, either a hardware dongle or a TV with build-in Chromecast support.
  • The sender & receiver must be on the same local network
  • The sender and receiver need internet access
  • The sender must include the cast SDK
  • A valid cast receiver applicationID (Obtained from Google Cast SDK Developer Console)

Supported FeaturesLink Icon

The following table summarises the supported features for CAF on the different Bitmovin SDKs:

Casting DASH streams
Casting HLS streams
Send messages from sender to receiver (addMetadata)
Send side loaded subtitles to receiver
Basic playback
DRM configuration
Using custom receiver
Cookie/credentials support

Supported DRM systems are Playready (SL 2000), Widevine (Level 1) and Clearkey DRM. Supported subtitle formats are TTML, WebVTT, CEA-608/708. The codec and HDR support is dependent on the receiver hardware, and a full compatibility list can be found in the media documentation. Besides that, Bitmovin supports the following features of CAF SDK:

  • ABR
  • Multiple audio and subtitle tracks
  • Subtitle styling
  • Styling of receiver UI elements
  • Display custom DOM elements (with custom receiver)
  • Live streams
  • Transmuxing

Web SetupLink Icon

For Web Player SDK, it is required to setup the Remote Control configuration, the following configuration shows the most basic setup:

1remotecontrol: {
2 type: 'googlecast',
3 receiverVersion: 'v3'
4 receiverApplicationId: '1234ABCD',
5 },

The receiverApplicationId is an optional parameter, in the case you are configuring your own Receiver app. When this parameter is omitted Bitmovin player will us a default receiver App.

The receiverVersion parameter must be setup to 'v3' in order to use Google CAF version 3 (latest version). Using version 2 is also possible, however this version is already deprecated by Google and it is not recommended to be used.

iOS setupLink Icon

For iOS Player SDK, please refer to the BitmovinCastManagerOptions for the configuration options available for the Sender app. The following code shows a basic setup:

1func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
2// Override point for customization after application launch.
4let options = BitmovinCastManagerOptions()
5options.applicationId= "1234ABCD"
7// Initialize ChromeCast support for this application
8BitmovinCastManager.initializeCasting(options: options)
10// Initialize logging
11GCKLogger.sharedInstance().delegate = self
15return true

The BitmovinCastManagerOptions include the applicationId, which is optional. In the case there is no custom Receiver App it is not necessary to pass options as a parameter for BitmovinCastManager.initializeCasting().

A complete example for iOS and CAF can be found on our GitHub repository.

Android SetupLink Icon

For Android Player SDK, please refer to the Bitmovin CastManager documentation. A basic configuration is shown below:

1class SampleApplication : Application() {
3override fun onCreate() {
6// Initialize the BitmovinCastManager in the Application class
7// To use a custom expanded cast controller Activity use:
8// BitmovinCastManager.initialize(CustomCastControllerActivity.class);
9// Or to use a custom cast application:
10// BitmovinCastManager.initialize("APPID","MESSAGENAMESPACE");

The applicationId is passed optionally as part of the BitmovinCastManager.initialize() .

A complete example for Android and CAF can be found on our GitHub repository.

Give us feedback