Prefer av1, vp9 and then avc1.

This commit is contained in:
FireMasterK 2021-07-15 14:11:36 +05:30
parent e081e9110e
commit 4cb06c3569
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -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(() => {