narrow-egg-50997
03/26/2025, 6:39 PMtall-airline-16756
03/26/2025, 6:39 PMtall-airline-16756
03/26/2025, 6:39 PMstreamText(for:)
- Stream text incrementally to participants using a topic string. Example usage: @discardableResult func streamText(for topic: String) async throws -> TextStreamWriter
.
• streamText(options:)
- Stream text with custom options. Example usage: @discardableResult func streamText(options: StreamTextOptions) async throws -> TextStreamWriter
.
When streaming text incrementally, you open a stream writer, send data in chunks, and must explicitly close the stream when finished. Each stream is associated with a topic, and you need to register a handler to receive incoming streams for that topic. Streams can target specific participants or the entire room.
Sources: streamText(for:) | Documentation | streamText(options:) | Documentation | Sending text | LiveKit Docs