🔊Sounds
MelodyMine Sounds API
To use the MelodyMine Sound API, you need to navigate to the path web/client/src/
within the MelodyMine website and open the file sounds.ts
.
In this file you will find a list of JSON objects representing different sounds.
To add a new sound to the client, you simply need to follow a similar procedure to the example provided below:
If you prefer to keep the sound files locally, you can place your sound files in the directory web/client/public/sound
, and then reference them in the sounds.ts
file using URLs like sound/sound-name.mp3
.
If you wish to utilize radio streams, you can directly provide the stream link in the url
field of the sound object in the sounds.ts
file.
Please note that when you make changes to the sounds.ts
file or any other file in the client, to initialize all the files and update the client for players to be able to play sounds, you need to rebuild the Docker image and remove the Docker volume for the client to clear caches.
To perform this task, follow these commands in sequence after navigating to the directory web/docker
:
Sound Events and Managers
You can create and utilize events and sound managers within MelodyMine to handle various functionalities related to sounds.
By navigating to the Sounds Events and Sounds Manager pages in the MelodyMine plugin, you can explore examples of how sound is used within the plugin.
One of the plugins built using the MelodyMine Sound API is MelodyRadio.
Events
🔹SoundManagers
🔸SoundLast updated