From ed05306e6c91f9bf5cefa11b426fe665175ac291 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Fri, 14 May 2021 13:00:16 +0200 Subject: [PATCH] add body js --- frontend/script.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/frontend/script.js b/frontend/script.js index 79e295e..544df98 100644 --- a/frontend/script.js +++ b/frontend/script.js @@ -1,7 +1,5 @@ (() => { - let url = new URL("{{ stream }}", window.location.origin); - let upstream = url.href; - + let upstream = "{{ stream }}"; let xhr = new XMLHttpRequest(); xhr.open("HEAD", upstream, true); xhr.send(); @@ -16,6 +14,7 @@ let handle = () => { let bodies = document.getElementsByTagName("body"); if(bodies.length === 1) { + let body = bodies[0]; let video = document.createElement("video"); video.className = "video-js vjs-big-play-centered"; body.appendChild(video);