Conference
Represents audio or video conference.
Add the following line to your scenario code to use the class:
require(Modules.Conference);
Methods
add
add(options: ):
Creates a new endpoint 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.
Parameters
options:
Returns
type:
addEventListener
addEventListener(event: , callback: Function
): void
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
Parameters
event:
Event class (i.e., ConferenceEvents.Started)
callback:
Function
Handler function. A single parameter is passed - object with event information
Returns
type:
void
get
get(id: string
):
Gets the endpoint by the id.
Parameters
id:
string
endpoint's id
Returns
type:
removeEventListener
removeEventListener(event: , callback: Function
): void
Removes a handler for the specified ConferenceEvents event
Parameters
event:
Event class (i.e., ConferenceEvents.Started)
callback:
Function
OptionalHandler function. If not specified, all event listeners are removed
Returns
type:
void
sendMediaTo
sendMediaTo(mediaUnit: , parameters: ): void
Starts sending media (voice and video) from this conference to media unit specified in targetCall.
Parameters
mediaUnit:
media unit that receives media
parameters:
Optionalcustom parameters for WebSocket interaction only
Returns
type:
void
stop
stop(): void
Stops the conference. Triggers the ConferenceEvents.Stopped event.
Returns
type:
void
stopMediaTo
stopMediaTo(mediaUnit: ): void
Stops sending media (voice and video) from this conference to media unit specified in targetMediaUnit.
Parameters
mediaUnit:
media unit that does not need to receive media from this conference anymore.
Returns
type:
void