ExperimentalExperimental
Sends the given bytes to participants in the room via the data channel. For files, consider using sendFile; for longer/incremental payloads, streamBytes.
The byte payload
Optionaloptions: SendBytesOptions
Optionalattributes?: Record<string, string>Optionalcompress?: booleanWhether to compress the payload (deflate-raw). Defaults to true. Compression is only applied when every recipient supports data streams v2 and the runtime can compress.
OptionaldestinationIdentities?: string[]OptionalmimeType?: stringOptionalname?: stringOptionalonProgress?: (progress: number) => voidOptionaltopic?: stringExperimental
Send a File to all participants in the room via the data channel.
The File object payload
Optionaloptions: SendFileOptions
Topic identifier used to route the stream to appropriate handlers.
A callback function used to monitor the upload progress percentage.
Experimental
Sends the given string to participants in the room via the data channel. For longer messages, consider using streamText instead.
The text payload
Optionaloptions: SendTextOptions
Optionalattachments?: File[]Optionalattributes?: Record<string, string>Optionalcompress?: booleanWhether to compress the payload (deflate-raw). Defaults to true. Compression is only applied when every recipient supports data streams v2 and the runtime can compress.
OptionaldestinationIdentities?: string[]OptionalonProgress?: (progress: number) => voidOptionaltopic?: stringExperimental
Stream bytes incrementally to participants in the room via the data channel. For sending files, consider using sendFile instead.
Optionaloptions: StreamBytesOptions
Topic identifier used to route the stream to appropriate handlers.
Methods the
dataStreamsextension adds to the local participant.