test videojs

This commit is contained in:
Roy Olav Purser 2021-05-12 14:22:12 +02:00
parent 4826796724
commit a374ca8a1b
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

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