useTextStream
Note
This feature is under active development and may change based on developer feedback and real-world usage.
Import
import { useTextStream } from "@livekit/components-react";
Usage
const { textStreams } = useTextStream("my-topic");return <div>{textStreams.map((textStream) => textStream.text)}</div>;
Properties
the topic to listen to
Returns
an array of TextStreamData that holds the text, participantInfo, and streamInfo
{textStreams: TextStreamData[];}