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

Returns

  • type:

    void

addPlaybackMarker

Copy URL
addPlaybackMarker(offset: 

number

,
playbackId:

string

):

void

Adds a Dialogflow speech synthesis playback marker. The CCAI.Events.Participant.MarkerReached event is triggered when the marker is reached.

Parameters

  • offset:

    number

    Marker

  • playbackId:

    string

    Optional

    Playback id

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

Returns the call associated with the participant.

Returns

id

Copy URL
id(): 

string

Returns the 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

Returns

  • type:

    void

sendMediaTo

Copy URL
sendMediaTo(mediaUnit: 

VoxMediaUnit

,
parameters:

SendMediaParameters

):

void

Starts sending media (voice) from the Dialogflow participant to the media unit.

Parameters

Returns

  • type:

    void

stopMediaTo

Copy URL
stopMediaTo(mediaUnit: 

VoxMediaUnit

):

void

Stops sending voice from the Dialogflow participant to the media unit.

Parameters

Returns

  • type:

    void