What player for HTML page is the best?
  • hi friends,
    what player can I use for some HTML (or PHP) page. Which is the best?
    And how can I configure it?
  • 3 Comments sorted by
  • I use this one  
    http://blog.codingexpert.de/?p=66

    easy to setup but unfortunately Flash technology
  • Vote Up0Vote Down EthanEthan
    Posts: 10Member
    http://jplayer.org/

    This is what Airtime uses on the listen button popup, and I've also created my own separate player that read the icecast2 mount point similar to the built in airtime player.

    I had some issues with setting up the initialization javascript, so here is a copy of mine that is in the <head> of my html file. 

      function setjPlayer(url, type, serverType){
        var obj = new Object();
        obj[type] = url;

        if(serverType == 'shoutcast'){
            obj[type] = url + ";stream/1";
        }
        
        $("#jquery_jplayer_1").jPlayer("destroy");
        $("#jquery_jplayer_1").jPlayer({
            ready: function () {
                $(this).jPlayer("setMedia", obj).jPlayer("play");
            },
            ended: function (event) {
                $(this).jPlayer("play");
            },
            swfPath: "js/",
            supplied: type,
            wmode: "window"
        });
      }

      $(document).ready(function(){ setjPlayer('http://XXXXXXXXX.com:8000/airtime_128', 'mp3', 'icecast'); });

       
  • @Ethan : thank for the code
    i wasn't able to made it working

    I will try you code :)