Search code examples
iosmpmovieplayercontrollerairplay

MPMoviePlayerController custom airplay button


I have a MPMoviePlayerController with custom controls. I wanted to add a Button to this custom view that would send the video via AirPlay. Is this possible? i have read the apple documentation on MPMoviePlayerController but did not found anything on this.


Solution

  • solved it with this:

    MPVolumeView *volumeView = [ [MPVolumeView alloc] init] ;
    [volumeView setRouteButtonImage:[UIImage imageNamed:@"ICAirPlay"] forState:UIControlStateNormal];
    [volumeView sizeToFit];