From 4cb06c35696520469c0bdb04f18a9a85915df78a Mon Sep 17 00:00:00 2001 From: FireMasterK <20838718+FireMasterK@users.noreply.github.com> Date: Thu, 15 Jul 2021 14:11:36 +0530 Subject: [PATCH] Prefer av1, vp9 and then avc1. --- src/components/Player.vue | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/components/Player.vue b/src/components/Player.vue index 836aee9d..49e829b2 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -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(() => {