@livekit/components-js-docs 0.1.37 → 0.1.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/generated-docs/core/chatoptions.md +3 -3
  2. package/generated-docs/core/createchatobserver.md +23 -0
  3. package/generated-docs/core/index.md +4 -1
  4. package/generated-docs/core/{chatmessage.id.md → legacychatmessage.ignore.md} +3 -3
  5. package/generated-docs/core/legacychatmessage.md +24 -0
  6. package/generated-docs/core/{chatmessage.message.md → legacyreceivedchatmessage.ignore.md} +3 -3
  7. package/generated-docs/core/legacyreceivedchatmessage.md +24 -0
  8. package/generated-docs/core/messagedecoder.md +10 -2
  9. package/generated-docs/core/messageencoder.md +10 -2
  10. package/generated-docs/core/receivedchatmessage.md +4 -5
  11. package/generated-docs/core/setupchat.md +9 -1
  12. package/generated-docs/core/setupchatmessagehandler.md +33 -0
  13. package/generated-docs/react/{voiceassistantstate.md → agentstate.md} +5 -3
  14. package/generated-docs/react/{chatmessage.id.md → allowmediaplaybackprops.label.md} +3 -3
  15. package/generated-docs/react/allowmediaplaybackprops.md +26 -0
  16. package/generated-docs/react/barvisualizerprops.md +1 -1
  17. package/generated-docs/react/barvisualizerprops.state.md +1 -1
  18. package/generated-docs/react/component/barvisualizer.md +1 -1
  19. package/generated-docs/react/component/controlbar.md +1 -1
  20. package/generated-docs/react/component/participantloop.md +1 -1
  21. package/generated-docs/react/component/prejoin.md +1 -1
  22. package/generated-docs/react/component/startmediabutton.md +35 -0
  23. package/generated-docs/react/component/trackloop.md +5 -5
  24. package/generated-docs/react/component/videoconference.md +1 -1
  25. package/generated-docs/react/component/voiceassistantcontrolbar.md +10 -2
  26. package/generated-docs/react/controlbarprops.md +6 -6
  27. package/generated-docs/react/controlbarprops.saveuserchoices.md +1 -1
  28. package/generated-docs/react/hook/usechat.md +7 -6
  29. package/generated-docs/react/hook/usevoiceassistant.md +11 -3
  30. package/generated-docs/react/index.md +42 -42
  31. package/generated-docs/react/messagedecoder.md +9 -3
  32. package/generated-docs/react/messageencoder.md +9 -3
  33. package/generated-docs/react/meta-data.json +1 -1
  34. package/generated-docs/react/receivedchatmessage.md +4 -5
  35. package/generated-docs/react/voiceassistant.agent.md +2 -0
  36. package/generated-docs/react/voiceassistant.agentattributes.md +2 -0
  37. package/generated-docs/react/voiceassistant.agenttranscriptions.md +2 -0
  38. package/generated-docs/react/voiceassistant.audiotrack.md +2 -0
  39. package/generated-docs/react/voiceassistant.md +9 -7
  40. package/generated-docs/react/voiceassistant.state.md +3 -1
  41. package/generated-docs/react/voiceassistantcontrolbarprops.md +5 -5
  42. package/generated-docs/react/voiceassistantcontrolbarprops.saveuserchoices.md +2 -0
  43. package/package.json +2 -2
  44. package/generated-docs/core/chatmessage.md +0 -26
  45. package/generated-docs/core/chatmessage.timestamp.md +0 -13
  46. package/generated-docs/core/receivedchatmessage.edittimestamp.md +0 -13
  47. package/generated-docs/react/chatmessage.md +0 -26
  48. package/generated-docs/react/chatmessage.message.md +0 -13
  49. package/generated-docs/react/chatmessage.timestamp.md +0 -13
  50. package/generated-docs/react/component/voiceassistantcontext.md +0 -18
  51. package/generated-docs/react/receivedchatmessage.edittimestamp.md +0 -13
@@ -13,13 +13,13 @@
13
13
 
14
14
  ```typescript
15
15
  export type ChatOptions = {
16
- messageEncoder?: (message: ChatMessage) => Uint8Array;
17
- messageDecoder?: (message: Uint8Array) => ReceivedChatMessage;
16
+ messageEncoder?: (message: LegacyChatMessage) => Uint8Array;
17
+ messageDecoder?: (message: Uint8Array) => LegacyReceivedChatMessage;
18
18
  channelTopic?: string;
19
19
  updateChannelTopic?: string;
20
20
  };
21
21
  ```
22
22
 
23
- **References:** [ChatMessage](./core/chatmessage.md)<!-- -->, [ReceivedChatMessage](./core/receivedchatmessage.md)
23
+ **References:** [LegacyChatMessage](./core/legacychatmessage.md)<!-- -->, [LegacyReceivedChatMessage](./core/legacyreceivedchatmessage.md)
24
24
 
25
25
  {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -0,0 +1,23 @@
1
+ ---
2
+ {
3
+ "title": "createChatObserver",
4
+ "linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/observables/room.ts"
5
+ }
6
+ ---
7
+
8
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
9
+
10
+ # createChatObserver
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export declare function createChatObserver(
16
+ room: Room
17
+ ): Observable<
18
+ [
19
+ message: import("livekit-client").ChatMessage,
20
+ participant?: LocalParticipant | import("livekit-client").RemoteParticipant | undefined
21
+ ]
22
+ >;
23
+ ```
@@ -20,7 +20,6 @@
20
20
  | [AudioSource](./core/audiosource.md) | |
21
21
  | [BaseDataMessage](./core/basedatamessage.md) | |
22
22
  | [CaptureOptionsBySource](./core/captureoptionsbysource.md) | |
23
- | [ChatMessage](./core/chatmessage.md) | |
24
23
  | [ChatOptions](./core/chatoptions.md) | |
25
24
  | [computeMenuPosition(button, menu)](./core/computemenuposition.md) | |
26
25
  | [connectedParticipantObserver(room, identity, options)](./core/connectedparticipantobserver.md) | |
@@ -28,6 +27,7 @@
28
27
  | [connectedParticipantsObserver(room, options)](./core/connectedparticipantsobserver.md) | |
29
28
  | [connectionStateObserver(room)](./core/connectionstateobserver.md) | |
30
29
  | [createActiveDeviceObservable(room, kind)](./core/createactivedeviceobservable.md) | |
30
+ | [createChatObserver(room)](./core/createchatobserver.md) | |
31
31
  | [createConnectionQualityObserver(participant)](./core/createconnectionqualityobserver.md) | |
32
32
  | [createDataObserver(room)](./core/createdataobserver.md) | |
33
33
  | [createDefaultGrammar()](./core/createdefaultgrammar.md) | |
@@ -58,6 +58,8 @@
58
58
  | [isSourceWitOptions(source)](./core/issourcewitoptions.md) | |
59
59
  | [isTrackReferencePinned(trackReference, pinState)](./core/istrackreferencepinned.md) | Check if the <code>TrackReference</code> is pinned. |
60
60
  | [isTrackReferencePlaceholder(trackReference)](./core/istrackreferenceplaceholder.md) | |
61
+ | [LegacyChatMessage](./core/legacychatmessage.md) | |
62
+ | [LegacyReceivedChatMessage](./core/legacyreceivedchatmessage.md) | |
61
63
  | [loadUserChoices(defaults, preventLoad)](./core/loaduserchoices.md) | Reads the user choices from local storage, or returns the default settings if none are found. |
62
64
  | [LocalUserChoices](./core/localuserchoices.md) | Represents the user's choices for video and audio input devices, as well as their username. |
63
65
  | [log](./core/log.md) | |
@@ -103,6 +105,7 @@
103
105
  | [setLogLevel(level, options)](./core/setloglevel.md) | Set the log level for both the <code>@livekit/components-react</code> package and the <code>@livekit-client</code> package. To set the <code>@livekit-client</code> log independently, use the <code>liveKitClientLogLevel</code> prop on the <code>options</code> object. |
104
106
  | [SetMediaDeviceOptions](./core/setmediadeviceoptions.md) | |
105
107
  | [setupChat(room, options)](./core/setupchat.md) | |
108
+ | [setupChatMessageHandler(room)](./core/setupchatmessagehandler.md) | |
106
109
  | [setupChatToggle()](./core/setupchattoggle.md) | |
107
110
  | [setupClearPinButton()](./core/setupclearpinbutton.md) | |
108
111
  | [setupConnectionQualityIndicator(participant)](./core/setupconnectionqualityindicator.md) | |
@@ -1,13 +1,13 @@
1
1
  ---
2
- { "title": "ChatMessage.id property" }
2
+ { "title": "LegacyChatMessage.ignore property" }
3
3
  ---
4
4
 
5
5
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
6
6
 
7
- # ChatMessage.id property
7
+ # LegacyChatMessage.ignore property
8
8
 
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- id: string;
12
+ ignore?: true;
13
13
  ```
@@ -0,0 +1,24 @@
1
+ ---
2
+ {
3
+ "title": "LegacyChatMessage interface",
4
+ "linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/components/chat.ts"
5
+ }
6
+ ---
7
+
8
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
9
+
10
+ # LegacyChatMessage interface
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export interface LegacyChatMessage extends ChatMessage
16
+ ```
17
+
18
+ **Extends:** ChatMessage
19
+
20
+ ## Properties
21
+
22
+ | Property | Type | Description |
23
+ | --------------------------------------------- | ---- | ------------ |
24
+ | [ignore?](./core/legacychatmessage.ignore.md) | true | _(Optional)_ |
@@ -1,13 +1,13 @@
1
1
  ---
2
- { "title": "ChatMessage.message property" }
2
+ { "title": "LegacyReceivedChatMessage.ignore property" }
3
3
  ---
4
4
 
5
5
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
6
6
 
7
- # ChatMessage.message property
7
+ # LegacyReceivedChatMessage.ignore property
8
8
 
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- message: string;
12
+ ignore?: true;
13
13
  ```
@@ -0,0 +1,24 @@
1
+ ---
2
+ {
3
+ "title": "LegacyReceivedChatMessage interface",
4
+ "linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/components/chat.ts"
5
+ }
6
+ ---
7
+
8
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
9
+
10
+ # LegacyReceivedChatMessage interface
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export interface LegacyReceivedChatMessage extends ReceivedChatMessage
16
+ ```
17
+
18
+ **Extends:** [ReceivedChatMessage](./core/receivedchatmessage.md)
19
+
20
+ ## Properties
21
+
22
+ | Property | Type | Description |
23
+ | ----------------------------------------------------- | ---- | ------------ |
24
+ | [ignore?](./core/legacyreceivedchatmessage.ignore.md) | true | _(Optional)_ |
@@ -9,12 +9,20 @@
9
9
 
10
10
  # MessageDecoder type
11
11
 
12
+ {% callout type="caution" variation="normal" %}
13
+
14
+ This API is deprecated:
15
+
16
+ the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead
17
+
18
+ {% /callout %}
19
+
12
20
  **Signature:**
13
21
 
14
22
  ```typescript
15
- export type MessageDecoder = (message: Uint8Array) => ReceivedChatMessage;
23
+ export type MessageDecoder = (message: Uint8Array) => LegacyReceivedChatMessage;
16
24
  ```
17
25
 
18
- **References:** [ReceivedChatMessage](./core/receivedchatmessage.md)
26
+ **References:** [LegacyReceivedChatMessage](./core/legacyreceivedchatmessage.md)
19
27
 
20
28
  {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -9,12 +9,20 @@
9
9
 
10
10
  # MessageEncoder type
11
11
 
12
+ {% callout type="caution" variation="normal" %}
13
+
14
+ This API is deprecated:
15
+
16
+ the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead
17
+
18
+ {% /callout %}
19
+
12
20
  **Signature:**
13
21
 
14
22
  ```typescript
15
- export type MessageEncoder = (message: ChatMessage) => Uint8Array;
23
+ export type MessageEncoder = (message: LegacyChatMessage) => Uint8Array;
16
24
  ```
17
25
 
18
- **References:** [ChatMessage](./core/chatmessage.md)
26
+ **References:** [LegacyChatMessage](./core/legacychatmessage.md)
19
27
 
20
28
  {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -15,13 +15,12 @@
15
15
  export interface ReceivedChatMessage extends ChatMessage
16
16
  ```
17
17
 
18
- **Extends:** [ChatMessage](./core/chatmessage.md)
18
+ **Extends:** ChatMessage
19
19
 
20
20
  {% partial file="p_usage.md" variables={exampleCount: 0} /%}
21
21
 
22
22
  ## Properties
23
23
 
24
- | Property | Type | Description |
25
- | ------------------------------------------------------------- | ----------- | ------------ |
26
- | [editTimestamp?](./core/receivedchatmessage.edittimestamp.md) | number | _(Optional)_ |
27
- | [from?](./core/receivedchatmessage.from.md) | Participant | _(Optional)_ |
24
+ | Property | Type | Description |
25
+ | ------------------------------------------- | ----------- | ------------ |
26
+ | [from?](./core/receivedchatmessage.from.md) | Participant | _(Optional)_ |
@@ -19,6 +19,14 @@ export declare function setupChat(
19
19
  messageObservable: import("rxjs").Observable<ReceivedChatMessage[]>;
20
20
  isSendingObservable: BehaviorSubject<boolean>;
21
21
  send: (message: string) => Promise<ChatMessage>;
22
- update: (message: string, messageId: string) => Promise<ChatMessage>;
22
+ update: (
23
+ message: string,
24
+ originalMessageOrId: string | ChatMessage
25
+ ) => Promise<{
26
+ readonly message: string;
27
+ readonly editTimestamp: number;
28
+ readonly id: string;
29
+ readonly timestamp: number;
30
+ }>;
23
31
  };
24
32
  ```
@@ -0,0 +1,33 @@
1
+ ---
2
+ {
3
+ "title": "setupChatMessageHandler",
4
+ "linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/observables/dataChannel.ts"
5
+ }
6
+ ---
7
+
8
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
9
+
10
+ # setupChatMessageHandler
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export declare function setupChatMessageHandler(room: Room): {
16
+ chatObservable: Observable<
17
+ [
18
+ message: ChatMessage,
19
+ participant?: LocalParticipant | import("livekit-client").RemoteParticipant | undefined
20
+ ]
21
+ >;
22
+ send: (text: string) => Promise<ChatMessage>;
23
+ edit: (
24
+ text: string,
25
+ originalMsg: ChatMessage
26
+ ) => Promise<{
27
+ readonly message: string;
28
+ readonly editTimestamp: number;
29
+ readonly id: string;
30
+ readonly timestamp: number;
31
+ }>;
32
+ };
33
+ ```
@@ -1,18 +1,20 @@
1
1
  ---
2
2
  {
3
- "title": "VoiceAssistantState type",
3
+ "title": "AgentState type",
4
4
  "linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/hooks/useVoiceAssistant.ts"
5
5
  }
6
6
  ---
7
7
 
8
8
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
9
9
 
10
- # VoiceAssistantState type
10
+ # AgentState type
11
+
12
+ > This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
11
13
 
12
14
  **Signature:**
13
15
 
14
16
  ```typescript
15
- export type VoiceAssistantState =
17
+ export type AgentState =
16
18
  | "disconnected"
17
19
  | "connecting"
18
20
  | "initializing"
@@ -1,13 +1,13 @@
1
1
  ---
2
- { "title": "ChatMessage.id property" }
2
+ { "title": "AllowMediaPlaybackProps.label property" }
3
3
  ---
4
4
 
5
5
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
6
6
 
7
- # ChatMessage.id property
7
+ # AllowMediaPlaybackProps.label property
8
8
 
9
9
  **Signature:**
10
10
 
11
11
  ```typescript
12
- id: string;
12
+ label?: string;
13
13
  ```
@@ -0,0 +1,26 @@
1
+ ---
2
+ {
3
+ "title": "AllowMediaPlaybackProps interface",
4
+ "linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/components/controls/StartMediaButton.tsx"
5
+ }
6
+ ---
7
+
8
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
9
+
10
+ # AllowMediaPlaybackProps interface
11
+
12
+ **Signature:**
13
+
14
+ ```typescript
15
+ export interface AllowMediaPlaybackProps extends React.ButtonHTMLAttributes<HTMLButtonElement>
16
+ ```
17
+
18
+ **Extends:** React.ButtonHTMLAttributes&lt;HTMLButtonElement&gt;
19
+
20
+ {% partial file="p_usage.md" variables={exampleCount: 0} /%}
21
+
22
+ ## Properties
23
+
24
+ | Property | Type | Description |
25
+ | -------------------------------------------------- | ------ | ------------ |
26
+ | [label?](./react/allowmediaplaybackprops.label.md) | string | _(Optional)_ |
@@ -28,5 +28,5 @@ export interface BarVisualizerProps extends React.HTMLProps<HTMLDivElement>
28
28
  | [barCount?](./react/barvisualizerprops.barcount.md) | number | **_(BETA)_** _(Optional)_ Number of bars that show up in the visualizer |
29
29
  | [children?](./react/barvisualizerprops.children.md) | React.ReactNode | **_(BETA)_** _(Optional)_ The template component to be used in the visualizer. |
30
30
  | [options?](./react/barvisualizerprops.options.md) | [BarVisualizerOptions](./react/barvisualizeroptions.md) | **_(BETA)_** _(Optional)_ |
31
- | [state?](./react/barvisualizerprops.state.md) | [VoiceAssistantState](./react/voiceassistantstate.md) | **_(BETA)_** _(Optional)_ If set, the visualizer will transition between different voice assistant states |
31
+ | [state?](./react/barvisualizerprops.state.md) | [AgentState](./react/agentstate.md) | **_(BETA)_** _(Optional)_ If set, the visualizer will transition between different voice assistant states |
32
32
  | [trackRef?](./react/barvisualizerprops.trackref.md) | [TrackReferenceOrPlaceholder](./react/trackreferenceorplaceholder.md) | **_(BETA)_** _(Optional)_ |
@@ -13,7 +13,7 @@ If set, the visualizer will transition between different voice assistant states
13
13
  **Signature:**
14
14
 
15
15
  ```typescript
16
- state?: VoiceAssistantState;
16
+ state?: AgentState;
17
17
  ```
18
18
 
19
19
  {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -21,7 +21,7 @@ import { BarVisualizer } from "@livekit/components-react";
21
21
 
22
22
  ## Remarks
23
23
 
24
- For VoiceAssistant state transitions this component requires a voice assistant agent running with livekit-agents &gt;<!-- -->= 0.8.11
24
+ For VoiceAssistant state transitions this component requires a voice assistant agent running with livekit-agents &gt;<!-- -->= 0.9.0
25
25
 
26
26
  ## Usage
27
27
 
@@ -47,7 +47,7 @@ _(Optional)_
47
47
  {% /parameter %}
48
48
 
49
49
  {% parameter name="saveUserChoices" type="boolean" optional=true %}
50
- _(Optional)_ If `true`<!-- -->, the user's device choices will be persisted. This will enables the user to have the same device choices when they rejoin the room.
50
+ _(Optional)_ If `true`<!-- -->, the user's device choices will be persisted. This will enable the user to have the same device choices when they rejoin the room.
51
51
 
52
52
  {% /parameter %}
53
53
 
@@ -27,7 +27,7 @@ If you want to loop over individual tracks instead of participants, you can use
27
27
  const participants = useParticipants();
28
28
  <ParticipantLoop participants={participants}>
29
29
  <ParticipantName />
30
- <ParticipantLoop />
30
+ </ParticipantLoop>;
31
31
  ```
32
32
 
33
33
  {% partial file="p_usage.md" variables={exampleCount: 1} /%}
@@ -19,7 +19,7 @@ import { PreJoin } from "@livekit/components-react";
19
19
 
20
20
  ## Remarks
21
21
 
22
- This component is independent of the `LiveKitRoom` component and should not be nested within it. Because it only access the local media tracks this component is self contained and works without connection to the LiveKit server.
22
+ This component is independent of the `LiveKitRoom` component and should not be nested within it. Because it only accesses the local media tracks this component is self-contained and works without connection to the LiveKit server.
23
23
 
24
24
  ## Usage
25
25
 
@@ -0,0 +1,35 @@
1
+ ---
2
+ {
3
+ "title": "StartMediaButton",
4
+ "linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/components/controls/StartMediaButton.tsx"
5
+ }
6
+ ---
7
+
8
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
9
+
10
+ # StartMediaButton
11
+
12
+ The `StartMediaButton` component is only visible when the browser blocks media playback. This is due to some browser implemented autoplay policies. To start media playback, the user must perform a user-initiated event such as clicking this button. As soon as media playback starts, the button hides itself again.
13
+
14
+ ## Import
15
+
16
+ ```typescript
17
+ import { StartMediaButton } from "@livekit/components-react";
18
+ ```
19
+
20
+ ## Usage
21
+
22
+ ```tsx
23
+ <LiveKitRoom>
24
+ <StartMediaButton label="Click to allow media playback" />
25
+ </LiveKitRoom>
26
+ ```
27
+
28
+ {% partial file="p_usage.md" variables={exampleCount: 1} /%}
29
+
30
+ ## Properties
31
+
32
+ {% parameter name="label" type="string" optional=true %}
33
+ _(Optional)_
34
+
35
+ {% /parameter %}
@@ -21,11 +21,11 @@ import { TrackLoop } from "@livekit/components-react";
21
21
 
22
22
  ```tsx
23
23
  const trackRefs = useTracks([Track.Source.Camera]);
24
- <TrackLoop tracks={trackRefs} >
25
- <TrackRefContext.Consumer>
26
- {(trackRef) => trackRef && <VideoTrack trackRef={trackRef}/>}
27
- </TrackRefContext.Consumer>
28
- <TrackLoop />
24
+ <TrackLoop tracks={trackRefs}>
25
+ <TrackRefContext.Consumer>
26
+ {(trackRef) => trackRef && <VideoTrack trackRef={trackRef} />}
27
+ </TrackRefContext.Consumer>
28
+ </TrackLoop>;
29
29
  ```
30
30
 
31
31
  {% partial file="p_usage.md" variables={exampleCount: 1} /%}
@@ -19,7 +19,7 @@ import { VideoConference } from "@livekit/components-react";
19
19
 
20
20
  ## Remarks
21
21
 
22
- The component is implemented with other LiveKit components like `FocusContextProvider`<!-- -->, `GridLayout`<!-- -->, `ControlBar`<!-- -->, `FocusLayoutContainer` and `FocusLayout`<!-- -->. You can use this components as a starting point for your own custom video conferencing application.
22
+ The component is implemented with other LiveKit components like `FocusContextProvider`<!-- -->, `GridLayout`<!-- -->, `ControlBar`<!-- -->, `FocusLayoutContainer` and `FocusLayout`<!-- -->. You can use these components as a starting point for your own custom video conferencing application.
23
23
 
24
24
  ## Usage
25
25
 
@@ -17,7 +17,15 @@
17
17
  import { VoiceAssistantControlBar } from "@livekit/components-react";
18
18
  ```
19
19
 
20
- {% partial file="p_usage.md" variables={exampleCount: 0} /%}
20
+ ## Usage
21
+
22
+ ```tsx
23
+ <LiveKitRoom ... >
24
+ <VoiceAssistantControlBar />
25
+ </LiveKitRoom>
26
+ ```
27
+
28
+ {% partial file="p_usage.md" variables={exampleCount: 1} /%}
21
29
 
22
30
  ## Properties
23
31
 
@@ -35,6 +43,6 @@ import { VoiceAssistantControlBar } from "@livekit/components-react";
35
43
  {% /parameter %}
36
44
 
37
45
  {% parameter name="saveUserChoices" type="boolean" optional=true %}
38
- _(Optional)_ If `true`<!-- -->, the user's device choices will be persisted. This will enables the user to have the same device choices when they rejoin the room.
46
+ **_(BETA)_** _(Optional)_ If `true`<!-- -->, the user's device choices will be persisted. This will enables the user to have the same device choices when they rejoin the room.
39
47
 
40
48
  {% /parameter %}
@@ -21,9 +21,9 @@ export interface ControlBarProps extends React.HTMLAttributes<HTMLDivElement>
21
21
 
22
22
  ## Properties
23
23
 
24
- | Property | Type | Description |
25
- | -------------------------------------------------------------- | ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
- | [controls?](./react/controlbarprops.controls.md) | [ControlBarControls](./react/controlbarcontrols.md) | _(Optional)_ |
27
- | [onDeviceError?](./react/controlbarprops.ondeviceerror.md) | (error: { source: Track.Source; error: Error; }) =&gt; void | _(Optional)_ |
28
- | [saveUserChoices?](./react/controlbarprops.saveuserchoices.md) | boolean | _(Optional)_ If <code>true</code>, the user's device choices will be persisted. This will enables the user to have the same device choices when they rejoin the room. |
29
- | [variation?](./react/controlbarprops.variation.md) | 'minimal' \| 'verbose' \| 'textOnly' | _(Optional)_ |
24
+ | Property | Type | Description |
25
+ | -------------------------------------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
26
+ | [controls?](./react/controlbarprops.controls.md) | [ControlBarControls](./react/controlbarcontrols.md) | _(Optional)_ |
27
+ | [onDeviceError?](./react/controlbarprops.ondeviceerror.md) | (error: { source: Track.Source; error: Error; }) =&gt; void | _(Optional)_ |
28
+ | [saveUserChoices?](./react/controlbarprops.saveuserchoices.md) | boolean | _(Optional)_ If <code>true</code>, the user's device choices will be persisted. This will enable the user to have the same device choices when they rejoin the room. |
29
+ | [variation?](./react/controlbarprops.variation.md) | 'minimal' \| 'verbose' \| 'textOnly' | _(Optional)_ |
@@ -6,7 +6,7 @@
6
6
 
7
7
  # ControlBarProps.saveUserChoices property
8
8
 
9
- If `true`<!-- -->, the user's device choices will be persisted. This will enables the user to have the same device choices when they rejoin the room.
9
+ If `true`<!-- -->, the user's device choices will be persisted. This will enable the user to have the same device choices when they rejoin the room.
10
10
 
11
11
  **Signature:**
12
12
 
@@ -17,10 +17,6 @@ The `useChat` hook provides chat functionality for a LiveKit room. It returns a
17
17
  import { useChat } from "@livekit/components-react";
18
18
  ```
19
19
 
20
- ## Remarks
21
-
22
- It is possible to pass configurations for custom message encoding and decoding and non-default topics on which to send the messages.
23
-
24
20
  {% partial file="p_usage.md" variables={exampleCount: 0} /%}
25
21
 
26
22
  ## Properties
@@ -32,8 +28,13 @@ It is possible to pass configurations for custom message encoding and decoding a
32
28
 
33
29
  ```typescript
34
30
  {
35
- send: (message: string) => Promise<import("@livekit/components-core").ChatMessage>;
36
- update: (message: string, messageId: string) => Promise<import("@livekit/components-core").ChatMessage>;
31
+ send: (message: string) => Promise<import("livekit-client").ChatMessage>;
32
+ update: (message: string, originalMessageOrId: string | import("livekit-client").ChatMessage) => Promise<{
33
+ readonly message: string;
34
+ readonly editTimestamp: number;
35
+ readonly id: string;
36
+ readonly timestamp: number;
37
+ }>;
37
38
  chatMessages: ReceivedChatMessage[];
38
39
  isSending: boolean;
39
40
  }
@@ -9,7 +9,9 @@
9
9
 
10
10
  # useVoiceAssistant
11
11
 
12
- This hook looks for the first agent-participant in the room. It assumes that the agent participant is based on the LiveKit VoiceAssistant API and returns the most commonly used state vars when interacting with a VoiceAssistant.
12
+ > This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
13
+
14
+ This hook looks for the first agent-participant in the room.
13
15
 
14
16
  ## Import
15
17
 
@@ -19,9 +21,15 @@ import { useVoiceAssistant } from "@livekit/components-react";
19
21
 
20
22
  ## Remarks
21
23
 
22
- This hook requires a voice assistant agent running with livekit-agents &gt;<!-- -->= 0.8.11
24
+ This hook requires an agent running with livekit-agents &gt;<!-- -->= 0.9.0
25
+
26
+ ## Usage
27
+
28
+ ```tsx
29
+ const { state, audioTrack, agentTranscriptions, agentAttributes } = useVoiceAssistant();
30
+ ```
23
31
 
24
- {% partial file="p_usage.md" variables={exampleCount: 0} /%}
32
+ {% partial file="p_usage.md" variables={exampleCount: 1} /%}
25
33
 
26
34
  ## Returns
27
35