mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-28 11:23:45 +02:00
Add ConversionOptions.tracks, add better converstion start timestamp computation, optimize endPacket logic, utilize metadata duration for progress callback for better performance
This commit is contained in:
+4
-1
@@ -342,7 +342,7 @@ export class Input<S extends Source = Source> extends EventEmitter<InputEvents>
|
||||
return this._format;
|
||||
}
|
||||
|
||||
async isSupported(): Promise<boolean> {
|
||||
async canRead(): Promise<boolean> {
|
||||
try {
|
||||
await this._getDemuxer();
|
||||
return true;
|
||||
@@ -376,6 +376,9 @@ export class Input<S extends Source = Source> extends EventEmitter<InputEvents>
|
||||
/**
|
||||
* Returns the timestamp at which the input file starts. More precisely, returns the smallest starting timestamp
|
||||
* among all tracks.
|
||||
*
|
||||
* Note that this method is potentially expensive for inputs with many tracks (such as HLS manifests), since it
|
||||
* probes every track.
|
||||
*/
|
||||
async getFirstTimestamp() {
|
||||
const tracks = await this.getTracks();
|
||||
|
||||
Reference in New Issue
Block a user