***

title: playBackgroundFile
slug: /reference/typescript/agents/function-result/play-background-file
description: Play an audio file in the background during a call.
max-toc-depth: 3
---------------------

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

[functionresult]: /docs/server-sdks/reference/typescript/agents/function-result

Play an audio file in the background while the conversation continues.

## **Parameters**

<ParamField path="filename" type="string" required={true} toc={true}>
  URL of the audio file to play (e.g., `"https://example.com/hold-music.mp3"`).
</ParamField>

<ParamField path="wait" type="boolean" default="false" toc={true}>
  When `true`, suppresses the agent's attention-getting behavior during playback.
  The agent will not try to re-engage the user while the file is playing.
</ParamField>

## **Returns**

[`FunctionResult`][functionresult] -- `this`, for chaining.

## **Example**

```typescript {4}
import { FunctionResult } from '@signalwire/sdk';

const result = new FunctionResult()
  .playBackgroundFile('https://example.com/hold-music.mp3');
```