Cannot view Quicktime movies over HTTPS in Safari or UIWebView(无法在 Safari 或 UIWebView 中通过 HTTPS 观看 Quicktime 电影)
问题描述
我正在尝试让我的 iPhone 应用程序在 HTTP 之外使用 HTTPS,但使用 UIWebView 或 MPMoviePlayerController 查看 Quicktime MOV 文件似乎无法通过 HTTPS 工作.我得到这部电影无法播放".我尝试在 Safari 中消除我的应用程序的问题,同样的事情发生了.如果我使用 HTTP,它可以正常工作.
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.
此线程有类似的讨论,但没有解决方案:http://discussions.apple.com/thread.jspa?messageID=12908818
This thread has a similar discussion, but no resolution: 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.
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.
是否有任何解决方法可以让我通过 HTTPS 观看视频?
Is there any workaround that will let me view video over HTTPS?
推荐答案
在遇到同样的问题和症状后,我能够访问提到的 Apple 开发者论坛主题 这里
After experiencing the very same problem and symptoms, I was able to gain access to the Apple Developer Forum thread mentioned here
Apple 线程的结果是您必须在服务器上安装有效的中间证书.仅安装服务器证书是不够的.
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.
我已经在 Mac OS X 10.6 Server 上对此进行了测试.我安装了服务器证书,虽然桌面浏览器能够通过 HTTPS 流式传输视频,但 iOS 设备(iPhone 和 iPad)都给出了 无法播放这部电影" 错误.
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.
其他设备,如 Android 手机和平板电脑,以及 RIM PowerBook(通过 Flash)在没有中间证书的情况下播放视频没有问题.我怀疑这是 iOS 过于关注其安全性的一个案例,如果不是错误的话,这是一个功能";-)
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 ;-)
我不是 PKI 专家,所以我无法告诉你为什么会这样.也许另一位贡献者可以解释这背后的 PKI 巫术.
I'm not a PKI expert, so I cannot tell you why this works. Perhaps another contributor can explain the PKI voodoo behind this.
这篇关于无法在 Safari 或 UIWebView 中通过 HTTPS 观看 Quicktime 电影的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:无法在 Safari 或 UIWebView 中通过 HTTPS 观看 Quicktime 电影
基础教程推荐
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01