issue with seeking forward/backward using MPMoviePlayerController in iOS4
I have a weird issue with the MPMoviePlayerController in iOS.
I have a M开发者_如何学GoPMoviePlayerController with control style none. Added my own UISlider to seek forward/backward in the movie.
Set up notifications to see a change in the playback state.
After setting player.currentPlaybackTime to a new value the playbackstate goes to MPMoviePlaybackStateSeekingForward or MPMoviePlaybackStateSeekingBackward and stays in that state.
I would expect that when the seeking stops (new position found), and the player continues to play normally the playbackstate would go back to MPMoviePlaybachStatePlaying but it doesn't.
Is this normal behaviour or am I missing something?
The problem is with UISlider's property continuous. Set it to no and you will be notified when the state will change from Forward/Backward to Playing.
self.playerControlsView.slider.continuous = NO;
The issue i guess is that when the continuous property is set to YES. The slider will continue the action of sliding the user is providing it and not trigger the state change. And hence the state remains forward/backward. I am not very sure about this but the answer is somewhere on these lines.
Hope this helps someone :)
精彩评论