mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-10-03 13:53:53 +02:00
make source readonly
This commit is contained in:
+11
-2
@@ -20,7 +20,8 @@ export type InputOptions = {
|
|||||||
* @public
|
* @public
|
||||||
*/
|
*/
|
||||||
export class Input {
|
export class Input {
|
||||||
source: Source;
|
/** @internal */
|
||||||
|
_source: Source;
|
||||||
/** @internal */
|
/** @internal */
|
||||||
_formats: InputFormat[];
|
_formats: InputFormat[];
|
||||||
/** @internal */
|
/** @internal */
|
||||||
@@ -42,7 +43,7 @@ export class Input {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this._formats = options.formats;
|
this._formats = options.formats;
|
||||||
this.source = options.source;
|
this._source = options.source;
|
||||||
this._mainReader = new Reader(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
|
* 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
|
* `instanceof` checks for subset-aware logic (for example, `format instanceof MatroskaInputFormat` is true for
|
||||||
|
|||||||
Reference in New Issue
Block a user