在safari iPhone 4.3上通过HTTPS进行HTML5音频播放 [英] HTML5 audio playback over HTTPS on safari IPhone 4.3

查看:182
本文介绍了在safari iPhone 4.3上通过HTTPS进行HTML5音频播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经编写了一个简单的HTML代码,用于在iPhone上使用HTML5音频标签播放音频文件。

 < audio controls =controlsautoplay =autoplay> 
< source src =http://192.168.1.130/ab.wav> type =audio / wavpreload =auto/>
您的浏览器不支持音频元素。
< / audio>

上面的代码在safari上工作得很好。问题出在我将源URL从HTTP更改为HTTPS时。



我开始收到This movie could not play错误消息。 b

我使用的证书链如下:

VeriSign试用安全服务器根CA - G2 - > VeriSign试用安全服务器CA - G2 - > ucbu-aricent-vm200



上述根证书的证书在Safari中默认不可用。



因此,我已将证书颁发机构的证书(包括Root和Intermediate)附加到电子邮件中,然后通过单击电子邮件中的附件将它们添加到iPhone中。



但是我仍然看到Safari创建TCP会话传输WAV文件时SSL握手失败。


$ b 注意:SSL握手会成功,当TCP创建会话以从服务器获取HTML文件。我已经比较了HTML和WAV文件场景的SSL握手的网络数据包,并且它们都是相同的。

上面提到的ceejoyez和OP(谢谢你们两个!),但我几乎错过了它,因为它不是一个真正的答案

如果您通过https提供内容,则需要拥有有效的证书,否则将无法在iOS设备(或Mac上的Safari)上播放。



请参阅此处查看相关问题。


I have written a simple HTML code to play an audio file using the HTML5 audio tag on IPhone.

<audio controls="controls" autoplay="autoplay">
<source src="http://192.168.1.130/ab.wav>" type="audio/wav" preload="auto"/>
Your browser does not support the audio element.
</audio>

The above code works perfectly fine over safari. The problem comes when I change the Source URL from HTTP to HTTPS.

I started getting "This movie could not be played" error message.

I am using a certificate chain which is as follows:

VeriSign Trial Secure Server Root CA - G2 -> VeriSign Trial Secure Server CA - G2 -> ucbu-aricent-vm200

The certificate of the Root CA (above) is not available in Safari by default.

So I had attached the certificate for the certificate authority (both Root and Intermediate) to an email, and then added them in IPhone by clicking the attachments in the email.

But still I see that the SSL Handshake fails when Safari created a TCP session to transfer the WAV file.

NOTE: The SSL handshake goes successful when the TCP session is created to fetch the HTML file from the server. I had compared the network packets of the SSL handshake of HTML and WAV file scenarios and both of them were identical.

解决方案

This was mentioned above by ceejoyez and again by the OP (Thank you both!), but I almost missed it as it wasn't an actual answer:

If you are serving the content over https you need to have a valid certificate or it will not play on iOS devices (or on Safari on a Mac).

See here for a related question.

这篇关于在safari iPhone 4.3上通过HTTPS进行HTML5音频播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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