mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Add stricter checks for DolbyVision in HEVC
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
parent
fb4e9b6af3
commit
113c59fbdc
1 changed files with 9 additions and 1 deletions
|
@ -209,6 +209,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) {
|
function getDirectPlayProfileForVideoContainer(container, videoAudioCodecs, videoTestElement, options) {
|
||||||
let supported = false;
|
let supported = false;
|
||||||
let profileContainer = container;
|
let profileContainer = container;
|
||||||
|
@ -930,7 +938,7 @@ export default function (options) {
|
||||||
av1VideoRangeTypes += '|HLG';
|
av1VideoRangeTypes += '|HLG';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (supportsDolbyVision(options)) {
|
if (supportsDolbyVision(options) && canPlayDolbyVisionHevc(videoTestElement)) {
|
||||||
hevcVideoRangeTypes += '|DOVI';
|
hevcVideoRangeTypes += '|DOVI';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue