Participant
Represents a CCAI participant instance.
Methods
addEventListener
addEventListener(event: , callback: Function
): void
Adds a handler for the specified CCAI.Events.Participant event. Use only functions as handlers; anything except a function leads to an error and scenario termination when a handler is called.
Parameters
event:
Event class (i.e., CCAI.Events.Participant.Created)
callback:
Function
Handler function. A single parameter is passed - object with event information
Returns
type:
void
addPlaybackMarker
addPlaybackMarker(offset: number
, playbackId: string
): void
Adds a Dialogflow speech synthesis playback marker. The Participant.MarkerReached event is triggered when the marker is reached.
Parameters
offset:
number
playbackId:
string
Optional
Returns
type:
void
analyzeContent
analyzeContent(query: | ): void
Adds a message from a participant into the Dialogflow CCAI.
Parameters
query:
Returns
type:
void
id
id(): string
Participant's ID.
Returns
type:
string
removeEventListener
removeEventListener(event: , callback: Function
): void
Removes a handler for the specified CCAI.Events.Participant event
Parameters
event:
Event class (i.e., CCAI.Events.Participant.Created)
callback:
Function
OptionalHandler function. If not specified, all event listeners are removed
Returns
type:
void
sendMediaTo
sendMediaTo(targetMediaUnit: , parameters: ): void
Starts sending voice from a Dialogflow CCAI participant to the media unit specified in targetCall.
Parameters
targetMediaUnit:
parameters:
Optional
Returns
type:
void
stopMediaTo
stopMediaTo(targetMediaUnit: ): void
Stops sending voice from a Dialogflow CCAI participant to the media unit specified in targetCall.
Parameters
targetMediaUnit:
Returns
type:
void