开发者

MPMoviePlayerControll doesn't detect touch when in fullscreen mode

开发者 https://www.devze.com 2023-02-09 02:28 出处:网络
I have subclassed MPMoviePlayerController... @interface CustomMoviePlayerController : UIViewController

I have subclassed MPMoviePlayerController...

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

I also have iPad application (with sp开发者_如何学GolitView). 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];


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消