RemoteVideoStream interface

Represents a remote participant's video or screen-sharing.

Extends

Properties

isAvailable

Whether the stream is available for rendering in the UI. When this flag becomes true, the remote participant has their video turned on. and we can create a view to display this remote video stream on the UI.

Inherited Properties

id

Id of the remote stream.

isReceiving

Whether video packets are being received. This flag can become false in cases such as remote video freezes, low network bandwidth, etc. It is recommended to display a loading spinner over the video, if isReceiving is false and isAvailable is true.

mediaStreamType

Get this remote media stream type.

size

The stream size. The higher the stream size, the better the video quality.

Methods

getMediaStream()

Get remote raw video stream

off("isAvailableChanged", PropertyChangedEvent)

Unsubscribe function for isAvailableChanged event.

off("isReceivingChanged", PropertyChangedEvent)

Unsubscribe function for isRenderingChanged event.

off("sizeChanged", PropertyChangedEvent)

Unsubscribe function for sizeChanged event.

on("isAvailableChanged", PropertyChangedEvent)

Subscribe function for isAvailableChanged event.

on("isReceivingChanged", PropertyChangedEvent)

Subscribe function for isRenderingChanged event.

on("sizeChanged", PropertyChangedEvent)

Subscribe function for sizeChanged event.

Property Details

isAvailable

Whether the stream is available for rendering in the UI. When this flag becomes true, the remote participant has their video turned on. and we can create a view to display this remote video stream on the UI.

isAvailable: boolean

Property Value

boolean

Inherited Property Details

id

Id of the remote stream.

id: number

Property Value

number

Inherited From RemoteVideoStreamCommon.id

isReceiving

Whether video packets are being received. This flag can become false in cases such as remote video freezes, low network bandwidth, etc. It is recommended to display a loading spinner over the video, if isReceiving is false and isAvailable is true.

isReceiving: boolean

Property Value

boolean

Inherited From RemoteVideoStreamCommon.isReceiving

mediaStreamType

Get this remote media stream type.

mediaStreamType: MediaStreamType

Property Value

Inherited From RemoteVideoStreamCommon.mediaStreamType

size

The stream size. The higher the stream size, the better the video quality.

size: StreamSize

Property Value

Inherited From RemoteVideoStreamCommon.size

Method Details

getMediaStream()

Get remote raw video stream

function getMediaStream(): Promise<MediaStream>

Returns

Promise<MediaStream>

MediaStream or undefined.

off("isAvailableChanged", PropertyChangedEvent)

Unsubscribe function for isAvailableChanged event.

function off(event: "isAvailableChanged", listener: PropertyChangedEvent)

Parameters

event

"isAvailableChanged"

event name.

listener
PropertyChangedEvent

callback fn that was used to subscribe to this event.

off("isReceivingChanged", PropertyChangedEvent)

Unsubscribe function for isRenderingChanged event.

function off(event: "isReceivingChanged", listener: PropertyChangedEvent)

Parameters

event

"isReceivingChanged"

event name.

listener
PropertyChangedEvent

callback fn that was used to subscribe to this event.

off("sizeChanged", PropertyChangedEvent)

Unsubscribe function for sizeChanged event.

function off(event: "sizeChanged", listener: PropertyChangedEvent)

Parameters

event

"sizeChanged"

event name.

listener
PropertyChangedEvent

callback fn that was used to subscribe to this event.

on("isAvailableChanged", PropertyChangedEvent)

Subscribe function for isAvailableChanged event.

function on(event: "isAvailableChanged", listener: PropertyChangedEvent)

Parameters

event

"isAvailableChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

on("isReceivingChanged", PropertyChangedEvent)

Subscribe function for isRenderingChanged event.

function on(event: "isReceivingChanged", listener: PropertyChangedEvent)

Parameters

event

"isReceivingChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.

on("sizeChanged", PropertyChangedEvent)

Subscribe function for sizeChanged event.

function on(event: "sizeChanged", listener: PropertyChangedEvent)

Parameters

event

"sizeChanged"

event name.

listener
PropertyChangedEvent

callback fn that will be called when value of this property will change.