try to fix broken remove song
Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
function onPlayerStateChange(event) {
|
function onPlayerStateChange(event) {
|
||||||
if (event.data == 0) {
|
if (event.data == 0) {
|
||||||
console.log("playing stopped");
|
console.log("playing stopped");
|
||||||
removeFromPlaylist(currentVideoID);
|
// it seems like there is a race condition happening here
|
||||||
playNext();
|
playNext();
|
||||||
}
|
}
|
||||||
//if (event.data == YT.PlayerState.PLAYING && !done) {
|
//if (event.data == YT.PlayerState.PLAYING && !done) {
|
||||||
@@ -170,6 +170,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function playNext() {
|
function playNext() {
|
||||||
|
removeFromPlaylist(currentVideoID);
|
||||||
if (playlist[0] != null && playlist[0] != "") {
|
if (playlist[0] != null && playlist[0] != "") {
|
||||||
player.loadVideoById(playlist[0].videoId);
|
player.loadVideoById(playlist[0].videoId);
|
||||||
player.playVideo();
|
player.playVideo();
|
||||||
|
|||||||
Reference in New Issue
Block a user