mb.miniAudioPlayer.demo - auto start next player


This is a GUI implementation of Happyworm jPlayer plugin, an HTML5 audio engine, developed on jQuery framework, that let you listen mp3 and ogg file over the html5 audio tag where supported or using an invisible flash player where not supported. For more informations about html5 browsers' support go to jPlayer documentation site.

Airport Gate (Boarding)
Group Talking

Doorbell


All the music are provided by © pacdv.com.

Here is a demo of a custom behaviour applied as callback for the "end" event of each player:
The first player has the "autoPlay" parameter set as true and therefor it'll start playing on page load; once one of the audio played ends the next player will start playing.
If is the last player playing it starts over from the first.
This behaviour can't works on iOs devices due to their security restrictions.


    // this is the initializer function

    $(".audio").mb_miniPlayer({
    width:240,
    inLine:false,
    onEnd:playNext
    });

    // and this is function invoked as 'onEnd' callback
    // Both the onPlay and onEnd callback functions receive the index of the player as parameter.

    function playNext(idx){
    var players=$(".audio");
    document.playerIDX = idx+1 <= players.length-1 ? idx+1 : 0;
    players.eq(document.playerIDX).mb_miniPlayer_play();
    }
  


jquery.mb.miniPlayer is a GUI implementation of the jquery.jPlayer plug-in realized by © Happyworm LTD. (many thanks to Mark Boas)