17

I need to find the MPMovieplayerController is playing or not with condition.

Check the Condition button click event....!

Any one help with me us....!

Thanks....!

Dinesh
  • 6,500
  • 10
  • 42
  • 77

2 Answers2

44

MPMovieplayerController is having playbackState property. On button click event you can do like

-(IBAction)btnClicked:(id)sender
{
    if(yourMoviePlayerObject.playbackState == MPMoviePlaybackStatePlaying)
        NSLog(@"Yes Playing");
    else
        NSLog(@"Not Playing");
}
Janak Nirmal
  • 22,706
  • 18
  • 63
  • 99
  • **Note** the common solution is to register for a change within the playback state instead for detecting it (see the documentation on the MPMoviePlayerPlaybackStateDidChange notification). – Till Mar 31 '12 at 13:16
5

This is clearly stated in the documentation

borrrden
  • 33,256
  • 8
  • 74
  • 109