Reputation: 51
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.
Upvotes: 5
Views: 4905
Reputation: 851
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.
Upvotes: 2