@livekit/components-js-docs 0.1.74 → 0.1.77
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.
- package/generated-docs/core/createdataobserver.md +1 -1
- package/generated-docs/core/createemailregexp.md +1 -1
- package/generated-docs/core/grid_layouts.md +1 -1
- package/generated-docs/core/index.md +146 -146
- package/generated-docs/core/participantagentattributes.md +1 -0
- package/generated-docs/core/participantbyidentifierobserver.md +1 -1
- package/generated-docs/core/pin_default_state.md +1 -1
- package/generated-docs/core/receivedmessage.md +1 -3
- package/generated-docs/core/setupdatamessagehandler.md +1 -1
- package/generated-docs/core/sorttrackreferences.md +1 -1
- package/generated-docs/core/widget_default_state.md +1 -1
- package/generated-docs/react/agentmood.md +37 -0
- package/generated-docs/react/agentstate.md +1 -5
- package/generated-docs/react/default_mood_ttl_turns.md +24 -0
- package/generated-docs/react/expression_attribute.md +24 -0
- package/generated-docs/react/hook/useagentexpression.md +46 -0
- package/generated-docs/react/hook/usechattoggle.md +1 -1
- package/generated-docs/react/hook/usefocustoggle.md +2 -2
- package/generated-docs/react/hook/usemediadevices.md +1 -1
- package/generated-docs/react/hook/usemediadeviceselect.md +5 -5
- package/generated-docs/react/hook/useparticipanttile.md +4 -4
- package/generated-docs/react/hook/usestartaudio.md +2 -2
- package/generated-docs/react/hook/usestartvideo.md +2 -2
- package/generated-docs/react/hook/usetracktoggle.md +1 -1
- package/generated-docs/react/index.md +140 -133
- package/generated-docs/react/meta-data.json +1 -1
- package/generated-docs/react/parseexpression.md +24 -0
- package/generated-docs/react/useagentexpressionoptions.md +30 -0
- package/generated-docs/react/useagentexpressionoptions.ttlturns.md +21 -0
- package/generated-docs/react/useagentexpressionreturn.expression.md +21 -0
- package/generated-docs/react/useagentexpressionreturn.md +29 -0
- package/generated-docs/react/useagentexpressionreturn.mood.md +21 -0
- package/generated-docs/react/usesessionreturn.md +1 -3
- package/package.json +2 -2
|
@@ -8,145 +8,146 @@
|
|
|
8
8
|
|
|
9
9
|
## Components
|
|
10
10
|
|
|
11
|
-
| Component
|
|
12
|
-
|
|
|
13
|
-
| [AudioTrack(props)](./react/component/audiotrack.md)
|
|
14
|
-
| [AudioVisualizer(props)](./react/component/audiovisualizer.md)
|
|
15
|
-
| [BarVisualizer](./react/component/barvisualizer.md)
|
|
16
|
-
| [CarouselLayout({ tracks, orientation, ...props })](./react/component/carousellayout.md) | The <code>CarouselLayout</code> component displays a list of tracks in a scroll container. It will display as many tiles as possible and overflow the rest. |
|
|
17
|
-
| [ChatEntry(props)](./react/component/chatentry.md)
|
|
18
|
-
| [ChatToggle(props)](./react/component/chattoggle.md)
|
|
19
|
-
| [ClearPinButton(props)](./react/component/clearpinbutton.md)
|
|
20
|
-
| [ConnectionQualityIndicator(props)](./react/component/connectionqualityindicator.md)
|
|
21
|
-
| [ConnectionState(props)](./react/component/connectionstate.md)
|
|
22
|
-
| [ConnectionStateToast(props)](./react/component/connectionstatetoast.md)
|
|
23
|
-
| [DisconnectButton(props)](./react/component/disconnectbutton.md)
|
|
24
|
-
| [FocusLayout({ trackRef, ...htmlProps })](./react/component/focuslayout.md) | The <code>FocusLayout</code> component is just a light wrapper around the <code>ParticipantTile</code> to display a single participant. |
|
|
25
|
-
| [FocusLayoutContainer(props)](./react/component/focuslayoutcontainer.md)
|
|
26
|
-
| [FocusToggle(props)](./react/component/focustoggle.md)
|
|
27
|
-
| [GridLayout({ tracks, ...props })](./react/component/gridlayout.md) | The <code>GridLayout</code> component displays the nested participants in a grid where every participants has the same size. It also supports pagination if there are more participants than the grid can display. |
|
|
28
|
-
| [LayoutContext](./react/component/layoutcontext.md)
|
|
29
|
-
| [LayoutContextProvider({ value, onPinChange, onWidgetChange, children, })](./react/component/layoutcontextprovider.md) | |
|
|
30
|
-
| [LiveKitRoom(props)](./react/component/livekitroom.md)
|
|
31
|
-
| [MediaDeviceSelect(props)](./react/component/mediadeviceselect.md)
|
|
32
|
-
| [ParticipantAudioTile(props)](./react/component/participantaudiotile.md)
|
|
33
|
-
| [ParticipantContext](./react/component/participantcontext.md)
|
|
34
|
-
| [ParticipantContextIfNeeded(props)](./react/component/participantcontextifneeded.md)
|
|
35
|
-
| [ParticipantLoop({ participants, ...props })](./react/component/participantloop.md) | The <code>ParticipantLoop</code> component loops over an array of participants to create a context for every participant. This component takes exactly one child component as a template. By providing your own template as a child you have full control over the look and feel of your participant representations. |
|
|
36
|
-
| [ParticipantName(props)](./react/component/participantname.md)
|
|
37
|
-
| [ParticipantTile(props)](./react/component/participanttile.md)
|
|
38
|
-
| [RoomAudioRenderer({ room, volume, muted })](./react/component/roomaudiorenderer.md) | The <code>RoomAudioRenderer</code> component is a drop-in solution for adding audio to your LiveKit app. It takes care of handling remote participants’ audio tracks and makes sure that microphones and screen share are audible. |
|
|
39
|
-
| [RoomContext](./react/component/roomcontext.md)
|
|
40
|
-
| [RoomName](./react/component/roomname.md)
|
|
41
|
-
| [SessionProvider(props)](./react/component/sessionprovider.md)
|
|
42
|
-
| [StartAudio(props)](./react/component/startaudio.md)
|
|
43
|
-
| [StartMediaButton(props)](./react/component/startmediabutton.md)
|
|
44
|
-
| [Toast(props)](./react/component/toast.md)
|
|
45
|
-
| [TrackLoop({ tracks, ...props })](./react/component/trackloop.md) | The <code>TrackLoop</code> component loops over tracks. It is for example a easy way to loop over all participant camera and screen share tracks. <code>TrackLoop</code> creates a <code>TrackRefContext</code> for each track that you can use to e.g. render the track. |
|
|
46
|
-
| [TrackMutedIndicator(props)](./react/component/trackmutedindicator.md)
|
|
47
|
-
| [TrackRefContext](./react/component/trackrefcontext.md)
|
|
48
|
-
| [TrackToggle(props)](./react/component/tracktoggle.md)
|
|
49
|
-
| [VideoTrack(props)](./react/component/videotrack.md)
|
|
11
|
+
| Component | Description |
|
|
12
|
+
| ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| [AudioTrack(props)](./react/component/audiotrack.md) | The AudioTrack component is responsible for rendering participant audio tracks. This component must have access to the participant's context, or alternatively pass it a <code>Participant</code> as a property. |
|
|
14
|
+
| [AudioVisualizer(props)](./react/component/audiovisualizer.md) | The AudioVisualizer component is used to visualize the audio volume of a given audio track. |
|
|
15
|
+
| [BarVisualizer](./react/component/barvisualizer.md) | **_(BETA)_** Visualizes audio signals from a TrackReference as bars. If the <code>state</code> prop is set, it automatically transitions between VoiceAssistant states. |
|
|
16
|
+
| [CarouselLayout({ tracks, orientation, ...props }, input)](./react/component/carousellayout.md) | The <code>CarouselLayout</code> component displays a list of tracks in a scroll container. It will display as many tiles as possible and overflow the rest. |
|
|
17
|
+
| [ChatEntry(props)](./react/component/chatentry.md) | The <code>ChatEntry</code> component holds and displays one chat message. |
|
|
18
|
+
| [ChatToggle(props)](./react/component/chattoggle.md) | The <code>ChatToggle</code> component is a button that toggles the visibility of the <code>Chat</code> component. |
|
|
19
|
+
| [ClearPinButton(props)](./react/component/clearpinbutton.md) | The <code>ClearPinButton</code> is a basic html button with the added ability to signal the <code>LayoutContext</code> that it should display the grid view again. |
|
|
20
|
+
| [ConnectionQualityIndicator(props)](./react/component/connectionqualityindicator.md) | The <code>ConnectionQualityIndicator</code> shows the individual connection quality of a participant. |
|
|
21
|
+
| [ConnectionState(props)](./react/component/connectionstate.md) | The <code>ConnectionState</code> component displays the connection status of the room as strings (<code>"connected" | "connecting" | "disconnected" | "reconnecting"</code>). |
|
|
22
|
+
| [ConnectionStateToast(props)](./react/component/connectionstatetoast.md) | The <code>ConnectionStateToast</code> component displays a toast notification indicating the current connection state of the room. |
|
|
23
|
+
| [DisconnectButton(props)](./react/component/disconnectbutton.md) | The <code>DisconnectButton</code> is a basic html button with the added ability to disconnect from a LiveKit room. Normally this is the big red button that allows end users to leave the video or audio call. |
|
|
24
|
+
| [FocusLayout({ trackRef, ...htmlProps }, input)](./react/component/focuslayout.md) | The <code>FocusLayout</code> component is just a light wrapper around the <code>ParticipantTile</code> to display a single participant. |
|
|
25
|
+
| [FocusLayoutContainer(props)](./react/component/focuslayoutcontainer.md) | The <code>FocusLayoutContainer</code> is a layout component that expects two children: A small side component: In a video conference, this is usually a carousel of participants who are not in focus. And a larger main component to display the focused participant. For example, with the <code>FocusLayout</code> component. |
|
|
26
|
+
| [FocusToggle(props)](./react/component/focustoggle.md) | The <code>FocusToggle</code> puts the <code>ParticipantTile</code> in focus or removes it from focus. |
|
|
27
|
+
| [GridLayout({ tracks, ...props }, input)](./react/component/gridlayout.md) | The <code>GridLayout</code> component displays the nested participants in a grid where every participants has the same size. It also supports pagination if there are more participants than the grid can display. |
|
|
28
|
+
| [LayoutContext](./react/component/layoutcontext.md) | |
|
|
29
|
+
| [LayoutContextProvider({ value, onPinChange, onWidgetChange, children, }, input)](./react/component/layoutcontextprovider.md) | |
|
|
30
|
+
| [LiveKitRoom(props)](./react/component/livekitroom.md) | The <code>LiveKitRoom</code> component provides the room context to all its child components. It is generally the starting point of your LiveKit app and the root of the LiveKit component tree. It provides the room state as a React context to all child components, so you don't have to pass it yourself. |
|
|
31
|
+
| [MediaDeviceSelect(props)](./react/component/mediadeviceselect.md) | The <code>MediaDeviceSelect</code> list all media devices of one kind. Clicking on one of the listed devices make it the active media device. |
|
|
32
|
+
| [ParticipantAudioTile(props)](./react/component/participantaudiotile.md) | The <code>ParticipantAudioTile</code> component is the base utility wrapper for displaying a visual representation of a participant. This component can be used as a child of the <code>TileLoop</code> or independently if a participant is passed as a property. |
|
|
33
|
+
| [ParticipantContext](./react/component/participantcontext.md) | |
|
|
34
|
+
| [ParticipantContextIfNeeded(props)](./react/component/participantcontextifneeded.md) | The <code>ParticipantContextIfNeeded</code> component only creates a <code>ParticipantContext</code> if there is no <code>ParticipantContext</code> already. |
|
|
35
|
+
| [ParticipantLoop({ participants, ...props }, input)](./react/component/participantloop.md) | The <code>ParticipantLoop</code> component loops over an array of participants to create a context for every participant. This component takes exactly one child component as a template. By providing your own template as a child you have full control over the look and feel of your participant representations. |
|
|
36
|
+
| [ParticipantName(props)](./react/component/participantname.md) | The <code>ParticipantName</code> component displays the name of the participant as a string within an HTML span element. If no participant name is undefined the participant identity string is displayed. |
|
|
37
|
+
| [ParticipantTile(props)](./react/component/participanttile.md) | The <code>ParticipantTile</code> component is the base utility wrapper for displaying a visual representation of a participant. This component can be used as a child of the <code>TrackLoop</code> component or by passing a track reference as property. |
|
|
38
|
+
| [RoomAudioRenderer({ room, volume, muted }, input)](./react/component/roomaudiorenderer.md) | The <code>RoomAudioRenderer</code> component is a drop-in solution for adding audio to your LiveKit app. It takes care of handling remote participants’ audio tracks and makes sure that microphones and screen share are audible. |
|
|
39
|
+
| [RoomContext](./react/component/roomcontext.md) | |
|
|
40
|
+
| [RoomName](./react/component/roomname.md) | The <code>RoomName</code> component renders the name of the connected LiveKit room inside a span tag. |
|
|
41
|
+
| [SessionProvider(props)](./react/component/sessionprovider.md) | **_(BETA)_** The <code>SessionProvider</code> component instantiates a SessionContext from the return of useSession |
|
|
42
|
+
| [StartAudio(props)](./react/component/startaudio.md) | The <code>StartAudio</code> component is only visible when the browser blocks audio playback. This is due to some browser implemented autoplay policies. To start audio playback, the user must perform a user-initiated event such as clicking this button. As soon as audio playback starts, the button hides itself again. |
|
|
43
|
+
| [StartMediaButton(props)](./react/component/startmediabutton.md) | The <code>StartMediaButton</code> 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. |
|
|
44
|
+
| [Toast(props)](./react/component/toast.md) | The <code>Toast</code> component is a rudimentary way to display a message to the user. This message should be short lived and not require user interaction. For example, displaying the current connection state like <code>ConnectionStateToast</code> does. |
|
|
45
|
+
| [TrackLoop({ tracks, ...props }, input)](./react/component/trackloop.md) | The <code>TrackLoop</code> component loops over tracks. It is for example a easy way to loop over all participant camera and screen share tracks. <code>TrackLoop</code> creates a <code>TrackRefContext</code> for each track that you can use to e.g. render the track. |
|
|
46
|
+
| [TrackMutedIndicator(props)](./react/component/trackmutedindicator.md) | The <code>TrackMutedIndicator</code> shows whether the participant's camera or microphone is muted or not. By default, a muted/unmuted icon is displayed for a camera, microphone, and screen sharing track. |
|
|
47
|
+
| [TrackRefContext](./react/component/trackrefcontext.md) | This context provides a <code>TrackReferenceOrPlaceholder</code> to all child components. |
|
|
48
|
+
| [TrackToggle(props)](./react/component/tracktoggle.md) | With the <code>TrackToggle</code> component it is possible to mute and unmute your camera and microphone. The component uses an html button element under the hood so you can treat it like a button. |
|
|
49
|
+
| [VideoTrack(props)](./react/component/videotrack.md) | The <code>VideoTrack</code> component is responsible for rendering participant video tracks like <code>camera</code> and <code>screen_share</code>. This component must have access to the participant's context, or alternatively pass it a <code>Participant</code> as a property. |
|
|
50
50
|
|
|
51
51
|
## Prefabs
|
|
52
52
|
|
|
53
|
-
| Prefab
|
|
54
|
-
|
|
|
55
|
-
| [AudioConference({ ...props })](./react/component/audioconference.md) | This component is the default setup of a classic LiveKit audio conferencing app. It provides functionality like switching between participant grid view and focus view. |
|
|
56
|
-
| [Chat({ messageFormatter, messageDecoder, messageEncoder, channelTopic, ...props })](./react/component/chat.md) | The Chat component provides ready-to-use chat functionality in a LiveKit room. Messages are distributed to all participants in the room in real-time. |
|
|
57
|
-
| [ControlBar({ variation, controls, saveUserChoices, onDeviceError, ...props })](./react/component/controlbar.md) | The <code>ControlBar</code> prefab gives the user the basic user interface to control their media devices (camera, microphone and screen share), open the <code>Chat</code> and leave the room. |
|
|
58
|
-
| [MediaDeviceMenu({ kind, initialSelection, onActiveDeviceChange, tracks, requestPermissions, ...props })](./react/component/mediadevicemenu.md) | The <code>MediaDeviceMenu</code> component is a button that opens a menu that lists all media devices and allows the user to select them. |
|
|
59
|
-
| [PreJoin({ defaults, onValidate, onSubmit, onError, debug, joinLabel, micLabel, camLabel, userLabel, persistUserChoices, videoProcessor, ...htmlProps })](./react/component/prejoin.md) | The <code>PreJoin</code> prefab component is normally presented to the user before he enters a room. This component allows the user to check and select the preferred media device (camera and microphone). On submit the user decisions are returned, which can then be passed on to the <code>LiveKitRoom</code> so that the user enters the room with the correct media devices. |
|
|
60
|
-
| [VideoConference({ chatMessageFormatter, chatMessageDecoder, chatMessageEncoder, SettingsComponent, ...props })](./react/component/videoconference.md) | The <code>VideoConference</code> ready-made component is your drop-in solution for a classic video conferencing application. It provides functionality such as focusing on one participant, grid view with pagination to handle large numbers of participants, basic non-persistent chat, screen sharing, and more. |
|
|
61
|
-
| [VoiceAssistantControlBar({ controls, saveUserChoices, onDeviceError, ...props })](./react/component/voiceassistantcontrolbar.md) | **_(BETA)_** |
|
|
53
|
+
| Prefab | Description |
|
|
54
|
+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
55
|
+
| [AudioConference({ ...props }, input)](./react/component/audioconference.md) | This component is the default setup of a classic LiveKit audio conferencing app. It provides functionality like switching between participant grid view and focus view. |
|
|
56
|
+
| [Chat({ messageFormatter, messageDecoder, messageEncoder, channelTopic, ...props }, input)](./react/component/chat.md) | The Chat component provides ready-to-use chat functionality in a LiveKit room. Messages are distributed to all participants in the room in real-time. |
|
|
57
|
+
| [ControlBar({ variation, controls, saveUserChoices, onDeviceError, ...props }, input)](./react/component/controlbar.md) | The <code>ControlBar</code> prefab gives the user the basic user interface to control their media devices (camera, microphone and screen share), open the <code>Chat</code> and leave the room. |
|
|
58
|
+
| [MediaDeviceMenu({ kind, initialSelection, onActiveDeviceChange, tracks, requestPermissions, ...props }, input)](./react/component/mediadevicemenu.md) | The <code>MediaDeviceMenu</code> component is a button that opens a menu that lists all media devices and allows the user to select them. |
|
|
59
|
+
| [PreJoin({ defaults, onValidate, onSubmit, onError, debug, joinLabel, micLabel, camLabel, userLabel, persistUserChoices, videoProcessor, ...htmlProps }, input)](./react/component/prejoin.md) | The <code>PreJoin</code> prefab component is normally presented to the user before he enters a room. This component allows the user to check and select the preferred media device (camera and microphone). On submit the user decisions are returned, which can then be passed on to the <code>LiveKitRoom</code> so that the user enters the room with the correct media devices. |
|
|
60
|
+
| [VideoConference({ chatMessageFormatter, chatMessageDecoder, chatMessageEncoder, SettingsComponent, ...props }, input)](./react/component/videoconference.md) | The <code>VideoConference</code> ready-made component is your drop-in solution for a classic video conferencing application. It provides functionality such as focusing on one participant, grid view with pagination to handle large numbers of participants, basic non-persistent chat, screen sharing, and more. |
|
|
61
|
+
| [VoiceAssistantControlBar({ controls, saveUserChoices, onDeviceError, ...props }, input)](./react/component/voiceassistantcontrolbar.md) | **_(BETA)_** |
|
|
62
62
|
|
|
63
63
|
## Hooks
|
|
64
64
|
|
|
65
|
-
| Hook
|
|
66
|
-
|
|
|
67
|
-
| [useAgent(session)](./react/hook/useagent.md)
|
|
68
|
-
| [
|
|
69
|
-
| [
|
|
70
|
-
| [
|
|
71
|
-
| [
|
|
72
|
-
| [
|
|
73
|
-
| [
|
|
74
|
-
| [
|
|
75
|
-
| [
|
|
76
|
-
| [
|
|
77
|
-
| [useDataChannel(onMessage)](./react/hook/
|
|
78
|
-
| [
|
|
79
|
-
| [
|
|
80
|
-
| [
|
|
81
|
-
| [
|
|
82
|
-
| [
|
|
83
|
-
| [
|
|
84
|
-
| [
|
|
85
|
-
| [
|
|
86
|
-
| [
|
|
87
|
-
| [
|
|
88
|
-
| [
|
|
89
|
-
| [
|
|
90
|
-
| [
|
|
91
|
-
| [
|
|
92
|
-
| [
|
|
93
|
-
| [
|
|
94
|
-
| [
|
|
95
|
-
| [
|
|
96
|
-
| [
|
|
97
|
-
| [
|
|
98
|
-
| [
|
|
99
|
-
| [
|
|
100
|
-
| [
|
|
101
|
-
| [
|
|
102
|
-
| [
|
|
103
|
-
| [
|
|
104
|
-
| [
|
|
105
|
-
| [
|
|
106
|
-
| [
|
|
107
|
-
| [
|
|
108
|
-
| [
|
|
109
|
-
| [
|
|
110
|
-
| [
|
|
111
|
-
| [
|
|
112
|
-
| [
|
|
113
|
-
| [
|
|
114
|
-
| [
|
|
115
|
-
| [
|
|
116
|
-
| [
|
|
117
|
-
| [
|
|
118
|
-
| [
|
|
119
|
-
| [
|
|
120
|
-
| [useRemoteParticipant(
|
|
121
|
-
| [
|
|
122
|
-
| [
|
|
123
|
-
| [
|
|
124
|
-
| [
|
|
125
|
-
| [useRpc(methodName, handler, options)](./react/hook/
|
|
126
|
-
| [useRpc(
|
|
127
|
-
| [useRpc()](./react/hook/
|
|
128
|
-
| [
|
|
129
|
-
| [
|
|
130
|
-
| [useSession(tokenSource, options)](./react/hook/
|
|
131
|
-
| [
|
|
132
|
-
| [
|
|
133
|
-
| [
|
|
134
|
-
| [
|
|
135
|
-
| [
|
|
136
|
-
| [
|
|
137
|
-
| [
|
|
138
|
-
| [
|
|
139
|
-
| [
|
|
140
|
-
| [
|
|
141
|
-
| [
|
|
142
|
-
| [
|
|
143
|
-
| [
|
|
144
|
-
| [
|
|
145
|
-
| [
|
|
146
|
-
| [
|
|
147
|
-
| [
|
|
148
|
-
| [
|
|
149
|
-
| [
|
|
65
|
+
| Hook | Description |
|
|
66
|
+
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
67
|
+
| [useAgent(session)](./react/hook/useagent.md) | **_(BETA)_** useAgent encapculates all agent state, normalizing some quirks around how LiveKit Agents work. |
|
|
68
|
+
| [useAgentExpression(opts)](./react/hook/useagentexpression.md) | <p>**_(BETA)_** useAgentExpression returns the agent's current emotional delivery, as published by Expressive Mode.</p><p>Reads the transcript stream the session already subscribes to, so it adds no second text stream handler. The mood decays back to null after <code>ttlTurns</code> agent turns without a new expression, so a feeling doesn't outlive the moment that produced it.</p> |
|
|
69
|
+
| [useAudioPlayback(room)](./react/hook/useaudioplayback.md) | In many browsers to start audio playback, the user must perform a user-initiated event such as clicking a button. The <code>useAudioPlayback</code> hook returns an object with a boolean <code>canPlayAudio</code> flag that indicates whether audio playback is allowed in the current context, as well as a <code>startAudio</code> function that can be called in a button <code>onClick</code> callback to start audio playback in the current context. |
|
|
70
|
+
| [useAudioWaveform(trackOrTrackReference, options)](./react/hook/useaudiowaveform.md) | |
|
|
71
|
+
| [useChat(options)](./react/hook/usechat.md) | The <code>useChat</code> hook provides chat functionality for a LiveKit room. |
|
|
72
|
+
| [useChatToggle({ props }, input)](./react/hook/usechattoggle.md) | The <code>useChatToggle</code> hook provides state and functions for toggling the chat window. |
|
|
73
|
+
| [useClearPinButton(props)](./react/hook/useclearpinbutton.md) | The <code>useClearPinButton</code> hook provides props for the [ClearPinButton()](./react/component/clearpinbutton.md) or your custom implementation of it component. It adds the <code>onClick</code> handler to signal the <code>LayoutContext</code> that the tile in focus should be cleared. |
|
|
74
|
+
| [useConnectionQualityIndicator(options)](./react/hook/useconnectionqualityindicator.md) | The <code>useConnectionQualityIndicator</code> hook provides props for the <code>ConnectionQualityIndicator</code> or your custom implementation of it component. |
|
|
75
|
+
| [useConnectionState(room)](./react/hook/useconnectionstate.md) | The <code>useConnectionState</code> hook allows you to simply implement your own <code>ConnectionState</code> component. |
|
|
76
|
+
| [useCreateLayoutContext()](./react/hook/usecreatelayoutcontext.md) | |
|
|
77
|
+
| [useDataChannel(topic, onMessage)](./react/hook/usedatachannel.md) | The <code>useDataChannel</code> hook returns the ability to send and receive messages. Pass an optional <code>topic</code> to narrow down which messages are returned in the messages array. |
|
|
78
|
+
| [useDataChannel(onMessage)](./react/hook/usedatachannel_1.md) | Overload for <code>useDataChannel</code> without a topic. See [useDataChannel()](./react/hook/usedatachannel.md) for information and usage examples. |
|
|
79
|
+
| [useDisconnectButton(props)](./react/hook/usedisconnectbutton.md) | The <code>useDisconnectButton</code> hook is used to implement the <code>DisconnectButton</code> or your custom implementation of it. It adds onClick handler to the button to disconnect from the room. |
|
|
80
|
+
| [useEnsureCreateLayoutContext(layoutContext)](./react/hook/useensurecreatelayoutcontext.md) | |
|
|
81
|
+
| [useEnsureLayoutContext(layoutContext)](./react/hook/useensurelayoutcontext.md) | Ensures that a layout context is provided, either via context or explicitly as a parameter. If not inside a <code>LayoutContext</code> and no layout context is provided, an error is thrown. |
|
|
82
|
+
| [useEnsureParticipant(participant)](./react/hook/useensureparticipant.md) | Ensures that a participant is provided, either via context or explicitly as a parameter. If not inside a <code>ParticipantContext</code> and no participant is provided, an error is thrown. |
|
|
83
|
+
| [useEnsureRoom(room)](./react/hook/useensureroom.md) | Ensures that a room is provided, either via context or explicitly as a parameter. If no room is provided, an error is thrown. |
|
|
84
|
+
| [useEnsureSession(session)](./react/hook/useensuresession.md) | **_(BETA)_** Ensures that a session is provided, either via context or explicitly as a parameter. If no session is provided, an error is thrown. |
|
|
85
|
+
| [useEnsureTrackRef(trackRef)](./react/hook/useensuretrackref.md) | Ensures that a track reference is provided, either via context or explicitly as a parameter. If not inside a <code>TrackRefContext</code> and no track reference is provided, an error is thrown. |
|
|
86
|
+
| [useEvents(instance, event, handlerFn, dependencies)](./react/hook/useevents.md) | |
|
|
87
|
+
| [useFacingMode(trackReference)](./react/hook/usefacingmode.md) | Try to determine the <code>facingMode</code> of a local participant video track. |
|
|
88
|
+
| [useFocusToggle({ trackRef, props }, input)](./react/hook/usefocustoggle.md) | The <code>useFocusToggle</code> hook is used to implement the <code>FocusToggle</code> or your custom implementation of it. The <code>TrackReferenceOrPlaceholder</code> is used to register a onClick handler and to identify the track to focus on. |
|
|
89
|
+
| [useGridLayout(gridElement, trackCount, options)](./react/hook/usegridlayout.md) | The <code>useGridLayout</code> hook tries to select the best layout to fit all tiles. If the available screen space is not enough, it will reduce the number of maximum visible tiles and select a layout that still works visually within the given limitations. As the order of tiles changes over time, the hook tries to keep visual updates to a minimum while trying to display important tiles such as speaking participants or screen shares. |
|
|
90
|
+
| [useIsEncrypted(participant, options)](./react/hook/useisencrypted.md) | |
|
|
91
|
+
| [useIsMuted(trackRef)](./react/hook/useismuted.md) | The <code>useIsMuted</code> hook is used to implement the <code>TrackMutedIndicator</code> or your custom implementation of it. It returns a <code>boolean</code> that indicates if the track is muted or not. |
|
|
92
|
+
| [useIsRecording(room)](./react/hook/useisrecording.md) | The <code>useIsRecording</code> hook returns a <code>boolean</code> that indicates if the room is currently being recorded. |
|
|
93
|
+
| [useIsSpeaking(participant)](./react/hook/useisspeaking.md) | The <code>useIsSpeaking</code> hook returns a <code>boolean</code> that indicates if the participant is speaking or not. |
|
|
94
|
+
| [useKrispNoiseFilter(options)](./react/hook/usekrispnoisefilter.md) | <p>**_(BETA)_** Enable the Krisp enhanced noise cancellation feature for local audio tracks.</p><p>Defaults to the localParticipant's microphone track publication, but you can override this behavior by passing in a different track reference.</p> |
|
|
95
|
+
| [useLayoutContext()](./react/hook/uselayoutcontext.md) | Ensures that a layout context is provided via context. If no layout context is provided, an error is thrown. |
|
|
96
|
+
| [useLiveKitRoom(props)](./react/hook/uselivekitroom.md) | The <code>useLiveKitRoom</code> hook is used to implement the <code>LiveKitRoom</code> or your custom implementation of it. It returns a <code>Room</code> instance and HTML props that should be applied to the root element of the component. |
|
|
97
|
+
| [useLocalParticipant(options)](./react/hook/uselocalparticipant.md) | The <code>useLocalParticipant</code> hook returns the local participant and the associated state around the participant. |
|
|
98
|
+
| [useLocalParticipantPermissions()](./react/hook/uselocalparticipantpermissions.md) | The <code>useLocalParticipantPermissions</code> hook returns the local participant's permissions. |
|
|
99
|
+
| [useMaybeLayoutContext()](./react/hook/usemaybelayoutcontext.md) | Returns a layout context from the <code>LayoutContext</code> if it exists, otherwise <code>undefined</code>. |
|
|
100
|
+
| [useMaybeParticipantContext()](./react/hook/usemaybeparticipantcontext.md) | Returns a participant from the <code>ParticipantContext</code> if it exists, otherwise <code>undefined</code>. |
|
|
101
|
+
| [useMaybeRoomContext()](./react/hook/usemayberoomcontext.md) | Returns the room context if it exists, otherwise undefined. |
|
|
102
|
+
| [useMaybeSessionContext()](./react/hook/usemaybesessioncontext.md) | **_(BETA)_** Returns the session context if it exists, otherwise undefined. |
|
|
103
|
+
| [useMaybeTrackRefContext()](./react/hook/usemaybetrackrefcontext.md) | Returns a track reference from the <code>TrackRefContext</code> if it exists, otherwise <code>undefined</code>. |
|
|
104
|
+
| [useMediaDevices({ kind, onError, }, input)](./react/hook/usemediadevices.md) | The <code>useMediaDevices</code> hook returns the list of media devices of a given kind. |
|
|
105
|
+
| [useMediaDeviceSelect({ kind, room, track, requestPermissions, onError, }, input)](./react/hook/usemediadeviceselect.md) | The <code>useMediaDeviceSelect</code> hook is used to implement the <code>MediaDeviceSelect</code> component and returns o.a. the list of devices of a given kind (audioinput or videoinput), the currently active device and a function to set the the active device. |
|
|
106
|
+
| [useMultibandTrackVolume(trackOrTrackReference, options)](./react/hook/usemultibandtrackvolume.md) | Hook for tracking the volume of an audio track across multiple frequency bands using the Web Audio API. |
|
|
107
|
+
| [usePagination(itemPerPage, trackReferences)](./react/hook/usepagination.md) | The <code>usePagination</code> hook implements simple pagination logic for use with arrays. |
|
|
108
|
+
| [useParticipantAttribute(attributeKey, options)](./react/hook/useparticipantattribute.md) | The <code>useParticipantAttribute</code> hook returns the latest value of a given attribute key of a participant. It requires a <code>Participant</code> object passed as property in the <code>UseParticipantAttributesOptions</code> or via the <code>ParticipantContext</code>. |
|
|
109
|
+
| [useParticipantAttributes(props)](./react/hook/useparticipantattributes.md) | |
|
|
110
|
+
| [useParticipantContext()](./react/hook/useparticipantcontext.md) | Ensures that a participant is provided via context. If not inside a <code>ParticipantContext</code>, an error is thrown. |
|
|
111
|
+
| [useParticipantInfo(props)](./react/hook/useparticipantinfo.md) | |
|
|
112
|
+
| [useParticipantPermissions(options)](./react/hook/useparticipantpermissions.md) | |
|
|
113
|
+
| [useParticipants(options)](./react/hook/useparticipants.md) | The <code>useParticipants</code> hook returns all participants (local and remote) of the current room. |
|
|
114
|
+
| [useParticipantTile({ trackRef, onParticipantClick, disableSpeakingIndicator, htmlProps, }, input)](./react/hook/useparticipanttile.md) | The <code>useParticipantTile</code> hook is used to implement the <code>ParticipantTile</code> and returns the props needed to render the tile. |
|
|
115
|
+
| [useParticipantTracks(sources, optionsOrParticipantIdentity)](./react/hook/useparticipanttracks.md) | <code>useParticipantTracks</code> is a custom React that allows you to get tracks of a specific participant only, by specifiying the participant's identity. If the participant identity is not passed the hook will try to get the participant from a participant context. |
|
|
116
|
+
| [usePersistentUserChoices(options)](./react/hook/usepersistentuserchoices.md) | A hook that provides access to user choices stored in local storage, such as selected media devices and their current state (on or off), as well as the user name. |
|
|
117
|
+
| [usePinnedTracks(layoutContext)](./react/hook/usepinnedtracks.md) | The <code>usePinnedTracks</code> hook returns a array of the pinned tracks of the current room. |
|
|
118
|
+
| [usePreviewDevice(enabled, deviceId, kind)](./react/hook/usepreviewdevice.md) | |
|
|
119
|
+
| [usePreviewTracks(options, onError)](./react/hook/usepreviewtracks.md) | |
|
|
120
|
+
| [useRemoteParticipant(identifier, options)](./react/hook/useremoteparticipant.md) | The <code>useRemoteParticipant</code> hook returns the first RemoteParticipant by either identity and/or based on the participant kind. |
|
|
121
|
+
| [useRemoteParticipant(identity, options)](./react/hook/useremoteparticipant_1.md) | The <code>useRemoteParticipant</code> hook returns the first RemoteParticipant by either identity or based on the participant kind. |
|
|
122
|
+
| [useRemoteParticipants(options)](./react/hook/useremoteparticipants.md) | The <code>useRemoteParticipants</code> hook returns all remote participants (without the local) of the current room. |
|
|
123
|
+
| [useRoomContext()](./react/hook/useroomcontext.md) | Ensures that a room is provided via context. If no room is provided, an error is thrown. |
|
|
124
|
+
| [useRoomInfo(options)](./react/hook/useroominfo.md) | |
|
|
125
|
+
| [useRpc(session, methodName, handler, options)](./react/hook/userpc.md) | <p>**_(BETA)_** Hook for declarative RPC method registration and outbound RPC calls.</p><p>Registers a handler for an incoming RPC method and returns a <code>performRpc</code> function for outbound calls. The handler is registered on mount and unregistered on unmount. Handler identity does not matter (captured by ref), so inline functions work without <code>useCallback</code>.</p> |
|
|
126
|
+
| [useRpc(methodName, handler, options)](./react/hook/userpc_1.md) | **_(BETA)_** |
|
|
127
|
+
| [useRpc(session)](./react/hook/userpc_2.md) | **_(BETA)_** |
|
|
128
|
+
| [useRpc()](./react/hook/userpc_3.md) | **_(BETA)_** |
|
|
129
|
+
| [useSequentialRoomConnectDisconnect(room)](./react/hook/usesequentialroomconnectdisconnect.md) | When calling room.disconnect() as part of a React useEffect cleanup function, it is possible for a room.connect(...) in the effect body to start running while the room.disconnect() is still running. This hook sequentializes these two operations, so they always happen in order and never overlap. |
|
|
130
|
+
| [useSession(tokenSource, options)](./react/hook/usesession.md) | **_(BETA)_** A Session represents a managed connection to a Room which can contain Agents. |
|
|
131
|
+
| [useSession(tokenSource, options)](./react/hook/usesession_1.md) | **_(BETA)_** A Session represents a managed connection to a Room which can contain Agents. |
|
|
132
|
+
| [useSessionContext()](./react/hook/usesessioncontext.md) | **_(BETA)_** Ensures that a session is provided via context. If no session is provided, an error is thrown. |
|
|
133
|
+
| [useSessionMessages(session)](./react/hook/usesessionmessages.md) | **_(BETA)_** |
|
|
134
|
+
| [useSortedParticipants(participants)](./react/hook/usesortedparticipants.md) | The <code>useSortedParticipants</code> hook returns the participants sorted by importance. |
|
|
135
|
+
| [useSpeakingParticipants(options)](./react/hook/usespeakingparticipants.md) | The <code>useSpeakingParticipants</code> hook returns only the active speakers of all participants. |
|
|
136
|
+
| [useStartAudio({ room, props }, input)](./react/hook/usestartaudio.md) | In many browsers to start audio playback, the user must perform a user-initiated event such as clicking a button. The <code>useStatAudio</code> hook returns an object with a boolean <code>canPlayAudio</code> flag that indicates whether audio playback is allowed in the current context, as well as a <code>startAudio</code> function that can be called in a button <code>onClick</code> callback to start audio playback in the current context. |
|
|
137
|
+
| [useStartVideo({ room, props }, input)](./react/hook/usestartvideo.md) | In some browsers to start video playback in low power mode, the user must perform a user-initiated event such as clicking a button. The <code>useStartVideo</code> hook returns an object with a boolean <code>canPlayVideo</code> flag that indicates whether video playback is allowed in the current context, as well as a <code>startVideo</code> function that can be called in a button <code>onClick</code> callback to start video playback in the current context. |
|
|
138
|
+
| [useSwipe(element, options)](./react/hook/useswipe.md) | Simple implementation to detect horizontal swipe actions. Accepts callbacks for on right and left swipes. |
|
|
139
|
+
| [useTextStream(topic, options)](./react/hook/usetextstream.md) | **_(BETA)_** |
|
|
140
|
+
| [useToken(tokenEndpoint, roomName, options)](./react/hook/usetoken.md) | The <code>useToken</code> hook fetches a token from the given token endpoint with the given user info. |
|
|
141
|
+
| [useTrackByName(name, participant)](./react/hook/usetrackbyname.md) | This function <code>useTrackByName</code> allows you to access a track by referencing its track name. Inside the function, it ensures that the a valid <code>participant</code> reference is available by checking for both a passed participant argument and, if not available, a valid participant context. |
|
|
142
|
+
| [useTrackMutedIndicator(trackRef)](./react/hook/usetrackmutedindicator.md) | The <code>useTrackMutedIndicator</code> hook is used to implement the <code>TrackMutedIndicator</code> component and returns the muted state of the given track. |
|
|
143
|
+
| [useTrackRefContext()](./react/hook/usetrackrefcontext.md) | Ensures that a track reference is provided via context. If not inside a <code>TrackRefContext</code>, an error is thrown. |
|
|
144
|
+
| [useTracks(sources, options)](./react/hook/usetracks.md) | The <code>useTracks</code> hook returns an array of <code>TrackReference</code> or <code>TrackReferenceOrPlaceholder</code> depending on the provided <code>sources</code> property. If only subscribed tracks are desired, set the <code>onlySubscribed</code> property to <code>true</code>. |
|
|
145
|
+
| [useTrackToggle({ source, onChange, initialState, captureOptions, publishOptions, onDeviceError, room, ...rest }, input)](./react/hook/usetracktoggle.md) | The <code>useTrackToggle</code> hook is used to implement the <code>TrackToggle</code> component and returns state and functionality of the given track. |
|
|
146
|
+
| [useTrackTranscription(trackRef, options)](./react/hook/usetracktranscription.md) | |
|
|
147
|
+
| [useTrackVolume(trackOrTrackReference, options)](./react/hook/usetrackvolume.md) | Hook for tracking the volume of an audio track using the Web Audio API. |
|
|
148
|
+
| [useTranscriptions(opts)](./react/hook/usetranscriptions.md) | **_(BETA)_** useTranscriptions is a hook that returns the transcriptions for the given participant identities and track sids, if no options are provided, it will return all transcriptions |
|
|
149
|
+
| [useVisualStableUpdate(trackReferences, maxItemsOnPage, options)](./react/hook/usevisualstableupdate.md) | The <code>useVisualStableUpdate</code> hook is used to prevent visually jarring jumps and shifts of elements in an array. The algorithm only starts to update when there are more items than visually fit on a page. If this is the case, it will make sure that speaking participants move to the first page and are always visible. |
|
|
150
|
+
| [useVoiceAssistant()](./react/hook/usevoiceassistant.md) | **_(BETA)_** This hook looks for the first agent-participant in the room. |
|
|
150
151
|
|
|
151
152
|
## Others
|
|
152
153
|
|
|
@@ -154,6 +155,7 @@
|
|
|
154
155
|
| ------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
155
156
|
| [AgentCallbacks](./react/agentcallbacks.md) | **_(BETA)_** |
|
|
156
157
|
| [AgentEvent](./react/agentevent.md) | **_(BETA)_** |
|
|
158
|
+
| [AgentMood](./react/agentmood.md) | <p>**_(BETA)_** The agent's normalized emotional delivery.</p><p>The wording the TTS provider emits is not a fixed vocabulary: Fish Audio emits single words from a closed set, Inworld emits free-form English ("soft, with genuine care"), and models routinely drift outside whichever set they were given. The agent normalizes that wording to this enum before publishing it, so every client SDK reads the same values.</p> |
|
|
157
159
|
| [AgentState](./react/agentstate.md) | <p>**_(BETA)_** State representing the current status of the agent, whether it is ready for speach, etc</p><p>For most agents (which have the preconnect audio buffer feature enabled), this is the lifecycle: connecting ➡️ pre-connect-buffering ➡️ initializing/listening/thinking/speaking</p><p>For agents without the preconnect audio feature enabled: connecting ➡️ initializing ➡️ idle/listening/thinking/speaking</p><p>If an agent fails to connect: connecting ➡️ pre-connect-buffering/initializing ➡️ failed</p><p>Legacy useVoiceAssistant hook: disconnected ➡️ connecting ➡️ initializing ➡️ listening/thinking/speaking</p> |
|
|
158
160
|
| [AllowAudioPlaybackProps](./react/allowaudioplaybackprops.md) | |
|
|
159
161
|
| [AllowMediaPlaybackProps](./react/allowmediaplaybackprops.md) | |
|
|
@@ -174,7 +176,9 @@
|
|
|
174
176
|
| [ConnectionStatusProps](./react/connectionstatusprops.md) | |
|
|
175
177
|
| [ControlBarControls](./react/controlbarcontrols.md) | |
|
|
176
178
|
| [ControlBarProps](./react/controlbarprops.md) | |
|
|
179
|
+
| [DEFAULT\_MOOD\_TTL\_TURNS](./react/default_mood_ttl_turns.md) | **_(BETA)_** How many agent turns an expression survives before the mood decays back to null. Without decay, one excited sentence would leave the UI excited for the rest of the session. |
|
|
177
180
|
| [DisconnectButtonProps](./react/disconnectbuttonprops.md) | |
|
|
181
|
+
| [EXPRESSION\_ATTRIBUTE](./react/expression_attribute.md) | **_(BETA)_** Published per transcript segment by Expressive Mode: the segment's leading delivery tag. |
|
|
178
182
|
| [FocusLayoutContainerProps](./react/focuslayoutcontainerprops.md) | |
|
|
179
183
|
| [FocusLayoutProps](./react/focuslayoutprops.md) | |
|
|
180
184
|
| [FocusToggleProps](./react/focustoggleprops.md) | |
|
|
@@ -189,6 +193,7 @@
|
|
|
189
193
|
| [MessagesCallbacks](./react/messagescallbacks.md) | **_(BETA)_** |
|
|
190
194
|
| [MessagesEvent](./react/messagesevent.md) | **_(BETA)_** |
|
|
191
195
|
| [MultiBandTrackVolumeOptions](./react/multibandtrackvolumeoptions.md) | Interface for configuring options for the useMultibandTrackVolume hook. |
|
|
196
|
+
| [parseExpression(segment)](./react/parseexpression.md) | **_(BETA)_** The expression published on a transcript segment, or null when it carries none. |
|
|
192
197
|
| [ParticipantLoopProps](./react/participantloopprops.md) | |
|
|
193
198
|
| [ParticipantNameProps](./react/participantnameprops.md) | |
|
|
194
199
|
| [ParticipantTileProps](./react/participanttileprops.md) | |
|
|
@@ -207,6 +212,8 @@
|
|
|
207
212
|
| [TrackMutedIndicatorProps](./react/trackmutedindicatorprops.md) | |
|
|
208
213
|
| [TrackToggleProps](./react/tracktoggleprops.md) | |
|
|
209
214
|
| [TrackTranscriptionOptions](./react/tracktranscriptionoptions.md) | |
|
|
215
|
+
| [UseAgentExpressionOptions](./react/useagentexpressionoptions.md) | **_(BETA)_** |
|
|
216
|
+
| [UseAgentExpressionReturn](./react/useagentexpressionreturn.md) | **_(BETA)_** |
|
|
210
217
|
| [UseAgentReturn](./react/useagentreturn.md) | **_(BETA)_** |
|
|
211
218
|
| [UseChatToggleProps](./react/usechattoggleprops.md) | |
|
|
212
219
|
| [UseFocusToggleProps](./react/usefocustoggleprops.md) | |
|