> For the complete documentation index, see [llms.txt](https://sparkar-community.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sparkar-community.gitbook.io/docs/audiomodule/playbackcontroller.md).

# PlaybackController

The `PlaybackController` class enables control of audio playback.

## Properties

This module exposes no properties.

## Methods

| Method       | Description                                                                                                                                                                                                                                       |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `loop`       | <p><code>loop(): void</code></p><p>Deprecated: Please use the <code>setLooping</code> method. Loop the playback controller, sound comes through all speakers (also known as Audio Source in the past) that reference the playback controller.</p> |
| `play`       | <p><code>play(): void</code></p><p>Deprecated: Please use the <code>setPlaying</code> method. Play the playback controller, sound comes through all speakers (also known as Audio Source in the past) that reference the playback controller.</p> |
| `reset`      | <p><code>reset(): void</code></p><p>Resets the playback controller audio to the beginning. If the playback controller is currently playing then it will immediately re-start.</p>                                                                 |
| `setLooping` | <p><code>setLooping(looping: BoolValue): void</code></p><p>Loops the playback controller. To be used in pair with the <code>setPlaying</code> method. If set to <code>true</code>, the audio will repeat infinitely.</p>                          |
| `setPlaying` | <p><code>setPlaying(playing: BoolValue): void</code></p><p>Plays or pauses the playback controller depending on the value entered. When the audio is finished playing, use <code>reset</code> to play from the beginning.</p>                     |
| `stop`       | `stop(): void` Deprecated: Please use the `setPlaying` method to pause the audio or the `reset` method to return the audio to the beginning. Stop the playback controller.                                                                        |
