/CTChromecast

Drop in replacement for MPMoviePlayerController to support casting videos to Chromecast

Primary LanguageObjective-CMIT LicenseMIT

CTChromecast

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

Usage

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

Example

Demo

Build and run the Example project in Xcode to see a demo movie player.

Limitations

  • Currently does not support playing local files
  • Does not support the fullscreen transition on iPad.

Contact

David Fumberger @djfumberger

License

CTChromecast is available under the MIT license. See the LICENSE file for more info.