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:
1
document.addEventListener("cohere-multiplayerupdate", (e) => {
2
console.log("Multiplayer enabled:", e.detail.enabled);
3
});
Copied!
Last modified 8mo ago
Copy link