Skip to navigation

Conference

Represents audio or video conference. Add the following line to your scenario code to use the class: require(Modules.Conference);

View as Markdown

Methods

add

Creates a new Endpoint instance and adds it to the specified conference. IMPORTANT! You can only use this function for a conference with the “video conference” option checked in the routing rule. Otherwise, you receive the ConferenceEvents.ConferenceError event with code 102. The maximum number of endpoints is 100.

add(parameters: EndpointParameters): Endpoint

Parameters

parameters
EndpointParametersRequired
parameters.receiveParameters
ReceiveParameters

optional

Optional. Endpoints and their streams (audio and/or video) to receive. These settings apply to the target endpoint right after adding it to a conference.

parameters.receiveParameters[remoteParticipantId]
ParticipantReceiveParameters

index signature

Substitute one of the available keys from the description.

parameters.receiveParameters[remoteParticipantId].video
Array<'default' | string>

optional

Optional. Video streams to receive.

parameters.receiveParameters[remoteParticipantId].audio
Array<'default' | string>

optional

Optional. Audio streams to receive.

addEventListener

Adds a handler for the specified ConferenceEvents event. Use only functions as handlers; anything except a function leads to the error and scenario termination when a handler is called.

addEventListener(event: ConferenceEvents | T, callback: (event: _ConferenceEvents[T]) => any): void

Parameters

event
ConferenceEvents | TRequired
callback
(event: _ConferenceEvents[T]) => anyRequired

get

Gets the endpoint by the id.

get(id: string): Endpoint

Parameters

id
stringRequired

getList

Gets the endpoint list for current conference.

getList(): Endpoint[]

id

Returns the conference’s id.

id(): string

removeEventListener

Removes a handler for the specified ConferenceEvents event.

removeEventListener(event: ConferenceEvents | T, callback?: (event: _ConferenceEvents[T]) => any): void

Parameters

event
ConferenceEvents | TRequired
callback
(event: _ConferenceEvents[T]) => any

sendMediaTo

Starts sending media (voice and video) from the conference to the media unit.

sendMediaTo(mediaUnit: VoxMediaUnit, parameters?: SendMediaParameters): void

Parameters

mediaUnit
VoxMediaUnitRequired
parameters
SendMediaParameters

stop

Stops the conference. Triggers the ConferenceEvents.Stopped event.

stop(): void

stopMediaTo

Stops sending media (voice and video) from the conference to the media unit.

stopMediaTo(mediaUnit: VoxMediaUnit): void

Parameters

mediaUnit
VoxMediaUnitRequired