Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You can listen for changes in the operation mode through the Sockets.OP_MODE_RECEIVED event listener callback on the SDK:

Code Block
languagejs
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');
    }
});

...