From 475f3994e51f48f3f6c05c14c80a7556f1be62fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andrej=20Rama=C5=A1euski?= <andrej@x2.cz>
Date: Wed, 22 Mar 2023 18:50:17 +0100
Subject: [PATCH] Reconnect

---
 VERSION                           | 2 +-
 templates/includes/player.html.ep | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/VERSION b/VERSION
index 276cbf9..2bf1c1c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.3.0
+2.3.1
diff --git a/templates/includes/player.html.ep b/templates/includes/player.html.ep
index 0d6f59f..8daded5 100644
--- a/templates/includes/player.html.ep
+++ b/templates/includes/player.html.ep
@@ -52,6 +52,14 @@ player.ready(function() {
     window.onresize = resizeVideoJS;
 });
 
+player.on('error', function(event) {
+    var time = player.currentTime();
+
+    if(player.error().code === 2) {
+        player.error(null).pause().load().currentTime(time).play();
+    }
+});
+
 </script>
 
 <style>
-- 
GitLab