Note: this article is about THEOplayer 1.X.


THEOplayer offers direct support for playback of HTTP Live Streaming (HLS) on the popular digital media player Chromecast. This cast functionality allows playback of your HLS content directly on Chromecast connected devices from a Chrome browser.

Once a Chromecast device is detected on the network, a Cast icon appears in the THEOplayer control bar to let viewers know they can display their content on the TV screen. THEOplayer within the browser will then become a remote control for viewing media on Chromecast connected devices such as a TV screen.

When streaming content to a Chromecast connected device, a title and preview picture can be configured which will get shown while the device is loading the content. Chromecast has support for HLS VOD, adaptive streaming and AES-128 content protection.

Configuration options

For enabling of Chromecast support in THEOplayer, the following configuration options are available:

Attribute Required Description

In order to enable Chromecast, this attribute either takes the value true or a configuration when streaming to a custom Chromecast receiver. An example can be found below.

Attribute Description
appID The identificator of your custom Chromecast application
namespace The namespace of your custom Chromecast application
metadata (optional)

The metadata set here gets send and read out by the Chromecast application. Not all attributes are required.

Attribute Description
images The default Chromecast application displays the first image while loading and pausing.
releaseDate The publication or release date of the video stream in ISO 8601 format (YYYY-MM-DD).
releaseYear The publication or release year of the video stream.
title The title of the video stream.
type The type of the video stream. Valid values for the default Chromecast application are MOVIE, AUDIO, TV_SHOW or OTHER


Default Receiver App

Below you can find a THEOplayer Chromecast example and the relevant configuration for streaming to the default receiver app. The configured metadata information will be displayed on the Chromecast device while it is loading the content.

theoplayer = {
    configuration : {
        chromecast : true,
        metadata : {
            images : [{
                src : ''
            releaseDate : '2014-10-31',
            releaseYear : 2014,
            subtitle : 'My movie subtitle',
            title : 'My movie',
            type : 'MOVIE'

Custom Receiver App

In order to stream to a custom receiver app, a appID and namespace need to be configured. Below you find an example configuration.

theoplayer = {
    configuration : {
        chromecast : {
            appID : 'myappid',
            namespace : 'mynamespace'

Cross Origin Resource Sharing (CORS) Requirements

For adaptive media streaming of HLS to Chromecast, Chromecast requires the presence of CORS headers. In addition, you need to allow at least the following headers: Access-Control-Allow-Origin, Content-Type,Accept-Encoding, and Range. Note that the last headers are additional headers specifically for Chromecast that you may not have needed previously. Make sure all required CORS headers are being served along with all your resources (manifests, media segments, encryption keys, ..) in order to ensure smooth playback.

Support Table

This feature is supported in the Chrome browser.