From 6660f57d9897bbba59b7b16e162309e7ca5fae83 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Sat, 7 Sep 2024 22:21:39 +0800 Subject: [PATCH] Add support for DoVi Profile 10 Profile 10 spec covers DoVi video with and without the fallback layer. For now, once a device reports support for dav1.10, it is assumed that the device supports them all. Signed-off-by: nyanmisaka --- src/scripts/browserDeviceProfile.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index e41289acb5..c3f798dda4 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -262,6 +262,11 @@ function supportedDolbyVisionProfilesHevc(videoTestElement) { return supportedProfiles; } +function supportedDolbyVisionProfileAv1(videoTestElement) { + // Profile 10 4k@24fps + return videoTestElement.canPlayType?.('video/mp4; codecs="dav1.10.06"').replace(/no/, ''); +} + function getDirectPlayProfileForVideoContainer(container, videoAudioCodecs, videoTestElement, options) { let supported = false; let profileContainer = container; @@ -1067,6 +1072,10 @@ export default function (options) { } } + if (supportsDolbyVision(options) && supportedDolbyVisionProfileAv1(videoTestElement)) { + av1VideoRangeTypes += '|DOVI|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR'; + } + const h264CodecProfileConditions = [ { Condition: 'NotEquals',