mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 10:53:50 +02:00
Add onread callback
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -12,6 +12,8 @@ export abstract class Source {
|
||||
_getSize() {
|
||||
return this._sizePromise ??= this._retrieveSize();
|
||||
}
|
||||
|
||||
onread: ((range: { start: number; end: number }) => unknown) | null = null;
|
||||
}
|
||||
|
||||
/** @public */
|
||||
|
||||
@@ -3,6 +3,5 @@
|
||||
- Add the new audio codecs to muxers
|
||||
- Mov muxer!!! Only mov can hold PCM audio, MP4 cannot
|
||||
- A stream source?? Or like a callback-driven source
|
||||
- onRead callback for Source
|
||||
- onHeader, etc callbacks for Matroska
|
||||
- https://github.com/Vanilagy/mp4-muxer/issues/83 tell him it's possible now
|
||||
Reference in New Issue
Block a user