2

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!

4

2 に答える 2

1

このスレッドでは、Ipad MPMovieplayerController のビデオが読み込まれますが、再生時に自動的に一時停止されplayer.useApplicationAudioSession = NO;ます。試してみる!

于 2010-11-27T22:23:52.463 に答える
0

これは、iPad OS 3.2.x の MPMoviePlayerController でよくあるバグです。

アプリを数回実行した後、ムービーの再生に失敗し、スクラバーを動かすとフレームが表示されますが、一度に複数のフレームでビデオを再生することはできません!

さらに、一部のアプリが通常よりも頻繁にメモリ警告を受け取り始めるため、大量のメモリ消費に気付く場合があります。

最後に、これがシステムの問題 (特にアプリの問題ではない) であることを証明することができます。たとえば、「ABC ニュース」など、同じフレームワークを使用する他のアプリを実行しようとします。この問題は、たとえば UIWebView を使用する他のアプリ (You Tube ビデオに基づくアプリなど) では見られません。

唯一の解決策は、デバイスを再起動することです。これは、次の再起動まで機能します。

カルロ

于 2010-10-18T09:47:53.167 に答える