***

title: PlayAction
slug: /reference/typescript/relay/actions/play-action
description: Action handle for an active audio playback operation.
max-toc-depth: 3
---------------------

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

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

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

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

[pause]: /docs/server-sdks/reference/typescript/relay/actions/play-action/pause

[resume]: /docs/server-sdks/reference/typescript/relay/actions/play-action/resume

[volume]: /docs/server-sdks/reference/typescript/relay/actions/play-action/volume

Returned from [`call.play()`][call-play]. Tracks
an active audio playback operation. Terminal states: `finished`, `error`.

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={3}>
  <Card title="stop" href="/docs/server-sdks/reference/typescript/relay/actions/play-action/stop">
    Stop audio playback immediately.
  </Card>

  <Card title="pause" href="/docs/server-sdks/reference/typescript/relay/actions/play-action/pause">
    Pause audio playback.
  </Card>

  <Card title="resume" href="/docs/server-sdks/reference/typescript/relay/actions/play-action/resume">
    Resume paused audio playback.
  </Card>

  <Card title="volume" href="/docs/server-sdks/reference/typescript/relay/actions/play-action/volume">
    Adjust audio playback volume.
  </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.play(
    [{ type: 'audio', url: 'https://example.com/hold-music.mp3' }],
    { volume: -5.0, loop: 0 },
  );

  // Pause and resume playback
  await action.pause();
  await action.resume();

  // Adjust volume
  await action.volume(10.0);

  // Stop playback
  await action.stop();
});

await client.run();
```