Fixed autoplay bug #84
This commit is contained in:
@@ -80,6 +80,8 @@ Player = (function() {
|
||||
axis: 'y',
|
||||
handle: '.dragbox'
|
||||
});
|
||||
console.log(_player.hasTrack());
|
||||
console.log(initial_count);
|
||||
if (autoplay) {
|
||||
_player.setTrack($('.playlist-tracks li').last().attr('id').split('i')[1]);
|
||||
} else if (initial_count === 0 && !_player.hasTrack()) {
|
||||
@@ -116,7 +118,7 @@ Player = (function() {
|
||||
};
|
||||
Player.prototype.hasTrack = function() {
|
||||
if ($('#jplayer audio').length > 0) {
|
||||
return $('#jplayer audio').attr('src') != null;
|
||||
return ($('#jplayer audio').attr('src') != null) && $('#jplayer audio').attr('src') !== '';
|
||||
} else if ($('#jplayer object').length > 0) {
|
||||
$('#jplayer').jPlayer('play');
|
||||
true;
|
||||
|
||||
Reference in New Issue
Block a user