无法在 MPMoviePlayerViewController 中查看已解析的 m4v 链接
我在这里解析这个 xml 文件: http://itunes.apple.com /us/rss/toptvepisodes/limit=10/xml。
我从 xml 文件获取预览链接,但由于某种原因,该 url 无法在我的 MPMovieViewController 中播放。预览链接示例如下:http://a989.v.phobos.apple.com/us/r1000/032/Video/26/5c/7d/mzm.aezfptde..640x480.h264lc.d2 .p.m4v。
如果您能告诉我为什么这不能在我的 MPMovieViewController 中播放,我将非常感激。
附:这是我的代码:
if (section == 2) {
if (row == 0) {
MPMoviePlayerViewController *controller = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:previewlink]];
NSLog(@"%@", previewlink);
[self.navigationController presentMoviePlayerViewControllerAnimated:controller];
}
I am parsing this xml file here: http://itunes.apple.com/us/rss/toptvepisodes/limit=10/xml.
I am getting the preview link from the xml file, but for some reason the url wont play in my MPMovieViewController. An example preview link would be this: http://a989.v.phobos.apple.com/us/r1000/032/Video/26/5c/7d/mzm.aezfptde..640x480.h264lc.d2.p.m4v.
I would really appreciate it if you could tell me why this will not play in my MPMovieViewController.
ps. Here is my code:
if (section == 2) {
if (row == 0) {
MPMoviePlayerViewController *controller = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:previewlink]];
NSLog(@"%@", previewlink);
[self.navigationController presentMoviePlayerViewControllerAnimated:controller];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题,显然 Apple 不允许通过 SDK 显示来自 iTunes 的受保护视频。检查此答案
I'm having the same issue, apparently Apple's doesn't allow to show protected videos from iTunes from the SDK. Check this answer