2021-05-09 16:43:28 +00:00
|
|
|
<html>
|
|
|
|
<head>
|
2021-05-10 15:40:38 +00:00
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/video.js/{{ videojs_version }}/video-js.css">
|
|
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/video.js/{{ videojs_version }}/video.min.js"></script>
|
2021-05-09 16:43:28 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2021-05-12 07:28:09 +00:00
|
|
|
<video class="video-js" id="player" controls>
|
2021-05-09 16:43:28 +00:00
|
|
|
</video>
|
2021-05-12 07:28:09 +00:00
|
|
|
<script>
|
|
|
|
let xhr = new XmlHttpRequest();
|
|
|
|
xhr.onreadystatechange = () => {
|
|
|
|
let ctype = xhr.getResponseHeader("Content-Type");
|
|
|
|
let player = videojs("player");
|
|
|
|
let source = {};
|
|
|
|
source.type = ctype;
|
2021-05-12 07:31:48 +00:00
|
|
|
source.src = "{{ stream }}";
|
2021-05-12 07:28:09 +00:00
|
|
|
player.src(source);
|
|
|
|
}
|
2021-05-12 07:31:48 +00:00
|
|
|
xhr.open("HEAD", "{{ stream }}", true);
|
2021-05-12 07:28:09 +00:00
|
|
|
xhr.send();
|
|
|
|
</script>
|
2021-05-09 16:43:28 +00:00
|
|
|
</body>
|
|
|
|
</html>
|