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);