How to handle next and previous button in the MPMoviePlayerViewController?

504 views Asked by At

I am getting all events of the player by this notification MPMoviePlayerPlaybackStateDidChange, but not getting the next/previous event/action.

Can we handle all actions with the Now playing info in the background of application with this player?

Please let me know.

Thanks

1

There are 1 answers

3
Yogesh Mv On

MPMoviePlayerController, post only MPMoviePlayerPlaybackStateDidChangeNotification even when stop, previous and next buttons are clicked. You cannot find directly which button is clicked.

For this you can create your own custom control with custom button actions, from this you can detect easily which button is clicked.

NOTE: Before creating the custom control you must set the player's controlStyle property to MPMovieControlStyleNone to hide the default controls.