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.

1add(parameters: EndpointParameters): Endpoint

Parameters

parameters
EndpointParametersRequired

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.

1addEventListener(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.

1get(id: string): Endpoint

Parameters

id
stringRequired

getList

Gets the endpoint list for current conference.

1getList(): Endpoint[]

id

Returns the conference’s id.

1id(): string

removeEventListener

Removes a handler for the specified ConferenceEvents event.

1removeEventListener(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.

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

Parameters

mediaUnit
VoxMediaUnitRequired
parameters
SendMediaParameters

stop

Stops the conference. Triggers the ConferenceEvents.Stopped event.

1stop(): void

stopMediaTo

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

1stopMediaTo(mediaUnit: VoxMediaUnit): void

Parameters

mediaUnit
VoxMediaUnitRequired