Reference
API methods explained
4min
message(device id, data) > onmessage(device id, data) send a message from the screen to a specific controller the screen always has the device id = 0 all other device ids should be seen as random we recommend to use the constant airconsole screen instead of 0 send a message from a controller to the screen broadcast(data) > onmessage(device id, data) send a message from the screen to all controllers setcustomdevicestateproperty(key, value) > oncustomdevicestatechange(device id, data) a device sets it's custom data property and triggers the oncustomdevicestatechange() oncustomdevicestatechange() method on the other devices setactiveplayers(max players) the screen sets maximum two devices as active players and triggers the onactiveplayerschange() onactiveplayerschange() method on the first two devices