play

View as Markdown

play

  • play(params): Promise<CallPlayback> - See CallPlayback for more details.

Play one or multiple media in a Call and waits until the playing has ended.

The play method is a generic method for all types of media, see playAudio, playSilence, playTTS or playRingtone for more specific usages.

Parameters

NameTypeDescription
paramsVoicePlaylistA media playlist.

Returns

Promise<CallPlayback> - See CallPlayback for more details.

Example

1await call.play(
2 new Voice.Playlist({ volume: 1.0 }).add(
3 Voice.Playlist.TTS({
4 text: "Welcome to SignalWire! Please enter your 4 digits PIN",
5 })
6 )
7);