Player Repeat. closes #38
This commit is contained in:
parent
3a40da1dbe
commit
74b4c1e04a
|
@ -38,7 +38,7 @@ $(function(){
|
|||
playPrev();
|
||||
}).disableTextSelect();
|
||||
$('#player .next').click(function(){
|
||||
playNext();
|
||||
playNext(false);
|
||||
}).disableTextSelect();
|
||||
$('#player .shuffle, #player .repeat').click(function(){
|
||||
$(this).toggleClass('on');
|
||||
|
@ -53,7 +53,7 @@ function updatePlayer() {
|
|||
duration = audio.duration;
|
||||
cur_time = audio.currentTime;
|
||||
if (cur_time == duration) {
|
||||
playNext();
|
||||
playNext(true);
|
||||
}
|
||||
loaded = 0;
|
||||
if ((audio.buffered != undefined) && (audio.buffered.length != 0)) {
|
||||
|
@ -95,7 +95,9 @@ function playNext(auto) {
|
|||
$('#playlist ul.list li').rand().dblclick();
|
||||
}
|
||||
if ($('#playlist ul.list li.now-playing').next().length == 0) {
|
||||
$('#playlist ul.list li:first').dblclick();
|
||||
if ((auto && $('#player .repeat').hasClass('on')) || !auto) {
|
||||
$('#playlist ul.list li:first').dblclick();
|
||||
}
|
||||
} else {
|
||||
$('#playlist ul.list li.now-playing').next().dblclick();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue