Skip to content

Commit

Permalink
Added compatibility for the mpd format. Fixes issue #50
Browse files Browse the repository at this point in the history
  • Loading branch information
bootsie123 committed Mar 11, 2022
1 parent 4e4bcbb commit 4ff23b1
Show file tree
Hide file tree
Showing 3 changed files with 171 additions and 82 deletions.
233 changes: 153 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "f1-web-viewer",
"description": "A simple grid-based web viewer for Formula 1",
"author": "bootsie123",
"version": "1.7.13",
"version": "1.7.14",
"private": true,
"homepage": "https://github.com/bootsie123/F1-Web-Viewer",
"scripts": {
Expand Down Expand Up @@ -38,6 +38,7 @@
"serverless-http": "^2.7.0",
"uuid": "^8.3.2",
"video.js": "^7.16.0",
"videojs-contrib-dash": "^5.1.1",
"videojs-contrib-quality-levels": "^2.1.0",
"videojs-http-source-selector-2": "^1.1.10",
"vue": "^2.6.11",
Expand Down
17 changes: 16 additions & 1 deletion src/components/Feed.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import { mapGetters } from "vuex";
import "videojs-contrib-quality-levels";
import "videojs-contrib-dash";
import "videojs-http-source-selector-2";
import F1TV_API from "@/lib/F1TV_API";
Expand Down Expand Up @@ -141,7 +142,21 @@
url = "/proxy/" + url;
}
this.player.src(url);
if (res.data.resultObj.streamType === "DASH") {
this.player.src({
src: url,
keySystemOptions: [
{
name: "com.widevine.alpha",
options: {
serverURL: res.data.resultObj.laURL
}
}
]
});
} else {
this.player.src(url);
}
}
} catch (err) {
console.error(err);
Expand Down

0 comments on commit 4ff23b1

Please sign in to comment.