From 6660f57d9897bbba59b7b16e162309e7ca5fae83 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Sat, 7 Sep 2024 22:21:39 +0800 Subject: [PATCH 1/2] 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', From 10d615c4d0fd646caed6ede88925a4de16eb2236 Mon Sep 17 00:00:00 2001 From: Nyanmisaka Date: Mon, 9 Sep 2024 04:33:39 +0800 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Dmitry Lyzo <56478732+dmitrylyzo@users.noreply.github.com> --- src/scripts/browserDeviceProfile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index c3f798dda4..1e4cac758c 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -1070,10 +1070,10 @@ export default function (options) { if (profiles.includes(8)) { hevcVideoRangeTypes += '|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR'; } - } - if (supportsDolbyVision(options) && supportedDolbyVisionProfileAv1(videoTestElement)) { - av1VideoRangeTypes += '|DOVI|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR'; + if (supportedDolbyVisionProfileAv1(videoTestElement)) { + av1VideoRangeTypes += '|DOVI|DOVIWithHDR10|DOVIWithHLG|DOVIWithSDR'; + } } const h264CodecProfileConditions = [