From 227b161de0cdbf1d91b5f54caddec5c2a5dcb889 Mon Sep 17 00:00:00 2001 From: Klafyvel Date: Sun, 25 Mar 2018 18:18:41 +0200 Subject: [PATCH] Fin de playlist --- player/templates/player/playlist.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/player/templates/player/playlist.html b/player/templates/player/playlist.html index b1aa993..d0b7957 100644 --- a/player/templates/player/playlist.html +++ b/player/templates/player/playlist.html @@ -56,8 +56,6 @@ function onYouTubeIframeAPIReady() { // 4. The API will call this function when the video player is ready. function onPlayerReady(event) { - console.log(current_link); - console.log(tracks.length); if(tracks.length > 0 && current_link < (tracks.length - 1)) { current_link += 1 player.loadVideoById(tracks[current_link]); @@ -92,6 +90,7 @@ function updateLinks(data) { links.removeChild(links.firstChild); } var model = document.getElementById('link_template'); + var rerun = (current_link >= tracks.length ) || current_link < 0; tracks = []; for (var i=0; i