Skip to navigation

Endpoint (interface)

Web SDK v5 API reference
View as Markdown

Conference

Interface that represents a remote participant in a conference.

Methods

addEventListener

addEventListener(eventName: EndpointEvent, listener: (event: AnyEndpointEvent) => 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 registration.

Parameters

ParameterTypeRequirementDescription
eventNameEndpointEventRequiredEvent name
listener(event: AnyEndpointEvent) => 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

getAnyAudioStreams

getAnyAudioStreams(): RemoteStream[]

Returns the array of all the remote audio streams associated with the endpoint.

Returns: RemoteStream[]

getAnyVideoStreams

getAnyVideoStreams(): RemoteStream[]

Returns the array of all the remote audio streams associated with the endpoint.

Returns: RemoteStream[]

getAudioStreams

getAudioStreams(): RemoteStream[]

Returns array of the remote audio streams associated with the endpoint.

Returns: RemoteStream[]

getScreenSharingStreams

getScreenSharingStreams(): RemoteStream[]

Returns the array of the screen sharing video streams associated with the endpoint.

Returns: RemoteStream[]

getVideoStreams

getVideoStreams(): RemoteStream[]

Returns the array of the remote video streams associated with the endpoint.

Returns: RemoteStream[]

removeEventListener

removeEventListener(eventName: EndpointEvent, listener: (event: AnyEndpointEvent) => void | Promise<void>): void

Removes a previously registered handler for the specified event.

Parameters

ParameterTypeRequirementDescription
eventNameEndpointEventRequiredEvent name
listener(event: AnyEndpointEvent) => void | Promise<void>RequiredHandler function to remove from the event target

Returns: void

requestVideoSize

requestVideoSize(width: number, height: number): void

Requests the specified video size for a remote video stream.

The stream resolution may be changed to the closest to the specified width and height.

It only makes an impact if the endpoint has enabled the simulcast feature.

Parameters

ParameterTypeRequirementDescription
widthnumberRequiredRequested video frame width
heightnumberRequiredRequested video frame height

Returns: void

startReceivingAudio

startReceivingAudio(): void

Starts receiving audio from the endpoint.

If the video has been already receiving, this method call is ignored.

If the request is processed successfully, the EndpointEvent.StartReceivingAudioStream event is triggered.

Returns: void

startReceivingVideo

startReceivingVideo(): void

Starts receiving video from the endpoint.

If the video has been already receiving, this method call is ignored.

If the request is processed successfully, the EndpointEvent.StartReceivingVideoStream event is triggered.

Returns: void

stopReceivingAudio

stopReceivingAudio(): void

Stops receiving audio from the endpoint.

If the request is processed successfully, the EndpointEvent.StopReceivingAudioStream event is triggered with the StreamReceiveStopReason.Manual reason.

Returns: void

stopReceivingVideo

stopReceivingVideo(): void

Stops receiving video from the endpoint.

If the request is processed successfully, the EndpointEvent.StopReceivingVideoStream event is triggered with the StreamReceiveStopReason.Manual reason.

Returns: void

Properties

displayName

displayName: string

Endpoint user display name.

id

id: string

Endpoint id.

isMicrophoneMuted

isMicrophoneMuted: Watchable<boolean>

Watchable property that allows getting the remote participant mute status and observing its changes.

isScreenSharing

isScreenSharing: boolean

Whether the endpoint represents the remote participant screen sharing.

streams

streams: Map<string, RemoteStream>

Map of the remote audio and video streams associated with the endpoint.

userName

userName: string

Endpoint user name.

voiceActivityDetected

voiceActivityDetected: Watchable<boolean>

Watchable property that allows getting the voice activity status of the remote participant and observing its changes.