diff --git a/src/input.ts b/src/input.ts index 33f7ff7..e41631e 100644 --- a/src/input.ts +++ b/src/input.ts @@ -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