0

I have subclassed MPMoviePlayerController...

@interface CustomMoviePlayerController : UIViewController 
{   
    NSURL *movieUrlPath;
    MPMoviePlayerController *mp;    
...

I also have iPad application (with splitView). On the right side in the center I load this player and start playing movie...

cPlayer = [[CustomMoviePlayerController alloc] initWithUrlPath:title];          
    [self.view addSubview:cPlayer.view];        
    [cPlayer readyPlayer:title];

I have touchBegin/End methods that detect touch on this player and it works, but when I set player in fullscreen it stop detect toucher. Why touches stop detecting in fullscreen?

[cPlayer.mp setFullscreen:YES animated:YES];
1110
  • 7,829
  • 55
  • 176
  • 334

1 Answers1

4

When the player enters fullscreen mode, it's no longer attached to the view, but to a new window.

You could listen to MPMoviePlayerDidEnterFullscreenNotification and MPMoviePlayerDidExitFullscreenNotification to do stuff when the player enters fullscreen mode. You could get the player window with [[UIApplication sharedApplication] keyWindow] and add an overlay view with gestures recognizers.

Jilouc
  • 12,684
  • 4
  • 46
  • 43
  • Thnaks this saved the day :) ... [cPlayer.mp setFullscreen:YES animated:YES]; UIView *v = [[UIApplication sharedApplication] keyWindow]; [v addSubview:myOverlayChannelPicker]; – 1110 Feb 04 '11 at 14:46