Ipad MPMovieplayerController 视频加载但播放时自动暂停

发布于 2024-09-04 09:06:51 字数 1296 浏览 7 评论 0原文

我正在尝试让 MPMovieplayerController 正常工作。我加载视频一切顺利,我什至看到第一帧,但然后它会自动暂停,如果我按播放它会再次暂停。在模拟器中它工作得很好,但在 ipad 设备上却出现了问题。我什至可以搜索视频,看到我想要的帧,但没有播放任何内容。这是控制台的一些输出:

2010-06-08 22:16:13.145 app[3089:207] Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations.
[Switching to thread 12803]
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/VCH263.videodecoder" (file not found).
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/H264H2.videodecoder" (file not found).
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/MP4VH2.videodecoder" (file not found).
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/JPEGH1.videodecoder" (file not found).
2010-06-08 22:16:15.145 app[3089:207] setting file:///private/var/mobile/Applications/46CE5456-6338-4BBF-A560-DCEFF700ACE0/tmp/MediaCache/

顺便说​​一句,我在使用模拟器时没有收到这些警告。

有谁知道如何解决这个问题?

I am trying to get the MPMovieplayerController to work. I load a video everything goes wel i even see the first frame but then it automatically pauses, if i press play it pauses again. In the simulator it works perfectly but on the ipad device it gives the problem. I can even seek through the video and i see the frame i seeked to but nothing plays. This is some output from the console:

2010-06-08 22:16:13.145 app[3089:207] Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations.
[Switching to thread 12803]
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/VCH263.videodecoder" (file not found).
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/H264H2.videodecoder" (file not found).
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/MP4VH2.videodecoder" (file not found).
warning: Unable to read symbols for "/Developer/Platforms/iPhoneOS.platform/DeviceSupport/3.2 (7B367)/Symbols/System/Library/VideoDecoders/JPEGH1.videodecoder" (file not found).
2010-06-08 22:16:15.145 app[3089:207] setting file:///private/var/mobile/Applications/46CE5456-6338-4BBF-A560-DCEFF700ACE0/tmp/MediaCache/

I dont get those warning when using the simulator BTW.

Does anyone know how to fix this ?

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

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

发布评论

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

评论(5

断桥再见 2024-09-11 09:06:51

将 MPMoviePlayerController 的属性“useApplicationAudioSession”设置为“NO”即可解决该问题。

Set the property "useApplicationAudioSession" of the MPMoviePlayerController to "NO" to resolve the problem.

爱格式化 2024-09-11 09:06:51

找到了解决方案,只需重新启动 ipad,它就会再次奇怪地工作,但仅此而已:)

Found the solution just restart the ipad and it works again weird but thats it :)

阪姬 2024-09-11 09:06:51

有同样的问题。视频在模拟上可以正常播放,但在设备上却无法播放。问题要么出在 UIView 中嵌入的 HTML5 代码上,要么出在 mp4 视频压缩上,我不知道是什么解决了这个问题,但我建议您尝试两者。当我在设备上测试视频时,仍然出现错误,但视频播放得很好!

Had the same problem. Video was playing ok on simulation but not on device. The problem was either on my HTML5 code embeded in the UIView or on the mp4 video compression, I don't know what fixed it but I suggest you try both. I am still getting the error when I am testing the video on the device, but the video plays just fine!

无尽的现实 2024-09-11 09:06:51

我的设备出现问题,视频会显示但无法播放。我可以擦洗。对我来说,解决方法是我使用的是 avaudiorecorder,并且在播放视频之前释放它而不停止录音机。我的解决方案是在开始视频之前向录音机添加停止调用:

[recorder stop];
[recorder release];

I had an issue on the device where the video would show up but not play. I could scrub. The fix for me was that I was using the avaudiorecorder, and I was releasing it before playing the video without stopping the audio recorder. My solution was to add the stop call to the recorder before starting the video:

[recorder stop];
[recorder release];
尾戒 2024-09-11 09:06:51

Avaudioplayer 引起了我的问题。显然在 iPad 上 Avaudioplayer 和 Mpmovieplayercontroller 不能同时播放。

如果打开 Avaudioplayer 对象,Mpmovieplayer 将仅显示一帧并立即停止播放。

据我所知,这只发生在 iPad 设备 3.2.1 和 SDK 4.0.1 上;模拟器和 iPhone 工作正常,

我切换回音频服务,因为我需要音频播放器和电影播放器​​同时播放。

Avaudioplayer was causing my problem. Apperently on the iPad Avaudioplayer and Mpmovieplayercontroller cannot both play at the same time.

If an Avaudioplayer object is open the Mpmovieplayer will only display a frame and immediately stop playing.

As far as I can tell this only happens with iPad device 3.2.1 and SDK 4.0.1; simulators and the iPhone work fine

I switched back to Audioservices since I need Audioplayer and Movieplayer to play at the same time.

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