Message API/docs/components/collaboration/control

Sync Control

Enable or disable real-time synchronization state.

Enabling Collaboration

Once the user is identified, the host can enable or disable the collaboration features. When enabled, the canvas connects to the synchronization bridge to broadcast and receive updates.

Host Sends

Toggle Collaboration

Enable or disable real-time sync.

javascript
// Enable collaboration sync
viewer.postMessage({
  type: "collaboration",
  payload: {
    enabled: true
  }
}, viewerOrigin);

Implementation Notes

Enabling collaboration should typically happen after the viewer has broadcasted that it is ready, and after user details have been set via `setUser`.

When disabled, the canvas will stop sending its own updates and will no longer listen for incoming synchronization messages from other participants.