使用MPMoviePlayerController或AVPlayer(iOS)播放M4V保护内容 [英] Playing M4V Protected Content with MPMoviePlayerController or AVPlayer (iOS)

查看:178
本文介绍了使用MPMoviePlayerController或AVPlayer(iOS)播放M4V保护内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法让MPMoviePlayerController(甚至更低级别像AVPlayer)从iTunes Store保护M4V文件?

Is there a way to have the MPMoviePlayerController (or even something lower level like AVPlayer) play protected M4V files from the iTunes Store?

使用官方iTunes API :
http://www.apple .com / itunes / affiliates / resources / documentation / itunes-store-web-service-search-api.html

Using the official iTunes API here: http://www.apple.com/itunes/affiliates/resources/documentation/itunes-store-web-service-search-api.html

我可以获得previewURL电影,电视节目和音乐视频。音乐视频似乎不受保护,但电影和电视节目是。

I can get a "previewURL" for movies, TV shows and music videos. Music videos don't appear to be protected, but movies and TV shows are.

例如,这是The Beatles的音乐视频的预览网址纪录片,但无论如何):
http://a809.v.phobos.apple.com/us/r1000/006/Video/72/fe/52/mzm.bxhrrlns..640x480.h264lc.upm4v

For example, this is the preview URL for a music video from The Beatles (actually a documentary, but whatever): http://a809.v.phobos.apple.com/us/r1000/006/Video/72/fe/52/mzm.bxhrrlns..640x480.h264lc.u.p.m4v

这是The Simpsons的剧集的预览网址:
http://a911.v.phobos.apple.com/us/r1000/017/ Video / ec / cc / cf / mzi.mnuqbbcl..640x480.h264lc.d2.p.m4v

And this is the preview URL for an episode of The Simpsons: http://a911.v.phobos.apple.com/us/r1000/017/Video/ec/cc/cf/mzi.mnuqbbcl..640x480.h264lc.d2.p.m4v

音乐视频将使用MPMoviePlayerController,但视频为辛普森一家不玩。 (与MPMoviePlayerViewController一起使用时,视图控制器以模态显示,然后立即关闭,无需任何用户交互。)

The music video will play just fine using an MPMoviePlayerController, but the video for the The Simpsons does not play at all. (When used with an MPMoviePlayerViewController, the view controller is displayed modally then immediately dismissed without any user interaction.)

如果您在QuickTime Pro中查看这两个网址,只有说明的区别是第二个被列为受保护的,这将导致一个假设MPMoviePlayerController不能播放受保护的内容,即使该内容直接从苹果。

If you look at both of those URLs in QuickTime Pro, the only telling difference is that the second one is listed as "Protected", which would lead one to assume that the MPMoviePlayerController cannot play protected content, even if that content is coming straight from Apple.

在文档中的支持的格式部分下,M4V没有专门列出,但它当然有效。我找不到任何引用受保护内容的文档。

Under the "Supported Formats" section in the documentation, M4V isn't specifically listed but it certainly works. I can't find any documentation that references protected content.

只要好奇,如果有人知道在应用程序中或通过其他方式播放此内容的方式。 (调用[UIApplication ... openURL]也不工作,因为Mobile Safari不会播放内容。)

Was just curious if anyone knew of a way to play this content either within an application or through some other means. (Calling [UIApplication... openURL] doesn't work either, as Mobile Safari won't play the content either.)

这是在iOS 4.x.

This is on iOS 4.x.

谢谢。

推荐答案

恐怕苹果希望我们在我们自己的应用程序。

I am afraid that Apple does not want us to do that in our own apps.

DRMed MPEG4视频对于所有多媒体iOS SDK级别(媒体播放器框架以及avfoundation框架)来说都是一种禁忌。

DRMed MPEG4 video seems to be a no-go for all multimedia iOS SDK levels (mediaplayer framework as well as avfoundation framework).

阅读此博客一个证明你完全相同的经验,你自己已经。

Read this blog for a proof of the exact same experiences you made yourself already.

只是为了确保人们不会错误,并与橙子混合苹果。这只适用于受DRM保护的视频文件,与保护流无关 - AES-128加密的HTTP流(m3u8)完全兼容iOS和可能的所有级别( MPMoviePlayerController 以及 AVPlayer )。

And just for making sure that people do not get this wrong and mix apples with oranges. This does only apply to DRM protected video files and has nothing to do with protected streaming - AES-128 encrypted HTTP-streaming (m3u8) is perfectly compatible with iOS and possible on all levels (MPMoviePlayerController as well as AVPlayer).

这篇关于使用MPMoviePlayerController或AVPlayer(iOS)播放M4V保护内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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