From a374ca8a1b44578b361d8e09317486347bd8280d Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Wed, 12 May 2021 14:22:12 +0200 Subject: [PATCH] test videojs --- script.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script.js b/script.js index e9284fa..10f3af0 100644 --- a/script.js +++ b/script.js @@ -6,14 +6,15 @@ document.addEventListener("DOMContentLoaded", () => { let upstream = "{{ stream }}"; xhr.addEventListener("load", () => { let video = document.createElement("video"); - video.id = "video-player"; + //video.id = "video-player"; video.className = "video-js"; body.appendChild(video); let ctype = xhr.getResponseHeader("Content-Type"); console.log(ctype); let options = {}; options.controls = true; - let player = videojs("video-player", options); + options.liveui = true; + let player = videojs(video, options); let source = {}; source.type = ctype; source.src = upstream;