Skip to main content
Version: v1.17.0

Class: StageStream\<T>

Base Class for common StageStream functionality

Extends

  • TypedEmitter\<T>

Extended by

Type Parameters

T extends EventMap = never

Constructors

new StageStream()

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

Initializer for StageStream

Parameters

track: MediaStreamTrack

Media stream track to be wrapped

getStats?: GetStatsFunction

Optional 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


off()

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

De-register a callback for event E

Type Parameters

E extends string | number | symbol

Parameters

event: E

the event to de-register the callback for

callback: T[E]

the callback to be de-registered

context?: any

Returns

void

Inherited from

TypedEmitter.off


on()

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

Register a new callback for event E

Type Parameters

E extends string | number | symbol

Parameters

event: E

the event to register the callback for

callback: T[E]

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>