From 17e62134487aaa0fa5ede651f43616dd0fe20a52 Mon Sep 17 00:00:00 2001 From: meow Date: Tue, 17 May 2022 10:03:07 +0300 Subject: [PATCH] Less player reload timeout --- assets/js/player.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/player.js b/assets/js/player.js index 38746787..e8c18e21 100644 --- a/assets/js/player.js +++ b/assets/js/player.js @@ -63,9 +63,10 @@ player.on('error', function () { source.src += '&local=true'; })); } else if (reloadMakesSense) { - setTimeout(function (event) { - console.log('An error occurred in the player, reloading...'); + setTimeout(function () { + console.warn('An error occurred in the player, reloading...'); + // After load() all parameters are reset. Save them var currentTime = player.currentTime(); var playbackRate = player.playbackRate(); var paused = player.paused(); @@ -76,9 +77,8 @@ player.on('error', function () { player.currentTime(currentTime); player.playbackRate(playbackRate); - if (!paused) player.play(); - }, 10000); + }, 5000); } });