Add onread callback

This commit is contained in:
Vanilagy
2025-01-04 14:46:53 +01:00
parent 3487bae4fe
commit 316e16211b
3 changed files with 3 additions and 1 deletions
+1
View File
@@ -54,6 +54,7 @@ export class Reader {
}
}
this.source.onread?.({ start, end });
const bytesPromise = this.source._read(start, end);
const loadingSegment: LoadingSegment = { start, end, promise: bytesPromise };
this.loadingSegments.push(loadingSegment);