Skip to navigation

RemoteStream (interface)

Web SDK v5 API reference
View as Markdown

Stream

Interface that represents a remote audio, video, or screen sharing stream.

Methods

addEventListener

addEventListener(eventName: StreamEvent.Ended, listener: (event: StreamEnded) => void | Promise<void>, options: ListenerOptions): void

Registers a handler for the specified event.

One event can have more than one handler; handlers are executed in order of their registration.

Parameters

ParameterTypeRequirementDescription
eventNameStreamEvent.EndedRequiredEvent name
listener(event: StreamEnded) => void | Promise<void>RequiredHandler function that is triggered when an event of the specified type occurs
optionsListenerOptionsRequiredObject that specifies characteristics about the event listener

Returns: void

removeEventListener

removeEventListener(eventName: StreamEvent.Ended, listener: (event: StreamEnded) => void | Promise<void>, options: ListenerOptions): void

Registers a handler for the specified event.

One event can have more than one handler; handlers are executed in order of their registration.

Parameters

ParameterTypeRequirementDescription
eventNameStreamEvent.EndedRequiredEvent name
listener(event: StreamEnded) => void | Promise<void>RequiredHandler function that is triggered when an event of the specified type occurs
optionsListenerOptionsRequiredObject that specifies characteristics about the event listener

Returns: void

Properties

id

id: string

Stream id.

isReceiving

isReceiving: Watchable<boolean>

Watchable property that allows getting and setting video receiving status and observe its changes.

For the remote streams in a conference, changes the value when one of the following events is triggered:

For remote stream in a call, it is always true.

source

source: "remote"

Stream source type (remote).

sourceStream

sourceStream: MediaStream

MediaStream object.

track

MediaStreamTrack object.

type

Stream type.