CallRecording
Represents a recording of a call.
Obtain instances of this class by starting a Recording with one of the following methods:
Example
Record the audio of the call as soon as the other party answers the phone. We also print the ID of the recording and, when the call ends, the URL (which can be used to download the recording).
Properties
The unique ID for this recording.
The current state of the recording.
The URL to download the recording. Available after the recording has ended.
The size of the recording file in bytes. Available after the recording has ended.
The duration of the recording in seconds. Available after the recording has ended.
Whether the recording has ended. Returns true if the state is "finished" or "no_input".
Methods
pause
- pause(
behavior?):Promise<CallRecording>
Pauses the recording.
Parameters
skip: Does not record during the pause period. silence: Replaces the actual audio of the call with silence during the pause period.
Returns
Promise<CallRecording>
A promise that resolves to the CallRecording when the recording is paused.
Example
resume
- resume():
Promise<CallRecording>
Resumes the recording.
Returns
Promise<CallRecording>
A promise that resolves to the CallRecording when the recording is resumed.
Example
stop
- stop():
Promise<CallRecording>
Stops the recording.
Returns
Promise<CallRecording>
A promise that resolves to the CallRecording when the recording is stopped.
Example
Events
onStarted
- CallRecording.listen(
{ onStarted: Callback }})
Emitted when the recording starts. Your event handler will receive the instance of CallRecording.
Parameters
The instance of CallRecording that started.
onUpdated
▸ CallRecording.listen({ onUpdated: Callback }})
Emitted when the recording is updated. Your event handler will receive the instance of CallRecording.
Parameters
The instance of CallRecording that was updated.
onFailed
- CallRecording.listen(
{ onFailed: Callback }})
Emitted when the recording fails to start. Your event handler will receive the instance of CallRecording.
Parameters
The instance of CallRecording that failed.
onEnded
- CallRecording.listen(
{ onEnded: Callback }})
Emitted when the recording ends. Your event handler will receive the instance of CallRecording.
Parameters
The instance of CallRecording that ended.