From 53833f6e9404a969bbebe02ee98f73f946ddbfb4 Mon Sep 17 00:00:00 2001 From: Vanilagy <1696106+Vanilagy@users.noreply.github.com> Date: Tue, 16 Jun 2026 20:36:54 +0200 Subject: [PATCH] Add missing validation for HlsInputFormatOptions --- src/input-format.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) 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.`); + } + } };