TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Commercial |
ReleasedLast Release | Feb 2018 |
Maintained by Gabi Dobocan, Ovidiu D. Nitan.
Depends on: | |
Veeplay | >= 0 |
google-cast-sdk | ~> 2.10.4 |
This plugin enables the iOS Veeplay Media Player to connect and send playback to the Google Chromecast.
To install:
Add the following line to your Podfile:
pod "VeeplayChromecast"
Alternatively, if installing without CocoaPods, get the latest static library, header files and assets from the repository. Also, install the latest version of the Google Cast iOS Sender API library.
Import the VeeplayChromecastManager header file:
#import "VeeplayChromecastManager.h"
To start the plugin, set your Chromecast application id on the shared instance of APSChromeCastManager
:
[APSChromecastManager sharedInstance].chromecastAppId = @"appid"
You can display the Chromecast playback control in the control bar by adding chromecast
into the components array, under the controls
section in your JSON configuration file:
{
"content": [
"url": "http://......",
"autoplay": true,
"controls": {
"components": [
"playback",
"totalTime",
"slider",
"currentTime",
"chromecast"
]
}
]
}
Also, you can configure this programatically by adding kAPSChromecastControl to the controlsParameters
property on APSMediaUnit
:
unit.controlsParameters = @{kAPSControlsComponents: @(APSPlaybackControl|APSCurrentTimeControl|APSTimeSliderControl|APSTotalTimeControl|kAPSChromecastControl|APSFullScreenControl)};