Multiplayer Status Events

If you'd like your application to respond to changes in multiplayer status (e.g. by showing an alternate UI), you can register an event listener for the cohere-multiplayerupdate event which is fired whenever multiplayer access is granted or stopped:

document.addEventListener("cohere-multiplayerupdate", (e) => {
console.log("Multiplayer enabled:", e.detail.enabled);
});

‚Äč