mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 23:16:21 +00:00
4833ab8447
When the server (soundboard_sounds table) returns no pads, the client now loads them from a JSON5 config file (loadGamedata accepts plain JSON and JSON5). Useful when the DB / CMS isn't set up yet. File-defined pads play locally for the clicker; DB-backed pads still go through the server broadcast so everyone in the room hears them. Ships a radio-style soundboard-sounds.json5.example template.
21 lines
947 B
Plaintext
21 lines
947 B
Plaintext
{
|
|
// Soundboard pads loaded from a file — used as a FALLBACK when the server
|
|
// (soundboard_sounds DB table) returns no sounds. Copy this file to
|
|
// `soundboard-sounds.json5` (without .example) and add your sounds. JSON5:
|
|
// // comments and trailing commas are allowed.
|
|
//
|
|
// Fields:
|
|
// id - unique number (pad key)
|
|
// name - label shown on the pad
|
|
// url - audio file URL (mp3/ogg/wav). Relative urls resolve against
|
|
// `soundboard.url.prefix` (falls back to `asset.url`).
|
|
//
|
|
// NOTE: file-defined pads play LOCALLY for the person who clicks them. To
|
|
// broadcast a pad to everyone in the room, the sound must exist server-side
|
|
// in the soundboard_sounds table (same flow as custom badges). The file is
|
|
// the no-DB / offline option; the DB is the multiplayer one.
|
|
sounds: [
|
|
// { id: 1, name: 'Airhorn', url: 'https://your-host/airhorn.mp3' },
|
|
],
|
|
}
|