Skip to main content

Relay.Calling.RecordAction

This object returned from recordAsync method that represents a recording currently active on a call.

Properties

PropertyTypeDescription
resultRelay.Calling.RecordResultFinal result of recording
statestringCurrent state of recording
urlstringHTTPS URL to the recording file. It may not be present at the URL until the recording is finished.
completedbooleanWhether the recording has finished
payloadobjectPayload sent to Relay to start recording
controlIdstringUUID 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)