try to fix broken remove song
Some checks reported errors
continuous-integration/drone/pr Build was killed
continuous-integration/drone/push Build is passing

Signed-off-by: Christian Richter <crichter@owncloud.com>
This commit is contained in:
Christian Richter
2022-07-19 11:40:36 +02:00
parent fa5216c8d4
commit cb696853f5

View File

@@ -91,7 +91,7 @@
function onPlayerStateChange(event) {
if (event.data == 0) {
console.log("playing stopped");
removeFromPlaylist(currentVideoID);
// it seems like there is a race condition happening here
playNext();
}
//if (event.data == YT.PlayerState.PLAYING && !done) {
@@ -170,6 +170,7 @@
}
function playNext() {
removeFromPlaylist(currentVideoID);
if (playlist[0] != null && playlist[0] != "") {
player.loadVideoById(playlist[0].videoId);
player.playVideo();