Fix the behavior of HDR remuxing in HLS.js 1.5+

Without this change, HLS.js 1.5+ only allows HDR playback on
displays/systems with HDR enabled. When the server provides
two streams one HDR and one SDR for fallback, HLS.js will
ignore the HDR stream, even if the browser supports
client-side tone-mapping. This triggers unnecessary transcoding.

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
This commit is contained in:
nyanmisaka
2024-03-24 01:59:54 +08:00
parent fa6981cb7f
commit b5e40f5952
+1
View File
@@ -443,6 +443,7 @@ export class HtmlVideoPlayer {
startPosition: options.playerStartPositionTicks / 10000000,
manifestLoadingTimeOut: 20000,
maxBufferLength: maxBufferLength,
videoPreference: { preferHDR: true },
xhrSetup(xhr) {
xhr.withCredentials = includeCorsCredentials;
}