mirror of https://github.com/calzoneman/sync.git
Change end-of-queue behavior to set currentMedia to null and position to -1
This commit is contained in:
parent
3e556a5c54
commit
d7813d7f6c
|
@ -335,8 +335,11 @@ Channel.prototype.unqueue = function(data) {
|
|||
|
||||
// Play the next media in the queue
|
||||
Channel.prototype.playNext = function() {
|
||||
if(this.currentPosition + 1 >= this.queue.length)
|
||||
if(this.currentPosition + 1 >= this.queue.length) {
|
||||
this.currentMedia = null;
|
||||
this.currentPosition = -1;
|
||||
return;
|
||||
}
|
||||
this.currentPosition++;
|
||||
this.currentMedia = this.queue[this.currentPosition];
|
||||
this.currentMedia.currentTime = 0;
|
||||
|
|
Loading…
Reference in New Issue