Radiant Media Player

Google Cast support



Documentation sections


Google Cast™ support in Radiant Media Player

Google Cast badge
Google Cast and the Google Cast badge are trademarks of Google Inc.

Google Cast™ is a protocol allowing media data to be sent from an emitting (or casting) device to a receiving device (example a TV). This is generally referred to as "second screen experience" in the industry. The emitting/casting device can be a notebook or an Android tablet for example. One can then watch video content on a TV or larger screen while still being able to control the content through the casting device.

Radiant Media Player support in-player Google Cast casting from Google Chrome (Desktop, Android) and other Cast-compatible browsers to any Google Cast compatible receiving device (like Chromecast or Android TV). Our implementation is based on Google Cast SDK v3. Information on Google Cast SDK can be found here.

When a Google Cast receiver is detected the player will automatically display a casting icon (as part of a player module). A dedicated user interface has been designed within Radiant Media Player to support remote controlling of media content when casting is engaged.

Since Radiant Media Player 4.3.0 we have published a custom receiver application with Google in order to support advanced features like casting of DRM (Widevine or ClearKey) content with DASH or HLS, live streaming and to fine tune the casting experience.


Supported receiving devices

  • Chromecast
  • Android TV
  • Any Google Cast™ compatible receiving device

Assistance for setting up a Chromecast device can be found here.


Supported emitting devices

  • Google Chrome 32+ on Desktop/laptop: Windows, Linux & macOS
  • Google Chrome 51+ on Chrome for Android
  • Vivaldi browser 1.6+

Version 3 of Google Cast SDK does not currently support casting from Chrome on iOS. This should be enabled in a future Google Cast SDK release.


Supported features

  • In-player casting from desktop and mobile Chrome & Vivaldi
  • Remote controlling
  • Adaptive bitrate with HLS, DASH or progressive download
  • DASH & HLS DRM (Widevine or ClearKey) & SAMPLE AES/AES-128 HLS
  • Multi-language WebVTT captions/subtitles casting
  • Live and on-demand video support
  • Audio-only support
  • Playlist
  • Related content
  • Player API

Google Cast player settings

Radiant Media Player will automatically detect an in-range Google Cast receiver and will provide in-player casting options when needed.

The following player settings are available:

googleCast: Boolean

Enables or not Google Cast detection. Default: true. This setting is not supported and automatically set to false for the following features: 360 video.

googleCastPoster: String

By default the player uses the frame from the poster setting to be displayed on the Google Cast receiver when casting is engaged. Using the googleCastPoster setting you can provide a different poster frame URL for the Google Cast receiver. Default: ''.

googleCastReceiverAppId: String

Google Cast receiver app id. By default Radiant Media Player uses the default receiver application from Google which works well for common use-cases including support for HLS & DASH. For DASH or HLS DRM, live streaming and to support custom cast-related settings we have published a custom receiver application with Google. The application ID for this customer receiver is B17187F0. It will automatically be picked by the player when eligible settings are provided to the player. Default: ''.

googleCastLicenseUrl: String

DASH or HLS DRM license URL to be used on the receiver application. Default: ''.

googleCastLicenseCustomData: String

Custom license data for DASH or HLS DRM on the receiver application. Default: ''. See Google docs for more information.

googleCastProtectionSystem: String

Preferred Protection System to use for decrypting content. Available values are 'WIDEVINE' or 'CLEARKEY'.Default: '' which means the receiving application will auto-guess.

googleCastInitialBandwidth: Number

Initial bandwidth in bits per second for ABR logic on receiving application. Default: 2000000.

googleCastMetadataType: String

Possible types of media metadata. Availables values are 'MOVIE', 'TV_SHOW' or 'GENERIC'. Default: 'GENERIC'. See Google docs for more information.

googleCastContentTitle: String

The content title to be displayed in the receiver application. Default: ''. If not set and contentTitle setting is available, contentTitle will be used.

googleCastReleaseDate: String

ISO 8601 date and/or time when the content was released, e.g. 2016-02-10. Default: ''. This information will be displayed underneath the googleCastContentTitle in the receiving application.

Additionally casted WebVTT captions can be customised. See our closed captions documentation for more information.


About casting of video ads

It is to be noted that neither the Cast SDK v3 nor the IMA SDK v3 from Google officially support video ads casting from HTML5 video. As such Radiant Media Player will not render video ads on the receiver. Radiant Media Player will display video ads on the emitting device while not in casting mode. When casting is engaged video ads will be discarded on the sender device and will not render on the receiver.


Player code example for casting DASH Widevine DRM content

<script src="https://cdn.radiantmediatechs.com/rmp/4.6.11/js/rmp.min.js" 
  integrity="sha384-9iFjOzbzaBqrr5wIQcHNGTcOU9sD/6mtFwlc8RIZS2yh8+dAD3Qobk3VxloK+us8"
  crossorigin="anonymous"></script>
<div id="rmpPlayer"></div>
<script>
  var bitrates = {
    dash: 'https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel-dash-widevine.ism/.mpd'
  };
  var settings = { 
    licenseKey: 'your-license-key',
    bitrates: bitrates,
    width: 854,
    height: 364,
    poster: 'https://www.radiantmediaplayer.com/images/poster-rmp-showcase.jpg',
    dashDrm: {
      servers: {
        'com.widevine.alpha': 'https://widevine-proxy.appspot.com/proxy'
      }
    },
    // Here we set our Google Cast options
    googleCast: true,
    googleCastReceiverAppId: 'B17187F0',
    googleCastLicenseUrl: 'https://widevine-proxy.appspot.com/proxy',
    googleCastProtectionSystem: 'WIDEVINE',
    googleCastMetadataType: 'MOVIE',
    googleCastContentTitle: 'TOS with DASH DRM',
    googleCastReleaseDate: '2017-06-01'
  };
  var elementID = 'rmpPlayer';
  var rmp = new RadiantMP(elementID);
  rmp.init(settings);
</script>

Player API

When casting is engaged two player exist at the same time: the remote player which lives in the receiver application and the local player which lives in the sender application. When a media is successfully cast from the sender application to the receiver application the local player is paused and its UI controls the remote player. The player API can be used to control the remote player when casting is engaged.

Supported player API events include

  • play
  • pause
  • playing
  • waiting
  • timeupdate
  • durationchange
  • volumechange
  • castmedialoaded: media has been successfully loaded on receiving device
  • castmediaerror: media could not be loaded on receiving device - current casting session ends

Supported player API methods include

  • play
  • pause
  • stop
  • getPaused
  • getVolume
  • setVolume
  • getMute
  • setMute
  • seekTo
  • getCurrentTime
  • getDuration
  • setSrc
  • getCastUrl: returns a String representing the currently cast URL. null is returned if this value is not available
  • getCastMediaLoaded: returns a Boolean stating if a media is loaded on the receiving application. null is returned if this value is not available
  • getCastConnected: returns a Boolean stating if the remote player is currently connected to the sender application. Note that in some instances (like when a media ends on the receiving application) the remote player can be connected to the sender application but with no media loaded within it. null is returned if this value is not available
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License.