PlayAudioAction
Relay.Calling.PlayAudioAction​
This object represents an audio action
that is currently active on a call.
Properties​
call | Relay.Calling.Call | This is the call the action is occurring on. |
Methods​
Stop()​
Stop the action immediately.
Examples
Play an audio file and stop it upon condition.
playAction, err := resultDial.Call.PlayAudioAsync("https://cdn.signalwire.com/default-music/welcome.mp3")
if err != nil {
log.Errorf("Error occurred while trying to play audio")
}
if condition {
playAction.Stop()
}