CallPlayback
Represents a current or past playback in a call. You can obtain instances of this class by starting a Playback with one of the following methods:
Example
Playing a text-to-speech message and waiting for it to end before proceeding to the next instructions.
Properties
id
The unique id for this playback.
Syntax: CallPlayback.id()
Returns: string
Methods
pause
- pause():
Promise<CallPlayback>- See CallPlayback for more details.
Pauses the playback.
Returns
Promise<CallPlayback> - See CallPlayback for more details.
Example
ended
- ended():
Promise<CallPlayback>- See CallPlayback for more details.
Returns a promise that is resolved only after this playback finishes playing (or is stopped).
Returns
Promise<CallPlayback> - See CallPlayback for more details.
Example
resume
- resume():
Promise<CallPlayback>- See CallPlayback for more details.
Resumes the playback if it was paused.
Returns
Promise<CallPlayback> - See CallPlayback for more details.
Example
setVolume
- setVolume(
volume):Promise<CallPlayback>- See CallPlayback for more details.
Changes the volume of the playback.
Parameters
Returns
Promise<CallPlayback> - See CallPlayback for more details.
Example
stop
- stop():
Promise<CallPlayback>- See CallPlayback for more details.
Stops the playback.
Returns
Promise<CallPlayback> - See CallPlayback for more details.
Example
waitForEnded
- waitForEnded():
Promise<CallPlayback>- See CallPlayback for more details.
Returns a promise that is resolved only after this playback finishes playing (or is stopped).
This method is deprecated. See ended instead.