1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
| if((navigator.userAgent.indexOf("MSIE") != -1 ) || (!!document.documentMode == true ))
{
$(function() {
// Setup the player to autoplay the next track
var a = audiojs.createAll({
play: function() {
// var player = this.settings.createPlayer;
// container[audiojs].helpers.addClass(this.wrapper, player.playingClass);
$('.audiojs').addClass('playing');
var album = $('ol li.playing').attr('data-album');
$("#artistlink").css("background-image", "url(/assets/images/credits/" + album + ".jpg)");
},
trackEnded: function() {
var next = $('ol li.playing').next();
if (!next.length) next = $('ol li').first();
next.addClass('playing').siblings().removeClass('playing');
audio.load($('a', next).attr('data-src2'));
audio.play();
}
});
// Load in the first track
var audio = a[0];
first = $('ol a').attr('data-src2');
$('ol li').first().addClass('playing');
audio.load(first);
// Load in a track on click
$('ol li').click(function(e) {
e.preventDefault();
$(this).addClass('playing').siblings().removeClass('playing');
audio.load($('a', this).attr('data-src2'));
audio.play();
});
});
}
else{... |
Partager