@docx-editor.dev/pro/collaboration/webrtc
Peer-to-peer convenience wrapper: one owned y-webrtc room over the full-document collaboration replica.
Functions (3)
createCollaborationRoomIdfunctionSource ↗
Create a cryptographically strong room identifier. It is not an authorization token.
declare function createCollaborationRoomId(): string;createWebrtcCollaborationfunctionSource ↗
Create one owned y-webrtc room and provider-neutral collaboration session.
declare function createWebrtcCollaboration(options: CreateWebrtcCollaborationOptions): Promise<WebrtcCollaborationHandle>;validateRoomIdfunctionSource ↗
Validate and normalize a room identifier from a host interface.
declare function validateRoomId(value: string): string;Interfaces (2)
CreateWebrtcCollaborationOptionsinterfaceSource ↗
Options for the owned WebRTC collaboration convenience wrapper.
interface CreateWebrtcCollaborationOptions| Member | Type | Summary |
|---|---|---|
| bootstrap | CollaborationBootstrap | |
| iceServers? | readonly RTCIceServer[] | |
| identity | CollaborationIdentity | |
| offlineEditing? | boolean | Admit local edits while the transport is `disconnected`. Buffered updates merge on reconnect. See [CreateDocumentCollaborationOptions.offlineEditing](CreateDocumentCollaborationOptions.offlineEditing). |
| password? | string | Signaling encryption secret for `y-webrtc`. |
| roomId | string | |
| signaling? | readonly string[] |
WebrtcCollaborationHandleinterfaceSource ↗
Owned WebRTC provider and provider-neutral collaboration resources.
interface WebrtcCollaborationHandle extends DocumentCollaborationHandle| Member | Type | Summary |
|---|---|---|
| provider | WebrtcProvider | |
| ydoc | Y.Doc |
Variables (1)
DEMO_SIGNALING_ENDPOINTSconstSource ↗
Public demo signaling endpoints. Use these endpoints for demos only.
Production deployments must pass their own signaling URLs and TURN servers. WebRTC peers cannot connect across many networks without TURN.
DEMO_SIGNALING_ENDPOINTS: readonly string[]