add body js
This commit is contained in:
parent
77ab3e38df
commit
ed05306e6c
@ -1,7 +1,5 @@
|
|||||||
(() => {
|
(() => {
|
||||||
let url = new URL("{{ stream }}", window.location.origin);
|
let upstream = "{{ stream }}";
|
||||||
let upstream = url.href;
|
|
||||||
|
|
||||||
let xhr = new XMLHttpRequest();
|
let xhr = new XMLHttpRequest();
|
||||||
xhr.open("HEAD", upstream, true);
|
xhr.open("HEAD", upstream, true);
|
||||||
xhr.send();
|
xhr.send();
|
||||||
@ -16,6 +14,7 @@
|
|||||||
let handle = () => {
|
let handle = () => {
|
||||||
let bodies = document.getElementsByTagName("body");
|
let bodies = document.getElementsByTagName("body");
|
||||||
if(bodies.length === 1) {
|
if(bodies.length === 1) {
|
||||||
|
let body = bodies[0];
|
||||||
let video = document.createElement("video");
|
let video = document.createElement("video");
|
||||||
video.className = "video-js vjs-big-play-centered";
|
video.className = "video-js vjs-big-play-centered";
|
||||||
body.appendChild(video);
|
body.appendChild(video);
|
||||||
|
Loading…
Reference in New Issue
Block a user