Skip to main content
Version: v1.19.0

StageStream

Base Class for common StageStream functionality

Extends

  • TypedEmitter<T>

Extended by

Type Parameters

Type ParameterDefault type
T extends EventMapnever

Constructors

new StageStream()

new StageStream<T>(track, getStats?): StageStream<T>

Initializer for StageStream

Parameters

ParameterTypeDescription
trackMediaStreamTrackMedia stream track to be wrapped
getStats?GetStatsFunctionOptional callback override for WebRTC stats

Returns

StageStream<T>

Overrides

TypedEmitter<T>.constructor

Properties

id

id: string


isMuted

isMuted: boolean


mediaStreamTrack

mediaStreamTrack: MediaStreamTrack


streamType

streamType: StreamType

Methods

cleanup()

cleanup(): void

Prevents the getStats closure from preventing garbage collection for

Returns

void


getStats()

getStats(): Promise<undefined | RTCStatsReport>

This API is the previous internal API and now just defers internally to the requestRTCStats.

Returns

Promise<undefined | RTCStatsReport>

Deprecated


off()

off<Event>(event, callback, context?): void

Deregister a new callback based on the event provided. The events enum is either linked in the EventMap type or in the root of the class.

Type Parameters

Type Parameter
Event extends string | number | symbol

Parameters

ParameterTypeDescription
eventEventthe event to de-register the callback for
callbackT[Event]the callback to be de-registered
context?any-

Returns

void

Inherited from

TypedEmitter.off


on()

on<Event>(event, callback, context?): void

Register a new callback based on the event provided. The events enum is either linked in the EventMap type or in the root of the class.

Type Parameters

Type Parameter
Event extends string | number | symbol

Parameters

ParameterTypeDescription
eventEventthe event to register the callback for
callbackT[Event]the callback to be invoked for the event
context?any-

Returns

void

Inherited from

TypedEmitter.on


requestRTCStats()

requestRTCStats(): Promise<undefined | RTCStatsReport>

Get the RTC Stats report for this media source

Returns

Promise<undefined | RTCStatsReport>