Skip to main content
Version: v1.10.1

Class: LocalStageStream

A LocalStageStream is a wrapper for media coming from local participants. It gives you the ability to perform various actions like mute and unmute participants.

Hierarchy

  • StageStream<LocalStageStreamEventMap>

    LocalStageStream

Constructors

constructor

new LocalStageStream(track, config?)

Creates an instance of a LocalStageStream

Parameters

NameTypeDescription
trackMediaStreamTrackThe MediaStreamTrack that this LocalStageStream wraps
config?StageVideoConfiguration | StageAudioConfigurationOptional video or audio configuration on the stage

Overrides

StageStream.constructor

Properties

id

id: string

Inherited from

StageStream.id


isMuted

isMuted: boolean

Inherited from

StageStream.isMuted


mediaConfig

Optional mediaConfig: StageStreamConfiguration


mediaStreamTrack

mediaStreamTrack: MediaStreamTrack

Inherited from

StageStream.mediaStreamTrack


streamType

streamType: StreamType

Inherited from

StageStream.streamType

Methods

cleanup

cleanup(): void

Prevents the getStats closure from preventing garbage collection for

Returns

void

Inherited from

StageStream.cleanup


emit

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

Emit args for event E

Type parameters

NameType
Eextends LOCAL_STREAM_MUTE_CHANGED

Parameters

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

Returns

void

Inherited from

StageStream.emit


off

off<E>(event, callback): void

De-register a callback for event E

Type parameters

NameType
Eextends LOCAL_STREAM_MUTE_CHANGED

Parameters

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

Returns

void

Inherited from

StageStream.off


on

on<E>(event, callback): void

Register a new callback for event E

Type parameters

NameType
Eextends LOCAL_STREAM_MUTE_CHANGED

Parameters

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

Returns

void

Inherited from

StageStream.on


removeAllListeners

removeAllListeners(): void

Remove all event listeners

Returns

void

Inherited from

StageStream.removeAllListeners


requestRTCStats

requestRTCStats(): Promise<undefined | RTCStatsReport>

Get the RTC Stats report for this media source

Returns

Promise<undefined | RTCStatsReport>

Inherited from

StageStream.requestRTCStats


setGetStats

setGetStats(getStats): void

Used for setting the getStats call after publishing

Parameters

NameTypeDescription
getStatsGetStatsFunctionCallback for returning getStats callback

Returns

void

Inherited from

StageStream.setGetStats


setMuted

setMuted(mute): void

Updates the mute state of this LocalStageStream

Parameters

NameTypeDescription
mutebooleanThe desired mute state of this LocalStageStream

Returns

void