simplify videojs setup
This commit is contained in:
parent
a374ca8a1b
commit
f6c8a1d021
@ -6,9 +6,6 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
let upstream = "{{ stream }}";
|
let upstream = "{{ stream }}";
|
||||||
xhr.addEventListener("load", () => {
|
xhr.addEventListener("load", () => {
|
||||||
let video = document.createElement("video");
|
let video = document.createElement("video");
|
||||||
//video.id = "video-player";
|
|
||||||
video.className = "video-js";
|
|
||||||
body.appendChild(video);
|
|
||||||
let ctype = xhr.getResponseHeader("Content-Type");
|
let ctype = xhr.getResponseHeader("Content-Type");
|
||||||
console.log(ctype);
|
console.log(ctype);
|
||||||
let options = {};
|
let options = {};
|
||||||
@ -19,6 +16,7 @@ document.addEventListener("DOMContentLoaded", () => {
|
|||||||
source.type = ctype;
|
source.type = ctype;
|
||||||
source.src = upstream;
|
source.src = upstream;
|
||||||
player.src(source);
|
player.src(source);
|
||||||
|
body.appendChild(video);
|
||||||
});
|
});
|
||||||
xhr.open("HEAD", upstream, true);
|
xhr.open("HEAD", upstream, true);
|
||||||
xhr.send();
|
xhr.send();
|
||||||
|
Loading…
Reference in New Issue
Block a user