How to use audio sources.
OpenAudioMc is a web-first platform, meaning that everything you give it as input has to be accessible over the internet. In this case, that means that your media sources need to come from a publicly available web-page or another supported platform.
This usually comes in the form of URL's you enter within your other audio related commands or API queries.
We support a handful of methods to get your media to the client. These include:
OpenAudioMc supports random media playback, which means that you can give it a list of media sources and pick one at random to play. These lists are treated as playlists when the media is set to loop (as is the case in regions, speakers, and when you manually set the flag). To do this, simply provide a JSON array in place of a single media source. For example:
Media playback behaviour can be configured through Media Options. These can be used in some commands in the form of a JSON string, or as a
MediaOptions object through the API.
It supports the following properties
fadeTime(Integer): Time for the sound to fade in (in MS)
id(String): A manual ID/reference to the newly started media. Can be used to stop/edit this media later on
loopBoolean: A boolean flag that indicates if this media should loop when it finished (true/false), default is false.
pickUpBoolean: A boolean flag that indicates if the client should attempt to synchronize with other listeners. Default is false.
expirationTimeoutInteger: Media is normally only started for players who have their client open at the time the command is sent. With this timeout, you can make OpenAudioMc wait a given amount of time (in seconds), after which the media will still play for a client even if they connected a bit later.
volumeInteger: The volume (from 0 to 100%) at which the media should be played. This is still relative to the users own volume slider. (Default value is 100)
Note that the JSON may never include spaces or line breaks.