This commit is contained in:
Roy Olav Purser 2021-05-12 10:33:29 +02:00
parent 8fbf8a4f62
commit ef89f57c83
Signed by: roypur
GPG Key ID: E14D26A036F21656

View File

@ -5,9 +5,10 @@ document.addEventListener("DOMContentLoaded", () => {
let xhr = new XMLHttpRequest(); let xhr = new XMLHttpRequest();
xhr.onreadystatechange = () => { xhr.onreadystatechange = () => {
let video = document.createElement("video"); let video = document.createElement("video");
video.id = "video-player";
body.appendChild(video); body.appendChild(video);
let ctype = xhr.getResponseHeader("Content-Type"); let ctype = xhr.getResponseHeader("Content-Type");
let player = videojs(video); let player = videojs("video-player");
let source = {}; let source = {};
source.type = ctype; source.type = ctype;
source.src = "{{ stream }}"; source.src = "{{ stream }}";