From 00e7cf1dc33b093f2ebdf13b5d9976044e30d5f6 Mon Sep 17 00:00:00 2001 From: Tritone Date: Fri, 5 Feb 2021 15:11:58 +0100 Subject: [PATCH] Fix videojs reload on close modal --- public/js/events.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/js/events.js b/public/js/events.js index da154d6..a07da67 100644 --- a/public/js/events.js +++ b/public/js/events.js @@ -71,8 +71,9 @@ function playStreamEvent() { }); $('#stream_popup').on('hidden.bs.modal', function () { - //bad hack to fix my issue with video js reloading - location.reload(); + if(videojs.getPlayers()["PlayStream"]) { + delete videojs.getPlayers()["PlayStream"]; + } })