From f6c8a1d0211a4466b48a200cc793d6f70adac359 Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Wed, 12 May 2021 14:26:56 +0200 Subject: [PATCH] simplify videojs setup --- script.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/script.js b/script.js index 10f3af0..ffcf4e8 100644 --- a/script.js +++ b/script.js @@ -6,9 +6,6 @@ document.addEventListener("DOMContentLoaded", () => { let upstream = "{{ stream }}"; xhr.addEventListener("load", () => { let video = document.createElement("video"); - //video.id = "video-player"; - video.className = "video-js"; - body.appendChild(video); let ctype = xhr.getResponseHeader("Content-Type"); console.log(ctype); let options = {}; @@ -19,6 +16,7 @@ document.addEventListener("DOMContentLoaded", () => { source.type = ctype; source.src = upstream; player.src(source); + body.appendChild(video); }); xhr.open("HEAD", upstream, true); xhr.send();