Interface TrackContext<EndpointMetadata, TrackMetadata>

interface TrackContext<EndpointMetadata, TrackMetadata> {
    encoding?: TrackEncoding;
    encodingReason?: EncodingReason;
    endpoint: Endpoint<EndpointMetadata, TrackMetadata>;
    maxBandwidth?: TrackBandwidthLimit;
    metadata?: TrackMetadata;
    metadataParsingError?: any;
    rawMetadata: any;
    simulcastConfig?: SimulcastConfig;
    stream: null | MediaStream;
    track: null | MediaStreamTrack;
    trackId: string;
    vadStatus: VadStatus;
    addListener<E>(event, listener): this;
    emit<E>(event, ...args): boolean;
    eventNames(): (string | symbol)[];
    getMaxListeners(): number;
    listenerCount<E>(event): number;
    listeners<E>(event): Required<TrackContextEvents<EndpointMetadata, TrackMetadata>>[E][];
    off<E>(event, listener): this;
    on<E>(event, listener): this;
    once<E>(event, listener): this;
    prependListener<E>(event, listener): this;
    prependOnceListener<E>(event, listener): this;
    rawListeners<E>(event): Required<TrackContextEvents<EndpointMetadata, TrackMetadata>>[E][];
    removeAllListeners<E>(event?): this;
    removeListener<E>(event, listener): this;
    setMaxListeners(maxListeners): this;
}

Type Parameters

  • EndpointMetadata
  • TrackMetadata

Hierarchy

Properties

encoding?: TrackEncoding

Encoding that is currently received. Only present for remote tracks.

encodingReason?: EncodingReason

The reason of currently selected encoding. Only present for remote tracks.

Endpoint this track comes from.

maxBandwidth?: TrackBandwidthLimit
metadata?: TrackMetadata

Any info that was passed in WebRTCEndpoint.addTrack.

metadataParsingError?: any
rawMetadata: any
simulcastConfig?: SimulcastConfig

Simulcast configuration. Only present for local tracks.

stream: null | MediaStream

Stream this track belongs to.

track: null | MediaStreamTrack
trackId: string

Track id. It is generated by RTC engine and takes form endpoint_id:<random_uuidv4>. It is WebRTC agnostic i.e. it does not contain mid or stream id.

vadStatus: VadStatus

Methods

  • Returns (string | symbol)[]

  • Returns number

  • Type Parameters

    Parameters

    • Optional event: E

    Returns this

  • Parameters

    • maxListeners: number

    Returns this