We use websockets to enable audio playback. below you will find information on what the websocket messages sent from our server look like. Our servers do not accept messages. They only send them.
Audio Server URL: ws://audioserver.eternalempires.net/?secret={YOUR_SECRET_HERE}
Field | Value | Required |
---|---|---|
type | The type of the action. 'start' | true |
audio | The URL of the audio to start | true |
startTime | The start time in seconds e.g. 2 | false |
startVolume | The volume to start the sound with (From 0 to 100) By default its 100 | false |
{
"type": "start",
"audio": "https://cdn.eternalempires.net/audio/es/6b442703-488b-4a63-9102-9d7b86d0dd1c.mp3",
"startTime": 2,
"startVolume": 90
}
Field | Value | Required |
---|---|---|
type | The type of the action. 'stop' | true |
audio | The URL of the audio to stop | true |
{
"type": "stop",
"audio": "https://cdn.eternalempires.net/audio/es/6b442703-488b-4a63-9102-9d7b86d0dd1c.mp3",
}
Field | Value | Required |
---|---|---|
type | The type of the action. 'update-volume' | true |
audio | The URL of the audio to update the volume of | true |
volume | The volume to set the audio to (From 0 to 100) | true |
{
"type": "update-volume",
"audio": "https://cdn.eternalempires.net/audio/es/6b442703-488b-4a63-9102-9d7b86d0dd1c.mp3",
"volume": 70
}