iPad MoviePlayer 拒绝播放视频,直到设备重新启动

发布于 2024-09-26 01:09:31 字数 946 浏览 3 评论 0原文

我在发货的 iPad/iPhone 应用程序中遇到了一个非常奇怪的错误,我无法修复/追踪。

我的应用程序在标准 MPMoviePlayerController 中播放视频,但隐藏了界面以及我自己的播放和停止按钮。

这工作正常,但有时,使用几次后,我的应用程序拒绝播放任何进一步的视频。这种情况仅发生在 iPad(iOS 3.2.x 中)上,在 iPhone(iOS 4.x 中)上一切正常。奇怪的是,即使我退出应用程序,再次启动它后它仍然拒绝播放视频。它不会保存视频状态,并且会重新加载视频。只有在我重新启动 iPad 后,它才开始工作。

如果我的 iPad 处于“不播放视频”状态,我可以从 Xcode 调试我的应用程序,除了电影不播放而是无限期暂停之外,没有任何不同。

loadState 属性报告为 MPMovieLoadStatePlayable,但 playbackState 属性仍保持 MPMoviePlaybackStatePaused,无论我向其发送“播放”多少次“ 命令。

我无法在我的应用程序中执行任何操作(例如选择另一个视频)来使视频再次正常工作。

这些视频的分辨率为 600 x 400 H.264,并且在大于全屏的视图中播放,因此我可以在 iPad 上全屏显示它们(没有黑条),而无需 iPhone/iPad 的两个不同版本,因为这些设备具有不同的长宽比。

有足够的 RAM 可用(> 60 MB)。其他播放视频的应用程序(iTunes/YouTube/streamToMe)可以正常播放,但使用标准的 MoviePlayer 界面/控件,当然不能播放超过全屏的内容。

这一切让我怀疑这是苹果的一个错误。我还没有在 iOS 的 beta 版本中测试过这一点,如果是的话我也无法谈论它。

有人见过这种行为吗?并有可能的解决方案吗?谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

红焚 2024-10-03 01:09:31

这是 iPad OS 3.2.x 上 MPMoviePlayerController 的一个非常常见的错误。

任何应用程序运行几次后,电影都无法播放,如果您移动滑块,您可以看到帧,但仍然无法播放视频超过一次一帧!

此外,您可能会注意到内存消耗很大,因为某些应用程序开始比平常更频繁地收到内存警告。

最后,您可以尝试运行使用相同框架的其他应用程序(例如“ABC News”)来证明这是一个系统问题(而不是具体的应用程序问题)。例如,使用 UIWebView 的其他应用程序(例如基于 YouTube 视频的应用程序)不会出现这些问题。

唯一的解决方案是重新启动设备。这将一直有效,直到下次重新启动为止。

卡洛

This is a quite common bug with MPMoviePlayerController on iPad OS 3.2.x

After a few runs of any app, the movies fail to play and if you move the scrubber you can see the frames but you can't still play the video for more than one frame at a time!

Besides you may notice a great memory consumption, due to the fact that some apps start receiving memory warnings more often than normal.

Finally you may prove this is a system problem (and not specifically an app problem) buy trying to run other apps that use the same framework, e.g. "ABC News". The issues cannot be seen with other apps that use UIWebView for instance (e.g. the ones based on You Tube videos).

The only solution is to re-boot the device. This works until next reboot.

Carlo

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文