This How-To assumes you have completed the quick start and have an exhibit connected to Gumband Cloud
Handling Operating Modes
An exhibit has two operating modes in Gumband: on or off. The operating mode can be toggled through the Gumband UI:
You can listen for changes in the operation mode through the Sockets.OP_MODE_RECEIVED
event listener callback on the SDK:
this.gumbandSDK.on(Sockets.OP_MODE_RECEIVED, (payload) => { console.log(`received op mode: ${JSON.stringify(payload)}`); if(payload.value) { console.log('OP mode now on'); } else { console.log('OP mode now off'); } });
The operating mode can be used in whatever way makes the most sense for your exhibit. For example, for signage it might toggle the screen on and off to conserve power; for an exhibit with many moving parts, perhaps it stops all motion.