The useChat hook provides chat functionality for a LiveKit room.
It returns a simple send function to send chat messages and an array of chatMessages to hold received messages.
It also returns a update function that allows you to implement message-edit functionality.
Remarks
It is possible to pass configurations for custom message encoding and decoding and non-default topics on which to send the messages.
The
useChat
hook provides chat functionality for a LiveKit room. It returns a simplesend
function to send chat messages and an array ofchatMessages
to hold received messages. It also returns aupdate
function that allows you to implement message-edit functionality.Remarks
It is possible to pass configurations for custom message encoding and decoding and non-default topics on which to send the messages.