Rate this page:

Participant

Represents a CCAI participant instance.

Methods

addEventListener

Copy URL
addEventListener(event: 

Participant

,
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 class (i.e., CCAI.Events.Participant.Created)

  • callback:

    Function

    Handler function. A single parameter is passed - object with event information

Returns

  • type:

    void

addPlaybackMarker

Copy URL
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

Copy URL
analyzeContent(query: 

EventInput

|

TextInput

):

void

Adds a message from a participant into the Dialogflow CCAI.​

Parameters

Returns

  • type:

    void

call

Copy URL
call(): 

Call

Call object associated with the participant.

Returns

id

Copy URL
id(): 

string

Participant's ID.

Returns

  • type:

    string

removeEventListener

Copy URL
removeEventListener(event: 

Participant

,
callback:

Function

):

void

Removes a handler for the specified CCAI.Events.Participant event

Parameters

  • Event class (i.e., CCAI.Events.Participant.Created)

  • callback:

    Function

    Optional

    Handler function. If not specified, all event listeners are removed

Returns

  • type:

    void

sendMediaTo

Copy URL
sendMediaTo(targetMediaUnit: 

VoxMediaUnit

,
parameters:

SendMediaParameters

):

void

Starts sending voice from a Dialogflow CCAI participant to the media unit specified in targetCall.

Parameters

Returns

  • type:

    void

stopMediaTo

Copy URL
stopMediaTo(targetMediaUnit: 

VoxMediaUnit

):

void

Stops sending voice from a Dialogflow CCAI participant to the media unit specified in targetCall.

Parameters

Returns

  • type:

    void