PlayAction
Relay::Calling::PlayAction
This object is returned by the asynchronous play! family of methods and represents a playing action that is currently active on a call.
Properties
Methods
stop
Stop the action immediately.
Parameters
None
Returns
Relay::Calling::StopResult - A StopResult object with a successful property.
pause
Pause the playback immediately.
Parameters
None
Returns
Relay::Calling::PlayPauseResult - A PlayPauseResult object with a successful property.
Examples
Play some audio and pause after 2 seconds.
resume
Resume the playback immediately.
Parameters
None
Returns
Relay::Calling::PlayResumeResult - A PlayResumeResult object with a successful property.
Examples
Play some audio and pause after 2 seconds, then resume playing after 2 more seconds
volume
Sets the volume for the playback.
Uses a value from -40dB to +40dB where 0 is original audio and -40 is muted. It follows the standard amplitude voltage gain factor: 10 pow (value / 20).
Parameters
Returns
Relay::Calling::PlayVolumeResult - A PlayVolumeResult object with a successful property.
Examples
Play some audio and change the volume