如何在我的应用程序中播放视频
因此,我一直致力于在我的应用程序中播放一个小(> 1 MB)视频。当我越过代码中的断点时,我不断收到“SIGABRT”错误。作为新手,我还没有发现自己做错了什么。
我正在使用 Xcode 4.2。
感谢您的任何帮助。
So I have been working on getting a small (> 1 MB) video to play in my app. I keep getting a 'SIGABRT' error when I step past the break point in my code. Being the newbie, I haven't found any insight into what I am doing wrong.
I am using Xcode 4.2.
Thanks for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您使用以下代码来获取电影的 URL:
您指定
mp4
部分两次。尝试将其更改为[[NSBundle mainBundle] pathForResource:@"WhatV1" ofType:@"mp4"];
。此外,您是在设备上还是在模拟器上运行它?视频框架在模拟器上崩溃是理所当然的。尝试在 iOS 设备上进行测试。
You’re using the following code to get a URL for your movie:
You’re specifying the
mp4
portion twice. Try changing that to[[NSBundle mainBundle] pathForResource:@"WhatV1" ofType:@"mp4"];
.Additionally, are you running this on a device or on the simulator? Video frameworks crashing on the simulator are par for the course. Try testing on an iOS device.
不要将扩展名放在 pathForResource 参数中。
Don't put the extension in your pathForResource parameter.