diff --git a/lib/media/adaptation_set_criteria.js b/lib/media/adaptation_set_criteria.js index 8be5992765..b59366cd2b 100644 --- a/lib/media/adaptation_set_criteria.js +++ b/lib/media/adaptation_set_criteria.js @@ -356,7 +356,14 @@ shaka.media.PreferenceBasedCriteria = class { if (hdrLevel == 'AUTO') { // Auto detect the ideal HDR level. if (window.matchMedia('(color-gamut: p3)').matches) { - hdrLevel = 'PQ'; + const someHLG = variants.some((variant) => { + if (variant.video && variant.video.hdr && + variant.video.hdr == 'HLG') { + return true; + } + return false; + }); + hdrLevel = someHLG ? 'HLG' : 'PQ'; } else { hdrLevel = 'SDR'; }