Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MPMoviePlayerController play/pause toggle issue

I have used MPMoviePlayerController in my application to play selected video. There is also facility to start video from different location like from 10 min, 20 min, 40 min etc.

Problem in iOS 7:

The problem is when video is played I am able to pause it but it does not resume after pausing. And also the pause button does not turn into play button. After clicking pause button none of the notification like "MPMoviePlayerPlaybackStateDidChangeNotification" get invoked. And same problem occurs when video is playing in fullscreen mode.

Problem in iOS 6:

Here only problem is that pause button does not turn into play button. Here video pause and resume works properly in fullscreenmode also.

one strange behaviour:

For one video when I play it from 40 min it just works perfectly. None of the above issues occur for it. But same video does not work when played from starting or 10,20 min durations.

I have searched a lot but I found only one post here related to this issue. But this solution is not working for me.

Does anybody know how to solve this?

like image 423
ViruMax Avatar asked Jun 24 '14 07:06

ViruMax


1 Answers

Use AVPlayer as MPMoviePlayer is now deprecated.

like image 89
ViruMax Avatar answered Oct 29 '22 16:10

ViruMax