Adding support for Chromecast
In order to enable chromecast, a few extra steps need to be taken. These steps are described below.
- Upgrade to the latest THEOplayer iOS SDK release (≥ 1.0.3)
- 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.
Xcode 10 Warning: If developing using Xcode 10 and targeting iOS devices running iOS 12 or higher, the "Access WiFi Information" capability is required in order to discover and connect to Cast devices.
- To enable chromecast on iOS the GCKCastContext shared instance should be set with a GCKCastOptions.
let options = GCKCastOptions(receiverApplicationID: "A1B2C3D4")or use the default THEOplayer cast options.
- 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).