playAudio
playAudio
- playAudio(
params):Promise<CallPlayback>
Plays an audio file.
Parameters
params
Object containing the parameters for playing audio.
url
HTTP(s) URL to an audio resource to play.
volume
Volume value between -40dB and +40dB where 0 is unchanged.
Returns
Promise<CallPlayback>
A promise that resolves to a CallPlayback object that you can use to
view the current state and results of the play session.
Example
In this example, we dial a phone number and play an audio file. Once the audio file is finished playing, we hangup the call. We also listen for playback events.