Relay.Calling.RecordAction
This object returned from recordAsync method that represents a recording that is currently active on a call.
Methods
getControlId
Return the UUID to identify the recording.
Parameters
None
Returns
string - UUID to identify the action.
Examples
Start recording in stereo mode and print the controlId.
getResult
Returns the final result of the recording.
Parameters
None
Returns
Relay.Calling.RecordResult - Final result of the recording.
Examples
Start recording in stereo mode and grab the result when it’s completed.
getPayload
Return the payload sent to Relay to initiate the request. Useful to inspect what you sent to perform this action.
Parameters
None
Returns
Object - Payload sent to Relay.
Examples
Start recording in stereo mode and print out the payload.
getState
Return the current state of recording.
Parameters
None
Returns
string - Current state of recording.
Examples
Start recording in stereo mode and print the state.
getUrl
Returns the HTTPS URL to the recording file.
Note: the recording may not be present at the URL until the recording is finished.
Parameters
None
Returns
string - HTTPS URL to the file.
Examples
Start recording and print the URL.
isCompleted
Return true if the recording has finished, false otherwise.
Parameters
None
Returns
Boolean - True/False accordingly to the state.
Examples
Start recording in stereo mode and check if it has finished.
stop
Stop the action immediately.
Parameters
None
Returns
React\Promise\Promise - Promise object that will be fulfilled with a Relay.Calling.StopResult object.
Examples
Start recording in stereo mode and stop it an Agent is not available.