Skip to content

Commit

Permalink
Prefer av1, vp9 and then avc1.
Browse files Browse the repository at this point in the history
  • Loading branch information
FireMasterK committed Jul 15, 2021
1 parent e081e91 commit 4cb06c3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/components/Player.vue
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,18 @@ export default {
this.player = player;
const disableVideo = this.getPreferenceBoolean("listen", false) && !this.video.livestream;
this.player.configure("manifest.disableVideo", disableVideo);
this.player.configure({
preferredVideoCodecs: ["av01", "vp9", "avc1"],
preferredAudioCodecs: ["opus", "mp4a"],
manifest: {
disableVideo: disableVideo,
},
});
const quality = this.getPreferenceNumber("quality", 0);
const qualityConds = quality > 0 && (this.video.audioStreams.length > 0 || this.video.livestream);
const qualityConds =
quality > 0 && (this.video.audioStreams.length > 0 || this.video.livestream) && !disableVideo;
if (qualityConds) this.player.configure("abr.enabled", false);
player.load(uri, 0, uri.indexOf("dash+xml") >= 0 ? "application/dash+xml" : "video/mp4").then(() => {
Expand Down

0 comments on commit 4cb06c3

Please sign in to comment.