Skip to main content
Version: v1.6.0

Class: StageStream<T>

Base Class for common StageStream functionality

Type parameters

NameType
Textends EventMap = never

Hierarchy

Constructors

constructor

new StageStream<T>(track, getStats?)

Type parameters

NameType
Textends EventMap = never

Parameters

NameType
trackMediaStreamTrack
getStats?GetStatsFunction

Overrides

TypedEmitter<T\>.constructor

Properties

id

id: string


isMuted

isMuted: boolean


mediaStreamTrack

mediaStreamTrack: MediaStreamTrack


streamType

streamType: StreamType

Methods

cleanup

cleanup(): void

Returns

void


emit

emit<E>(event, ...args): void

Emit args for event E

Type parameters

NameType
Eextends string | number | symbol

Parameters

NameTypeDescription
eventEthe event name
...argsParameters<T[E]>-

Returns

void

Inherited from

TypedEmitter.emit


off

off<E>(event, callback): void

De-register a callback for event E

Type parameters

NameType
Eextends string | number | symbol

Parameters

NameTypeDescription
eventEthe event to de-register the callback for
callbackT[E]the callback to be de-registered

Returns

void

Inherited from

TypedEmitter.off


on

on<E>(event, callback): void

Register a new callback for event E

Type parameters

NameType
Eextends string | number | symbol

Parameters

NameTypeDescription
eventEthe event to register the callback for
callbackT[E]the callback to be invoked for the event

Returns

void

Inherited from

TypedEmitter.on


removeAllListeners

removeAllListeners(): void

Remove all event listeners

Returns

void

Inherited from

TypedEmitter.removeAllListeners


requestRTCStats

requestRTCStats(): Promise<undefined | RTCStatsReport>

Get the RTC Stats report for this media source

Returns

Promise<undefined | RTCStatsReport>


setGetStats

setGetStats(getStats): void

Parameters

NameType
getStatsGetStatsFunction

Returns

void