iOS SDK Chromecast

Adding support for Chromecast

In order to enable chromecast, a few extra steps need to be taken. These steps are described below.

  1. Upgrade to the latest THEOplayer iOS SDK release (≥ 1.0.3)
  2. To add chromecast support the first thing you need is to include the Cast Framework. The following guide will help you adding the Cast Framework binary.
    https://developers.google.com/cast/docs/ios_sender_setup
  3. To enable chromecast on iOS the GCKCastContext shared instance should be set with a GCKCastOptions.
    let options = GCKCastOptions(receiverApplicationID: "A1B2C3D4")
    GCKCastContext.setSharedInstanceWith(options)
    or use the default THEOplayer cast options.
    THEOplayerCastHelper.setGCKCastContextSharedInstanceWithDefaultCastOptions()
  4. That 's it. When chromecast enabled devices are discovered, the player will display a chromecast button. The player also works nicely together with the Chromecast controls that are part of the Chromecast Framework, (e.g. GCKUICastButton or the mini controller).