views:

156

answers:

3

When you launch a video and IMMEDIATELY press "Done" the MPMoviePlayerController will exit, however the video still plays in the background (you can hear the audio). It works fine if you allow the video to begin playing before you hit the "Done" button.

Does anybody know a workaround for this?

+1  A: 

Try calling stop on your MPMoviePlayerController instance when the view controller that spawned the movie receives its viewDidAppear: (or viewWillAppear:) methods

Jasarien
The player is already stopped and is released correctly. stop causes the window to go away, which does happen.I have tried the nasty approach of using class dump functions to try and pause on start then resume when receiving _playStateDidChange but this didn't work
Sam
A: 

While, so far, I've also found MPMoviePlayerController somewhat erratic, I imagine just releasing the object (after listening to a MPMoviePlayerPlaybackDidFinishNotification) would help.

Felixyz
A: 

Update: This seems to be a known 3.0 bug. I was unable to find a workaround

http://www.iphonedevsdk.com/forum/iphone-sdk-development-advanced-discussion/15768-mpmovieplayer-video-via-url-glitch.html

Sam
Update: if you follow this link now somebody seems to have found a solution at the bottom.
Sam