From d71b211deea3e7f9ab41b67b4d6ed95a6f1278b1 Mon Sep 17 00:00:00 2001 From: Aevann Date: Mon, 16 Oct 2023 22:42:34 +0300 Subject: [PATCH] resync after buffering --- files/assets/js/orgy_file.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/assets/js/orgy_file.js b/files/assets/js/orgy_file.js index d5d3bbae7..1bc144a40 100644 --- a/files/assets/js/orgy_file.js +++ b/files/assets/js/orgy_file.js @@ -18,6 +18,7 @@ function add_playing_listener() { const chat_window_height = innerHeight - orgy_file.offsetHeight - 186 document.getElementById('chat-window').setAttribute('style', `max-height: ${chat_window_height}px !important`) } + setTimeout(add_waiting_listener, 5000); }, {once : true}); } @@ -47,3 +48,7 @@ orgy_file.addEventListener("timeupdate", function(){ orgy_file.addEventListener("ended", function(){ location.reload() }); + +function add_waiting_listener() { + orgy_file.addEventListener('waiting', add_playing_listener, {once : true}); +}