test videojs
This commit is contained in:
parent
4826796724
commit
a374ca8a1b
@ -6,14 +6,15 @@ 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.id = "video-player";
|
||||||
video.className = "video-js";
|
video.className = "video-js";
|
||||||
body.appendChild(video);
|
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 = {};
|
||||||
options.controls = true;
|
options.controls = true;
|
||||||
let player = videojs("video-player", options);
|
options.liveui = true;
|
||||||
|
let player = videojs(video, options);
|
||||||
let source = {};
|
let source = {};
|
||||||
source.type = ctype;
|
source.type = ctype;
|
||||||
source.src = upstream;
|
source.src = upstream;
|
||||||
|
Loading…
Reference in New Issue
Block a user