From d5c9b7dfe8055e939c555c32d106f02c7f983120 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 31 Jan 2019 20:25:58 -0600 Subject: [PATCH] Only play after error if already playing --- src/invidious/views/components/player.ecr | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/invidious/views/components/player.ecr b/src/invidious/views/components/player.ecr index 9efe04fc5..7f932ef48 100644 --- a/src/invidious/views/components/player.ecr +++ b/src/invidious/views/components/player.ecr @@ -121,13 +121,18 @@ player.on('error', function(event) { var currentTime = player.currentTime(); var playbackRate = player.playbackRate(); + var paused = player.paused() + player.load(); if (currentTime > 0.5) { currentTime -= 0.5; } player.currentTime(currentTime); player.playbackRate(playbackRate); - player.play(); + + if (!paused) { + player.play(); + } }, 5000), 5000); } });