Browser-Aware Player Code, 2014 Edition

Yet another installment in the never-ending series of dealing with different platforms. This is precipitated by the continued boneheadedness of Google when it comes to supporting any live streaming transports in the native browser (they just simply don’t). Some handset manufacturers are adding HLS support back, though.

You’ll notice there’s also code in here to reference an MPEG-DASH manifest as well as “sanjose” and “smooth” (in Wowza parlance). This script doesn’t make use of those capabilities at the moment, but once I get a good list of which browsers can support MSE and DASH.js, I’ll update it to be able to use that player.

This assumes that you’re using cloud-hosted JW Player with a key, but if you’re not, simply replace the first SCRIPT reference with your locally hosted JWPlayer file and comment out the jwplayer.key line.

If you wish to use a different player such as FlowPlayer, you can replace the appropriate code in the flashPlayer() function.

3 Comments On “Browser-Aware Player Code, 2014 Edition”

  1. Ian, thanks so much for writing and maintaining these scripts. I was wondering if this was supposed to be combined with the earlier scripts to get stream checking, or was that dropped because the IE support was too unreliable?

    Reply

  2. Ian, I was browsing your blog today and saw this post from last April. quite a few people must have used this code for testing since I noticed you used one of my live streams for the test in the blog.. this explains some of the anomalies in the wowza logs! Thanks for the bump in stats on this stream hehe 🙂 hope all is well with you and yours.

    Reply

  3. I tried using this but all I get is a blank page

    Nevermind – If referenced the player wrong, but now:

    All I get is Error loading player: Could not load player configuration

    I am trying this by just double clicking the file on my computer, it is not on a webserver at the moment.

    Any ideas why this will not work for me?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *