Playlist
A Playlist object allows you to specify a series of media which should be played in sequence. You can then pass the playlist to the methods that support it, for example Call.play.
Example
Creates a playlist for playing, in sequence, a TTS message, 1 second of silence, and an mp3 file.
Constructors
constructor
• new Playlist(params?)
Instantiates an empty Playlist. Use the add method to add media to this Playlist.
Parameters
Example
Properties
media
Get the list of media that have been added to this Playlist.
Syntax: Playlist.media()
Returns: NestedArray<Object>
volume
Default volume for the audio in the playlist.
Syntax: Playlist.volume()
Returns: undefined | number
Methods
add
▸ add(params): Playlist
Adds the speecified media in series to the Playlist.
Parameters
Returns
Example
A playlist to play some audio, then a short silence, and finally a ringtone.
Audio
▸ Static Audio(params): Object
An audio media.
Parameters
Returns
Object
Example
Ringtone
▸ Static Ringtone(params): Object
A ringtone media.
Parameters
Returns
Object
Example
Silence
▸ Static Silence(params): Object
A silence interval.
Parameters
Returns
Object
Example
TTS
▸ Static TTS(params): Object
A TTS media.
Parameters
Returns
Object
Examples
Using SSML: