diff options
author | metamuffin <metamuffin@disroot.org> | 2023-10-21 21:29:39 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2023-10-21 21:29:39 +0200 |
commit | 13ceba2544203a3f1bd2402336c0210e51f6801a (patch) | |
tree | e2d535d33cf6af0aab5ca1559772c7bf3bf14c7a /web/script/player/mod.ts | |
parent | 1f398d2b082a0f36b070bb5dd8287ab6f855ae78 (diff) | |
download | jellything-13ceba2544203a3f1bd2402336c0210e51f6801a.tar jellything-13ceba2544203a3f1bd2402336c0210e51f6801a.tar.bz2 jellything-13ceba2544203a3f1bd2402336c0210e51f6801a.tar.zst |
force reload when player unloads
Diffstat (limited to 'web/script/player/mod.ts')
-rw-r--r-- | web/script/player/mod.ts | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/web/script/player/mod.ts b/web/script/player/mod.ts index 8473280..ce3c113 100644 --- a/web/script/player/mod.ts +++ b/web/script/player/mod.ts @@ -9,12 +9,13 @@ import { Logger } from "../jshelper/src/log.ts"; import { EncodingProfile } from "./jhls.d.ts"; import { Player } from "./player.ts"; -document.addEventListener("DOMContentLoaded", () => { +globalThis.addEventListener("DOMContentLoaded", () => { if (document.body.classList.contains("player")) { if (!globalThis.MediaSource) return alert("Media Source Extension API required") const node_id = globalThis.location.pathname.split("/")[2]; const main = document.getElementById("main")!; document.getElementsByTagName("footer")[0].remove() + globalThis.dispatchEvent(new Event("navigationrequiresreload")) initialize_player(main, node_id) } }) |