HTML5 streaming video on mobile devices using HTTPS

A quick note on something that has had me pulling my hair out for the last few hours.  We are developing a media library for our corporate intranet that allows the upload of video and images.

For video uploads, we use FFMPEG to produce preview versions in a number of different formats, and then Flowplayer on the client to manage the playback.

Everything was working perfectly on Windows desktops and laptops (in a variety of browsers - even IE8).  However, whatever we tried, the videos would not stream to mobile devices.  Flowplayer was reporting "HTML5 video file not found".

I knew I was using the correct encoding parameters in FFMPEG, because I'd made it work before on a different project.

So I spent several hours looking at FFMPEG, the ASP.NET handler we'd written to handle the streaming, IIS config... trying to figure out what was wrong.  And then it hit me - we're not yet live, so all these pages/scripts are running either from a dev machine or our staging server.  Neither of which happen to have a valid SSL certificate.

I wonder, could it be that for some reason, mobile devices won't stream video over HTTPS unless you have a valid certificate?  Ported the video streaming code to the live server (which does have a valid SSL certificate), and everything worked perfectly - on Android and iOS.

So there you have it - if you've arrived at this page via Google, trying to figure out why your HTML5 videos aren't streaming to mobile devices in your dev or staging environment - here's your answer :  Its because you don't have a valid SSL certificate installed.

Comments