Iphone disable ear headphone button
I'm using MPMoviePlayerController to play a video when application starts. The problem is that when i press the earmic button the movies pauses. I can't use method resume in the MPMoviePlayerController because the application will cr开发者_如何学Cash and i don't know how to disable the button function.
Thanks, Raxvan
I'm not sure how to prevent it from responding to presses of the play/pause button on the headphone controls, but you should be able to receive notification of the pause via the MPMoviePlayerPlaybackStateDidChangeNotification
notification, and then use the play
method to resume.
See the MPMoviePlayerController class reference and the MPMediaPlayback protocol reference for details.
精彩评论