From 3a12676854acb7a2a449ccc434009090ab7b14b4 Mon Sep 17 00:00:00 2001 From: Erwan Vivien Date: Mon, 26 May 2025 11:40:54 +0200 Subject: [PATCH] feat: fix onReady, onMoovStart and onSidx callbacks typing --- src/isofile.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/isofile.ts b/src/isofile.ts index 46ed768d..73ba2702 100644 --- a/src/isofile.ts +++ b/src/isofile.ts @@ -157,11 +157,11 @@ export class ISOFile { /** Boolean used to fire moov start event only once */ moovStartFound = false; /** Callback called when the moov parsing starts */ - onMoovStart = null; + onMoovStart: (() => void) | null = null; /** Boolean keeping track of the call to onMoovStart, to avoid double calls */ moovStartSent = false; /** Callback called when the moov is entirely parsed */ - onReady = null; + onReady: ((info: Movie) => void) | null = null; /** Boolean keeping track of the call to onReady, to avoid double calls */ readySent = false; /** Callback to call when segments are ready */ @@ -195,7 +195,7 @@ export class ISOFile { /** Boolean indicating if the initial list of items has been produced */ itemListBuilt = false; /** Callback called when the sidx box is entirely parsed */ - onSidx = null; + onSidx: ((sidx: sidxBox) => void) | null = null; /** Boolean keeping track of the call to onSidx, to avoid double calls */ sidxSent = false;