Skip to content

ControlChannel

UnknownSKL edited this page Jul 30, 2021 · 1 revision

The control channel uses JSON as data format to communicate. As far it is known we only send messages to this channel.

Messages

All messages are JSON strings converted to a ByteBuffer. In Javascript this can be done using:

data = (new TextEncoder).encode(data)

Bitrate change

Unknown yet how this works. (min: 512, max: 12000, default: 5000) (value = *1000)

{
    "message": "rateControlBitrateUpdate",
    "bitratebps": 7500000 
}

Gamepad change

This message can be send if a gamepad disconnects. set wasAdded to false if disconnected and true if connected

{
    "message": "gamepadChanged",
    "gamepadIndex": 0,
    "wasAdded": true
}