mirror of
https://github.com/arcodange-org/mediabunny.git
synced 2026-09-27 19:03:46 +02:00
Add track name support
This commit is contained in:
@@ -30,6 +30,7 @@ export type PacketStats = {
|
||||
export interface InputTrackBacking {
|
||||
getId(): number;
|
||||
getCodec(): MediaCodec | null;
|
||||
getName(): string | null;
|
||||
getLanguageCode(): string;
|
||||
getTimeResolution(): number;
|
||||
getFirstTimestamp(): Promise<number>;
|
||||
@@ -89,6 +90,11 @@ export abstract class InputTrack {
|
||||
return this._backing.getLanguageCode();
|
||||
}
|
||||
|
||||
/** A user-defined name for this track. */
|
||||
get name() {
|
||||
return this._backing.getName();
|
||||
}
|
||||
|
||||
/**
|
||||
* A positive number x such that all timestamps and durations of all packets of this track are
|
||||
* integer multiples of 1/x.
|
||||
|
||||
Reference in New Issue
Block a user