diff --git a/src/input-format.ts b/src/input-format.ts index 178b0ce..28eeb7e 100644 --- a/src/input-format.ts +++ b/src/input-format.ts @@ -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.`); + } + } };