You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.MD
+16-1Lines changed: 16 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,21 @@ This is the basic json configuration file layout:
28
28
# Usage
29
29
Drop your sounds into the /sounds. You can play them by sending a GET request to the /v1/play endpoint.
30
30
You need to know the base64 encoded file name of the sound you want to play. You can get started by querying /v1/list. It will return a list of all sounds with their respective base64 encoded file name.
31
-
Use that base64 as the `file` parameter in the request.
31
+
Use that base64 as the `file` parameter in the request. The response also includes sample request urls.
32
+
33
+
## Vanity IDs
34
+
When playing a sound file it will get an incrementing ID. You can use that ID to stop the sound. These are not really predictable and can change at any time. You can also use a vanity ID. This is an integer that you can use to identify the sound. You can set the vanity ID by adding a `id` parameter to the request. The response will include the vanity ID. You can then use that ID to stop the sound.
35
+
36
+
# Endpoints
37
+
> All endpoints are prefixed with `/v1/`
38
+
39
+
`GET /list` - Returns a list of all sounds with their respective base64 encoded file name. <br>
40
+
`GET /play` - Plays a sound. The `file` parameter is required. It is the base64 encoded file name of the sound you want to play. Also supports `loop` to be either `true` or `false` (default). It also supports the `id` parameter to set a vanity ID.<br>
41
+
`GET /stop` - Stops a sound. The `id` parameter is required. It is the ID of the sound you want to stop.<br>
42
+
`GET /stopAll` - Stops all sounds.<br>
43
+
`GET /buffer` - Buffers a sound. The `file` parameter is required. It is the base64 encoded file name of the sound you want to buffer.<br>
44
+
`GET /bufferAll` - Buffers all sounds. **Note**: This may take a while. And should probably be run before a show.<br>
45
+
`GET /current` - Returns a list of all currently playing sounds.<br>
46
+
`GET /remaining` - Takes a `id` parameter. Returns the remaining time of the sound with the given ID.<br>
32
47
33
48
**Note**: The sounds must be in the format `*.mp3`, `*.wav`, `*.flac` or `*.ogg` (`flac` files may take longer time to buffer).
0 commit comments