Skip to content

Take control over your live stream video by running it yourself. Streaming + chat out of the box.

Update video.js and vhs http-streaming. Closes #133

Gabe Kangas2d2bf07d818d
diff --git a/webroot/index-video-only.html b/webroot/index-video-only.html
index 748bd4bdc1..c9efcbdc4d 100644
--- a/webroot/index-video-only.html
+++ b/webroot/index-video-only.html
@@ -5,9 +5,10 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"/>
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
- <link href="//unpkg.com/[email protected]/dist/video-js.css" rel="stylesheet">
+ <link href="//unpkg.com/[email protected]/dist/video-js.css" rel="stylesheet"/>
<link href="https://unpkg.com/@videojs/themes@1/dist/fantasy/index.css" rel="stylesheet" />
- <script src="//unpkg.com/[email protected]/dist/video.js"></script>
+ <script src="//unpkg.com/[email protected]/dist/alt/video.core.min.js"></script>
+ <script src="//unpkg.com/@videojs/[email protected]/dist/videojs-http-streaming.min.js"></script>
<link href="./styles/video.css" rel="stylesheet" />
<link href="./styles/video-only.css" rel="stylesheet" />
diff --git a/webroot/index.html b/webroot/index.html
index 40a1eb1fda..168ccc6eba 100644
--- a/webroot/index.html
+++ b/webroot/index.html
@@ -23,9 +23,10 @@
<link href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css" rel="stylesheet" />
- <link href="//unpkg.com/[email protected]/dist/video-js.css" rel="stylesheet">
+ <link href="//unpkg.com/[email protected]/dist/video-js.css" rel="stylesheet"/>
<link href="https://unpkg.com/@videojs/themes@1/dist/fantasy/index.css" rel="stylesheet" />
- <script src="//unpkg.com/[email protected]/dist/video.js"></script>
+ <script src="//unpkg.com/[email protected]/dist/alt/video.core.min.js"></script>
+ <script src="//unpkg.com/@videojs/[email protected]/dist/videojs-http-streaming.min.js"></script>
<!-- markdown renderer -->
<script src="//unpkg.com/showdown/dist/showdown.min.js"></script>
<script type="module" src="https://cdn.jsdelivr.net/npm/@justinribeiro/[email protected]/lite-youtube.js"></script>
diff --git a/webroot/js/components/player.js b/webroot/js/components/player.js
index 8de03fcf6f..05cbe59986 100644
--- a/webroot/js/components/player.js
+++ b/webroot/js/components/player.js
@@ -47,7 +47,7 @@ class OwncastPlayer {
}
init() {
- videojs.Hls.xhr.beforeRequest = function (options) {
+ videojs.Vhs.xhr.beforeRequest = function (options) {
const cachebuster = Math.round(new Date().getTime() / 1000);
options.uri = `${options.uri}?cachebust=${cachebuster}`;
return options;