Relay.Calling.RecordAction
This object returned from recordAsync
method that represents a recording currently active on a call.
Properties
Property | Type | Description |
---|---|---|
result | Relay.Calling.RecordResult | Final result of recording |
state | string | Current state of recording |
url | string | HTTPS URL to the recording file. It may not be present at the URL until the recording is finished. |
completed | boolean | Whether the recording has finished |
payload | object | Payload sent to Relay to start recording |
controlId | string | UUID to identify the recording |
Methods
stop
Stop the action immediately.
Parameters
None
Returns
Promise<StopResult>
- Promise object that will be fulfilled with a Relay.Calling.StopResult
object.
Examples
Start recording in stereo mode and stop it if
Agent
is not available.
async function main() {
const action = await call.recordAsync({
stereo: true
})
if (Agent.isAvailable() === false) {
const stopResult = await action.stop()
}
}
main().catch(console.error)