mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
make source readonly
This commit is contained in:
+11
-2
@@ -20,7 +20,8 @@ export type InputOptions = {
|
||||
* @public
|
||||
*/
|
||||
export class Input {
|
||||
source: Source;
|
||||
/** @internal */
|
||||
_source: Source;
|
||||
/** @internal */
|
||||
_formats: InputFormat[];
|
||||
/** @internal */
|
||||
@@ -42,7 +43,7 @@ export class Input {
|
||||
}
|
||||
|
||||
this._formats = options.formats;
|
||||
this.source = options.source;
|
||||
this._source = options.source;
|
||||
this._mainReader = new Reader(options.source);
|
||||
}
|
||||
|
||||
@@ -63,6 +64,14 @@ export class Input {
|
||||
})();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the source from which this input file reads its data. This is the same source that was passed to there
|
||||
* constructor.
|
||||
*/
|
||||
get source() {
|
||||
return this._source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the format of the input file. You can compare this result directly to the InputFormat singletons or use
|
||||
* `instanceof` checks for subset-aware logic (for example, `format instanceof MatroskaInputFormat` is true for
|
||||
|
||||
Reference in New Issue
Block a user