diff --git a/Main.js b/Main.js index 399f664c5..57e3f238d 100644 --- a/Main.js +++ b/Main.js @@ -390,7 +390,7 @@ async function load_scenemap(url, is_video = false, width = null, height = null, width: width, height: height, videoId: videoid, - playerVars: { 'autoplay': 1, 'controls': 0 }, + playerVars: { 'autoplay': 1, 'controls': 0, 'rel': 0 }, events: { 'onStateChange': function(event) { if (event.data == 0) window.YTPLAYER.seekTo(0); }, 'onReady': function(e) { @@ -408,16 +408,16 @@ async function load_scenemap(url, is_video = false, width = null, height = null, if (window.YTPLAYER.playerInfo.playerState != 1){ // Something went wrong. tries to reset window.YTPLAYER.seekTo(0); window.YTPLAYER.playVideo(); - window.YTTIMEOUT = setTimeout(smooth, (window.YTPLAYER.playerInfo.duration - 1.6) * 1000); + window.YTTIMEOUT = setTimeout(smooth, (window.YTPLAYER.playerInfo.duration - 1) * 1000); return; } remaining = window.YTPLAYER.playerInfo.duration - window.YTPLAYER.playerInfo.currentTime; if (remaining < 2) { // We should be able to just skip on the last second window.YTPLAYER.seekTo(0); - window.YTTIMEOUT = setTimeout(smooth, (window.YTPLAYER.playerInfo.duration - 1.6) * 1000); + window.YTTIMEOUT = setTimeout(smooth, (window.YTPLAYER.playerInfo.duration - 1) * 1000); } else { - window.YTTIMEOUT = setTimeout(smooth, (remaining - 1.6) * 1000); + window.YTTIMEOUT = setTimeout(smooth, (remaining / 2 ) * 1000); } }; @@ -3137,7 +3137,7 @@ function init_help_menu() {