***

title: TapAction
slug: /reference/typescript/relay/actions/tap-action
description: Action handle for an active media tap operation.
max-toc-depth: 3
---------------------

For a complete index of all SignalWire documentation pages, fetch https://signalwire.com/docs/llms.txt

[call-tap]: /docs/server-sdks/reference/typescript/relay/call/tap

[base-action-interface]: /docs/server-sdks/reference/typescript/relay/actions

[stop]: /docs/server-sdks/reference/typescript/relay/actions/tap-action/stop

Returned from [`call.tap()`][call-tap]. Tracks
an active media tap (audio interception) operation. Terminal state: `finished`.

Inherits all properties and methods from the
[base Action interface][base-action-interface] (`controlId`,
`isDone`, `completed`, `result`, `wait()`).

## **Properties**

No additional properties beyond the [base Action interface][base-action-interface].

## **Methods**

<CardGroup cols={2}>
  <Card title="stop" href="/docs/server-sdks/reference/typescript/relay/actions/tap-action/stop">
    Stop media interception.
  </Card>
</CardGroup>

## **Example**

```typescript {11}
import { RelayClient } from '@signalwire/sdk';

const client = new RelayClient({
  project: process.env.SIGNALWIRE_PROJECT_ID!,
  token: process.env.SIGNALWIRE_TOKEN!,
  contexts: ['default']
});

client.onCall(async (call) => {
  await call.answer();
  const action = await call.tap(
    { type: 'audio', params: { direction: 'both' } },
    { type: 'ws', params: { uri: 'wss://example.com/tap' } },
  );

  const event = await action.wait();
});

await client.run();
```