mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-30 12:23:52 +02:00
Add metadata tag support to Conversion API
This commit is contained in:
@@ -36,6 +36,8 @@ export abstract class Source {
|
||||
abstract _retrieveSize(): MaybePromise<number | null>;
|
||||
/** @internal */
|
||||
abstract _read(start: number, end: number): MaybePromise<ReadResult | null>;
|
||||
/** @internal */
|
||||
abstract get _supportsRandomAccess(): boolean;
|
||||
|
||||
/** @internal */
|
||||
private _sizePromise: Promise<number | null> | null = null;
|
||||
@@ -113,6 +115,11 @@ export class BufferSource extends Source {
|
||||
offset: 0,
|
||||
};
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
get _supportsRandomAccess() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -210,6 +217,11 @@ export class BlobSource extends Source {
|
||||
|
||||
worker.running = false;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
get _supportsRandomAccess() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
const URL_SOURCE_MIN_LOAD_AMOUNT = 0.5 * 2 ** 20; // 0.5 MiB
|
||||
@@ -488,6 +500,11 @@ export class UrlSource extends Source {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
get _supportsRandomAccess() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -559,6 +576,11 @@ export class FilePathSource extends Source {
|
||||
_retrieveSize(): MaybePromise<number> {
|
||||
return this._streamSource._retrieveSize();
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
get _supportsRandomAccess() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -728,6 +750,11 @@ export class StreamSource extends Source {
|
||||
|
||||
worker.running = false;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
get _supportsRandomAccess() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
type ReadableStreamSourcePendingSlice = {
|
||||
@@ -987,6 +1014,11 @@ export class ReadableStreamSource extends Source {
|
||||
|
||||
this._pulling = false;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
get _supportsRandomAccess() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
type PrefetchProfile = (start: number, end: number, workers: ReadWorker[]) => {
|
||||
|
||||
Reference in New Issue
Block a user