diff --git a/src/scripts/browserDeviceProfile.js b/src/scripts/browserDeviceProfile.js index 1f40349af4..aef1ca0050 100644 --- a/src/scripts/browserDeviceProfile.js +++ b/src/scripts/browserDeviceProfile.js @@ -583,11 +583,7 @@ export default function (options) { } if (canPlayHevc(videoTestElement, options)) { - // safari is lying on HDR and 60fps videos, use fMP4 instead - if (!browser.safari) { - mp4VideoCodecs.push('hevc'); - } - + mp4VideoCodecs.push('hevc'); if (browser.tizen || browser.web0s) { hlsInTsVideoCodecs.push('hevc'); } @@ -1098,6 +1094,25 @@ export default function (options) { }); } + // Safari quirks for HEVC direct-play + if (browser.safari) { + // Only hvc1 & dvh1 tags are supported + hevcCodecProfileConditions.push({ + Condition: 'EqualsAny', + Property: 'VideoCodecTag', + Value: 'hvc1|dvh1', + IsRequired: true + }); + + // Framerate above 60fps is not supported + hevcCodecProfileConditions.push({ + Condition: 'LessThanEqual', + Property: 'VideoFramerate', + Value: '60', + IsRequired: true + }); + } + // On iOS 12.x, for TS container max h264 level is 4.2 if (browser.iOS && browser.iOSVersion < 13) { const codecProfile = {