Represents a discrete audio track.

interface DiscreteAudioTrack {
    _loadRetries?: number;
    channelCount?: number;
    channelInterpretation?: ChannelInterpretation;
    channelLabels?: string[];
    enabledCountExempt?: boolean;
    id?: string;
    label?: string;
    nativeElement?: HTMLAudioElement;
    offset?: number;
    src: string;
    updateSrc?: ((track) => Promise<string>);
}

Properties

_loadRetries?: number

Internal state used to identify the if it is the first the the audio track is trying to load

channelCount?: number

Specifies how many channels the track contains. Only used by channel control plugin.

channelInterpretation?: ChannelInterpretation

(Default: "speakers") Channel interpretation (WebAudio)

channelLabels?: string[]

(Default: undefined) Channel layout labels to display.

enabledCountExempt?: boolean

(Default: false) determines if the track should be exempt from being counted as an enabled track (see maxEnabledTracks setting)

id?: string

Optional id of the audio file, defaults to the same as src

label?: string

Used for visualization in a UI.

nativeElement?: HTMLAudioElement

If this is set it means that the track is already enabled and added to the DOM.

offset?: number

Specifies the offset of the track relative to the master in seconds.

src: string

Source of the audio track. Also used as identifier.

updateSrc?: ((track) => Promise<string>)

Callback called when the current src fails to request a new one. This can be used to provide a new pre-signed url for example when the current url times out.

Type declaration