Skip to main content

Relay.Calling.TapAction

Relay.Calling.TapAction

This object returned from tap_async 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.
payloaddictPayload sent to Relay to start tapping.
control_idstringUUID to identify the action.
source_devicedictSource device sending media.

Methods

stop

Stop the action immediately.

Parameters

None

Returns

coroutine - Coroutine that will return a Relay.Calling.StopResult object.

Examples

Start tapping using RTP and stop it after 5 seconds.

import asyncio # to use sleep

action = await call.tap_async(audio_direction='listen', target_type='rtp', target_addr='192.168.1.1', target_port=1234)
# Do other things while tapping the media and then stop it..
await asyncio.sleep(5)
await action.stop()