Skip to content

Commit

Permalink
fix(Offline): Fix download HLG tracks when using AUTO hdr level (#7865)
Browse files Browse the repository at this point in the history
Related to #7470
  • Loading branch information
avelad authored Jan 10, 2025
1 parent 851308c commit 0eedbc9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/util/player_configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,13 @@ shaka.util.PlayerConfiguration = class {
if (hdrLevel == 'AUTO') {
// Auto detect the ideal HDR level.
if (window.matchMedia('(color-gamut: p3)').matches) {
hdrLevel = 'PQ';
const someHLG = tracks.some((track) => {
if (track.hdr && track.hdr == 'HLG') {
return true;
}
return false;
});
hdrLevel = someHLG ? 'HLG' : 'PQ';
} else {
hdrLevel = 'SDR';
}
Expand Down

0 comments on commit 0eedbc9

Please sign in to comment.