Browser-aware player code, revisited again

It’s the code snippet that just won’t go away. I’ve updated the code for some additional functionality. This version takes server, port, and stream parameters via the URL, parses them in javascript, and then queries a streamcheck HTTPProvider on the server to see if a stream by that name is currently published. If it is, it will load the player, otherwise load a message, and check periodically to see if the stream is published, and load the player if the state changes to true, and unload it if it changes to false, returning to the message. The player is designed to scale to fit whatever window it’s in, so make an IFRAME of whatever size you want the player, and you’re off and running


Without further ado, here’s the code:

The code for the streamcheck module is as follows:

14 Comments On “Browser-aware player code, revisited again”

  1. Could I substitute the .innerHTML in the stream check function with say an image rotator, or a countdown, or some other html elements besides just text? I’ve been trying to hack together a way to check the status of the stream and automate what shows up on the page, but I’m not that good at js.

    Reply

  2. Hello Ian, Is hard to me to compile streamcheck, do you have some link to download it? 🙂

    Reply

  3. Hello Ian, I compiled StreamCheck but is not working.  Where I have to define the HTTT Provider? as a Module in my Application or in Vhost.xml?

    Reply

  4. How to make a wowza module ?
    Does this script runs all the time or when requested only ?
    What’s the impact of this script on resources, CPU and RAM ?
    How does it work ?
    Thanks in advance for your great script

    Reply

  5. hello lan, now i have streamcheck compiled, but I have this error:

    ERROR server comment – loadHTTPProvider: error parsing HTTPProvider properties: java.lang.ClassNotFoundException: net.nerdherd.wms.http

    java.lang.ClassNotFoundException: net.nerdherd.wms.http

    have you any suggestions?

    Reply

  6. Pingback: streamNerd » Browser-Aware Player Code: Episode V, IE Strikes Back

  7. Hello Ian, thanks for sharing the nice feature , i have it working fin on ios devices but on my pc it says “error loading player: no playable sources found” i use the hosted version of jwplayer premium.

    Also i wonder if there´s a way to hide the player if status is “false” using something like jwplayer() .remove()

    Our player is responsive and with html5 fallback we insert it using

    //

    And for those of you looking through this thread , remeber when adding httpprovider in VHost.xml to put it above the HTTPserverversion *

    so it could look like this

    net.nerdherd.wms.http.StreamCheck

    streamcheck*

    none

    com.wowza.wms.http.HTTPServerVersion

    *

    none

    Reply

Leave a Reply

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