Merge branch 'master' into relax-hevc-safari

This commit is contained in:
Nyanmisaka
2024-02-07 22:30:52 +08:00
committed by GitHub
25 changed files with 243 additions and 201 deletions
+9 -1
View File
@@ -210,6 +210,14 @@ function supportsDolbyVision(options) {
);
}
function canPlayDolbyVisionHevc(videoTestElement) {
// Profiles 5/7/8 4k@60fps
return !!videoTestElement.canPlayType
&& (videoTestElement.canPlayType('video/mp4; codecs="dvh1.05.09"').replace(/no/, '')
&& videoTestElement.canPlayType('video/mp4; codecs="dvh1.07.09"').replace(/no/, '')
&& videoTestElement.canPlayType('video/mp4; codecs="dvh1.08.09"').replace(/no/, ''));
}
function getDirectPlayProfileForVideoContainer(container, videoAudioCodecs, videoTestElement, options) {
let supported = false;
let profileContainer = container;
@@ -927,7 +935,7 @@ export default function (options) {
av1VideoRangeTypes += '|HLG';
}
if (supportsDolbyVision(options)) {
if (supportsDolbyVision(options) && canPlayDolbyVisionHevc(videoTestElement)) {
hevcVideoRangeTypes += '|DOVI';
}