> For the complete documentation index, see [llms.txt](https://mango-5m.gitbook.io/mango5m-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mango-5m.gitbook.io/mango5m-docs/resources/mango-radio/media-player.md).

# Media Player

The station your server broadcasts itself — your own music, scheduled server-side so every listener hears the same song at the same moment.

Every other station in Mango Radio is GTA's. This one is yours.

Turn it on and a station of your choosing appears first in the list, playing audio files you drop into the resource. It is not a per-player music player — the **server** owns the playlist and the clock, so two people tuned in are listening to the same song at the same point in it. Someone tuning in mid-song drops straight into it, exactly like joining a real broadcast.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>How It Works</strong></td><td>The server clock, and why everyone hears the same moment.</td><td><a href="/mango5m-docs/resources/mango-radio/media-player/how-it-works.md">How It Works</a></td></tr><tr><td><strong>Adding Your Music</strong></td><td>Files, playlist and artwork — turning the station on.</td><td><a href="/mango5m-docs/resources/mango-radio/media-player/adding-your-music.md">Adding Your Music</a></td></tr></tbody></table>

## At a glance

|                              |                                              |
| ---------------------------- | -------------------------------------------- |
| **Where the music lives**    | `html/music/`                                |
| **Where the playlist lives** | `music.lua`                                  |
| **Who owns the clock**       | The server                                   |
| **Tuning in mid-song**       | Drops you at the right moment, not the start |
| **With the engine off**      | Paused, like every built-in station          |
| **Skipping a track**         | `PAGEUP`, and only for that listener         |
| **Station artwork**          | `html/music/logo.png`                        |
| **Shows up**                 | First in the list, straight after Radio Off  |

## Why it is server-scheduled

A music player that each client starts for itself will drift apart within a minute, and two players in the same car will hear two different songs. Mango Radio's server picks the track, records when it started, and answers every client with the same answer — so tuning in, tuning away and tuning back all land you exactly where the broadcast has got to.

## The two ways a listener leaves the broadcast

Both are deliberate, and both are configurable:

* **The engine stops.** The station pauses with it, the same way GTA silences its own stations, and picks the broadcast back up when the key turns. Governed by `requireEngine`.
* **They skip a track.** That moves them onto their own run through the playlist and leaves everyone else where they were — the same behaviour as vanilla self radio. Governed by the `skip` block, and `resyncOnReenter` decides whether getting back into a vehicle puts them back on the broadcast.

Full detail on both is in [How It Works](/mango5m-docs/resources/mango-radio/media-player/how-it-works.md).

{% hint style="warning" %}
Only host music you have the right to distribute. Your server streams these files to every connected player.
{% endhint %}
