CTChromecast
is a collection of classes to make integrating Chromecast support into an existing iOS video player easier.
CTChromecastMoviePlayerController
provides a drop in replacement for MPMoviePlayerController
to support casting videos to Chromecast
Creation of a movie player can be done in the same way a MPMoviePlayerController is used
CTChromecastMoviePlayerController *player = [[CTChromecastMoviePlayerController alloc] initWithContentURL: url];
player.view.frame = self.view.bounds;
[self.view addSubview: player.view];
[player play];
When chromecast device(s) are detected a button allowing for device selection will be shown along side the volume sider
Build and run the Example
project in Xcode to see a demo movie player.
- Currently does not support playing local files
- Does not support the fullscreen transition on iPad.
CTChromecast is available under the MIT license. See the LICENSE file for more info.