***

title: PlayAction
slug: /reference/python/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/python/relay/call/play

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

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

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

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

[volume]: /docs/server-sdks/reference/python/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] (`control_id`,
`is_done`, `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/python/relay/actions/play-action/stop">
    Stop audio playback immediately.
  </Card>

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

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

  <Card title="volume" href="/docs/server-sdks/reference/python/relay/actions/play-action/volume">
    Adjust audio playback volume.
  </Card>
</CardGroup>

## **Example**

```python {11}
from signalwire.relay import RelayClient

client = RelayClient(
    project="your-project-id",
    token="your-api-token",
    host="your-space.signalwire.com",
    contexts=["default"],
)

@client.on_call
async def handle_call(call):
    await call.answer()
    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()

client.run()
```