I have a very strange bug in a shipping iPad/iPhone app that I can't fix/track down.
My app plays video in a standard MPMoviePlayerController
but with the interface hidden and my own buttons to play and stop.
That works fine but sometimes, after a few times of use, my app refuses to play any further video. This happens only on the iPad (in iOS 3.2.x), on the iPhone (in iOS 4.x) everything works fine all the time. Strangely enough, even after I quit my app, after I start it again it still refuses to play video. It doesn't save the video state, and it does reload the video. Only after I restart the iPad it starts working again.
If my iPad is in a "don't play video" state I can debug my app from Xcode and there isn't anything different other than the fact that the movie doesn't play but stays paused indefinitely.
The loadState
property reports as MPMovieLoadStatePlayable
, but the playbackState
property stays MPMoviePlaybackStatePaused
however many times I sent it a "play" command.
There is nothing I can do in my app (like choosing another video) to make the video work again.
The videos are 600 x 400 H.264 and are played in a view that is larger than full screen so I can show them full screen (without black bars) on the iPad without needing two different versions for iphone/ipad, because the devices have different aspect ratios.
There is plenty of RAM available (> 60 MB). Other apps that play video (iTunes/YouTube/streamToMe) play fine, but use the standard MoviePlayer interface/controls and don't of course don't play bigger than full screen.
This all makes me suspect this is an Apple bug. I haven't yet tested this in a beta version of iOS, and if so I couldn't talk about it either.
Anybody seen this behaviour? And has a possible solution? Thanks!