Table of contents

Options for the useMultiplayerSync hook.

interface UseMultiplayerSyncOptions {}

Properties

assets

The asset store for blob storage. See .

If you don't have time to implement blob storage and just want to get started, you can use the inline base64 asset store. Note that storing base64 blobs inline in JSON is very inefficient and will cause performance issues quickly with large images and videos.

assets: TLAssetStore

uri

The URI of the multiplayer server. This must include the protocol,

e.g. wss://server.example.com/my-room or ws://localhost:5858/my-room.

Note that the protocol can also be https or http and it will upgrade to a websocket connection.

uri: string

userInfo

A signal that contains the user information needed for multiplayer features. This should be synchronized with the userPreferences configuration for the main <Tldraw /> component. If not provided, a default implementation based on localStorage will be used.

userInfo?: Signal<TLMultiplayerUserInfo> | TLMultiplayerUserInfo

UseMultiplayerDemoOptionsActionsProviderProps