Skip to content

Commit 4ff23b1

Browse files
committed
Added compatibility for the mpd format. Fixes issue #50
1 parent 4e4bcbb commit 4ff23b1

File tree

3 files changed

+171
-82
lines changed

3 files changed

+171
-82
lines changed

package-lock.json

Lines changed: 153 additions & 80 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "f1-web-viewer",
33
"description": "A simple grid-based web viewer for Formula 1",
44
"author": "bootsie123",
5-
"version": "1.7.13",
5+
"version": "1.7.14",
66
"private": true,
77
"homepage": "https://github.com/bootsie123/F1-Web-Viewer",
88
"scripts": {
@@ -38,6 +38,7 @@
3838
"serverless-http": "^2.7.0",
3939
"uuid": "^8.3.2",
4040
"video.js": "^7.16.0",
41+
"videojs-contrib-dash": "^5.1.1",
4142
"videojs-contrib-quality-levels": "^2.1.0",
4243
"videojs-http-source-selector-2": "^1.1.10",
4344
"vue": "^2.6.11",

src/components/Feed.vue

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import { mapGetters } from "vuex";
3434
3535
import "videojs-contrib-quality-levels";
36+
import "videojs-contrib-dash";
3637
import "videojs-http-source-selector-2";
3738
3839
import F1TV_API from "@/lib/F1TV_API";
@@ -141,7 +142,21 @@
141142
url = "/proxy/" + url;
142143
}
143144
144-
this.player.src(url);
145+
if (res.data.resultObj.streamType === "DASH") {
146+
this.player.src({
147+
src: url,
148+
keySystemOptions: [
149+
{
150+
name: "com.widevine.alpha",
151+
options: {
152+
serverURL: res.data.resultObj.laURL
153+
}
154+
}
155+
]
156+
});
157+
} else {
158+
this.player.src(url);
159+
}
145160
}
146161
} catch (err) {
147162
console.error(err);

0 commit comments

Comments
 (0)