send hls directly

This commit is contained in:
2021-05-30 13:48:54 +02:00
parent 0951feab2e
commit 34734bb7e4
3 changed files with 8 additions and 6 deletions

View File

@ -26,7 +26,6 @@
video.className = "video-js vjs-big-play-centered";
body.appendChild(video);
const ctype = xhr.getResponseHeader("Content-Type");
const media = xhr.getResponseHeader("Content-Location");
const image = xhr.getResponseHeader("Custom-Poster");
console.log(ctype);
const options = {};
@ -44,7 +43,7 @@
}
const source = {};
source.type = ctype;
source.src = media;
source.src = upstream;
player.src(source);
const canPlayTypeRaw = player.canPlayType(ctype);
const canPlayType = (canPlayTypeRaw === "maybe") || (canPlayTypeRaw === "probably");