无法在 Safari 或 UIWebView 中通过 HTTPS 查看 Quicktime 影片
我试图让我的 iPhone 应用程序除了 HTTP 之外还可以使用 HTTPS,但使用 UIWebView 或 MPMoviePlayerController 查看 Quicktime MOV 文件似乎无法通过 HTTPS 工作。我得到“这部电影无法播放”。我尝试在 Safari 中消除我的应用程序的问题,但同样的事情发生了。如果我使用 HTTP,它工作得很好。
该线程有类似的讨论,但没有解决方案: http://discussions.apple.com/ thread.jspa?messageID=12908818
我没有使用自签名证书;我的机器有一个注册的 SSL 证书,我使用 iPhone 配置实用程序将 GoDaddy 中间证书和普通证书推送到我的 iPad (4.2.1)。我验证了此方法有效,因为在访问受保护的网站时,Safari 不会像以前那样提示我有关证书的信息。我可以使用普通浏览器(例如 OSX 上的 FF 或 Safari)通过 HTTPS 观看电影,但 iOS 上不行。它似乎也可以在模拟器中运行,但我已经尝试过 iPhone 4.1 和 iPad 4.2.1。
有什么解决方法可以让我通过 HTTPS 查看视频吗?
I am trying to get my iPhone application to work with HTTPS in addition to HTTP, but using UIWebView or MPMoviePlayerController to view a Quicktime MOV file doesn't seem to work over HTTPS. I get "This movie could not be played". I tried in Safari to eliminate my app as being the problem, and the same thing happened. If I use HTTP, it works fine.
This thread has a similar discussion, but no resolution: http://discussions.apple.com/thread.jspa?messageID=12908818
I am not using self-signed certs; my machine has a registered SSL cert, and I pushed both the GoDaddy intermediate cert and the normal cert to my iPad (4.2.1) using iPhone configuration utility. I verified this works because Safari doesn't prompt me about the certificate when visiting the secured site, like it would before. I can view the movie over HTTPS using normal browsers such as FF or Safari on OSX, just not iOS. It also appears to work in the simulator as well, but I have tried both iPhone 4.1 and iPad 4.2.1.
Is there any workaround that will let me view video over HTTPS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
遇到完全相同的问题和症状后,我能够访问 此处提到的 Apple 开发者论坛线程
Apple 线程的结果是,您必须在服务器上安装有效的中间证书。仅安装服务器证书是不够的。
我已经使用 Mac OS X 10.6 Server 对此进行了测试。我安装了服务器证书,虽然桌面浏览器能够通过 HTTPS 传输视频,但 iOS 设备(iPhone 和 iPad)均出现“无法播放此影片”错误。
安装中级证书解决了该问题。
其他设备,如 Android 手机和平板电脑以及 RIM PowerBook(通过 Flash)在没有中间证书的情况下播放视频没有问题。我怀疑这是 iOS 对其安全性过于热心的情况,即使不是错误,也是“功能”;-)
我不是 PKI 专家,所以我无法告诉你为什么会这样。也许另一个贡献者可以解释这背后的 PKI 巫毒。
After experiencing the very same problem and symptoms, I was able to gain access to the Apple Developer Forum thread mentioned here
The upshot of the Apple thread is that you must have a valid Intermediate Certificate installed on the server. It is not enough to have only the server certificate installed.
I have tested this with Mac OS X 10.6 Server. I installed the server certificate and while desktop browsers were able to stream a video over HTTPS, iOS devices (iPhone and iPad) both gave the "This movie could not be played" error.
Installing the Intermediate Certificate fixed the problem.
Other devices, like Android phones and tablets, and RIM PowerBook (via Flash) had no problems playing the video without the Intermediate Certificate. I suspect it is a case of iOS being overzealous with its security, a "Feature" if not a bug ;-)
I'm not a PKI expert, so I cannot tell you why this works. Perhaps another contributor can explain the PKI voodoo behind this.
将此标记为已解决。苹果开发上的这个并行线程。论坛:
https://devforums.apple.com/message/361209#361209
Marking this as resolved. This parallel thread on apple dev. forums:
https://devforums.apple.com/message/361209#361209