Add missing validation for HlsInputFormatOptions

This commit is contained in:
Vanilagy
2026-06-16 20:36:54 +02:00
parent 794c97b91a
commit 53833f6e94
+11
View File
@@ -789,4 +789,15 @@ export const validateInputFormatOptions = (options: InputFormatOptions, prefix:
throw new TypeError(`${prefix}.isobmff.resolveKeyId, when provided, must be a function.`);
}
}
if (options.hls !== undefined) {
if (!options.hls || typeof options.hls !== 'object') {
throw new TypeError(`${prefix}.hls, when provided, must be an object.`);
}
if (
options.hls.offsetTimestampsByDateTime !== undefined
&& typeof options.hls.offsetTimestampsByDateTime !== 'boolean'
) {
throw new TypeError(`${prefix}.hls.offsetTimestampsByDateTime, when provided, must be a boolean.`);
}
}
};