Skip to main content

Relay.Calling.TapAction

This object returned from tapAsync method that represents the running media tapping active on a call.

Properties

PropertyTypeDescription
resultRelay.Calling.TapResultFinal tap result
statestringCurrent state of tapping
completedbooleanWhether the tapping has finished
payloadobjectPayload sent to Relay to start tapping
controlIdstringUUID to identify the action
sourceDeviceobjectSource device sending media

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 tapping using RTP and stop it after 5 seconds.

async function main() {
const action = await call.tapAsync({
target_type: 'rtp',
target_addr: '192.168.1.1',
target_port: 1234
})

setTimeout(async () => {
const stopResult = await action.stop()
}, 5000)
}

main().catch(console.error)