使用MPMoviePlayerController从iTunes播放电影? [英] Playing Movies from ITunes using MPMoviePlayerController?

查看:169
本文介绍了使用MPMoviePlayerController从iTunes播放电影?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试播放从iTunes获得的电影。电影通过文件共享/ iTunes传输放置在我的沙盒中。该应用程序使用 MPMoviePlayerController MPMoviePlayerViewController 。我可以使用其中任何一种,但在iTunes电影上都没有正常工作。

I'm trying to play a movie acquired from iTunes. The movie was placed in my sandbox via File Sharing/iTunes Transfer. The application is using MPMoviePlayerController or MPMoviePlayerViewController. I can use either, but neither have work properly on an iTunes movie.

以下是我观察的内容:


  • 测试电影

  • Test Movie


  • 从Hillegass获取(第20章) - 确定[1]

  • 从Apple的样本中获取 - 确定[2]

  • Apple视频应用 - 确定

iTunes电影


  • 无视频

  • 无音频

  • 我的申请中无声失败[3]

  • 希勒加斯样本中的无声失败[3]

  • 无声Apple的样本失败[3]

  • Apple视频应用 - 确定

  • No video
  • No audio
  • Silent failure in my application [3]
  • Silent failure in Hillegass' sample [3]
  • Silent failure in Apple's sample [3]
  • Apple Video app - OK

当视图启动时,我得到一个黑屏,并且PLAY按钮可用。点击 PLAY 会导致玩家尝试操作,但失败(?)并再次显示PLAY按钮。

When the view is launched, I get a black screen and the PLAY button is available. Tapping PLAY causes the player to attempt the operation, but it fails (?) and the PLAY button is shown again.

检查状态电影控制器显示它已准备就绪。点击 PLAY 时,状态进入播放状态,然后立即暂停。尝试 PLAY 再次重复循环。

Checking the state of the movie controller shows it is Ready. When PLAY is tapped, the state goes to Playing and then immediately to paused. Trying to PLAY again repeats the cycle.

在就绪→播放→暂停转换期间,我获取已完成的通知,我从其他通知中收到错误。

During the Ready → Playing → Paused transitions, I do not get a finished notification, and I do not get an error from other notifications.

我认为方向可能是问题,但是转动或更改定向模式崩溃Xcode。

I thought orientation might be the issue, but rotating or changing the orientation mode crashes Xcode.

Apple的文档没有提及iTunes电影,受保护内容或DRM的任何特殊内容(可能我错过了相关文档)。这似乎是一个没有实际意义的点,因为电影是从iTunes购买的,该设备是经过授权的(所有都在同一帐户下),而且我是被许可人。

Apple's documentation does not mention anything special for iTunes movies, protected content, or DRM (perhaps I missed a relevant document). It seems like a moot point, since the movie was purchased from iTunes, the device is authorized (all under the same account), and I am the licensee.

它的价值, NSZombieEnabled 是YES,所以我不相信我会破坏内存(Apple和Hillegass的样本中可能没有内存错误)。

For what its worth, NSZombieEnabled is YES, so I don't believe I am smashing memory (memory errors are probably not present in Apple's and Hillegass' samples).

关于我可能做错什么或我应该如何播放我购买的iTunes电影的任何想法?

Any ideas on what I might be doing wrong or how I should play an iTunes movie I purchased?

参考文献

[1] http://www.bignerdranch.com/book/iphone_programming_the_big_nerd_ranch_guide

[2] http://developer.apple.com/library/ios/#samplecode/MoviePlayer_iPhone/Introduction /Intro.html

[3] http://www.apple .com / itunes / charts / tv-shows / the-simpsons / lost-verizon /

推荐答案

DRM保护是问题所在。

The DRM protection is the problem.

Apple不允许在MPMoviePlayerController中播放受DRM保护的音乐或iTunes中的视频(包括预览)。

另请参阅 Stackoverflow

关于崩溃:您可以发布一些代码。

Regarding the crash: You may post some code.

这篇关于使用MPMoviePlayerController从iTunes播放电影?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆