Player next fixed
This commit is contained in:
parent
82f2624ed5
commit
2dc8b0da49
|
@ -15,7 +15,7 @@ $(function(){
|
|||
});
|
||||
});
|
||||
$('#player .play').click(function(){
|
||||
if (! audio.src) return;
|
||||
if (! audio) return;
|
||||
audio.play();
|
||||
utid = window.setTimeout(updatePlayer, 100);
|
||||
$('#player .pause').show();
|
||||
|
@ -138,6 +138,7 @@ function addToPlaylist(artist, track, length, id) {
|
|||
playTrack(artist, track, id);
|
||||
$('#playlist li').removeClass('now-playing');
|
||||
$(this).addClass('now-playing');
|
||||
setNext();
|
||||
})
|
||||
if ($('#playlist ul.list li').length == 1) {
|
||||
$('#playlist ul.list li:first').dblclick();
|
||||
|
@ -155,7 +156,8 @@ function addAudio(id) {
|
|||
}
|
||||
}
|
||||
function switchAudio(id) {
|
||||
if (typeof(audio) != 'undefined') {
|
||||
if (typeof(audio) != 'undefined' && audio.buffered.length != 0) {
|
||||
console.log(audio, audio.buffered.length);
|
||||
audio.pause();
|
||||
audio.currentTime = 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue