Rasterex APINPM Package/docs/components/collaboration/setup

User Set

Establish participant identity for attribution and synchronization using the SDK.

Identity Setup (User Set)

Collaboration requires identifying each participant to ensure that annotations and measurements are attributed correctly.

The host application configures user details using viewer.collaboration.setUser(...) after the viewer is mounted.

  • username: A unique identifier for the user (required).
  • displayName: The name shown to other session participants.
  • email: Optional email address.
typescript
const result = await viewer.collaboration.setUser({
  username: "engineer_01",
  displayName: "Lead Engineer",
  email: "lead@project.com",
  timeoutMs: 10000
});

if (!result.success) {
  console.error("Set user failed:", result.reason);
}
Identity Setup (User Set)