@livekit/components-js-docs 0.0.4 → 0.1.0

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 (166) hide show
  1. package/generated-docs/core/encryptionstatusobservable.md +12 -0
  2. package/generated-docs/core/gettrackreferenceid.md +5 -1
  3. package/generated-docs/core/index.md +114 -109
  4. package/generated-docs/core/isparticipantsourcepinned.md +4 -0
  5. package/generated-docs/core/isparticipanttrackreferencepinned.md +16 -0
  6. package/generated-docs/core/mutedobserver.md +1 -4
  7. package/generated-docs/core/setupconnectionqualityindicator.md +1 -59
  8. package/generated-docs/core/setuptrackmutedindicator.md +1 -4
  9. package/generated-docs/core/trackreferenceid.md +9 -0
  10. package/generated-docs/react/audiotrackprops.md +9 -8
  11. package/generated-docs/react/audiotrackprops.name.md +6 -0
  12. package/generated-docs/react/audiotrackprops.participant.md +6 -0
  13. package/generated-docs/react/audiotrackprops.publication.md +6 -0
  14. package/generated-docs/react/audiotrackprops.source.md +7 -1
  15. package/generated-docs/react/audiotrackprops.trackref.md +13 -0
  16. package/generated-docs/react/audiovisualizerprops.md +4 -3
  17. package/generated-docs/react/audiovisualizerprops.participant.md +6 -0
  18. package/generated-docs/react/audiovisualizerprops.trackref.md +9 -0
  19. package/generated-docs/react/{carouselviewprops.children.md → carousellayoutprops.children.md} +1 -1
  20. package/generated-docs/react/carousellayoutprops.md +21 -0
  21. package/generated-docs/react/{carouselviewprops.orientation.md → carousellayoutprops.orientation.md} +1 -1
  22. package/generated-docs/react/{carouselviewprops.tracks.md → carousellayoutprops.tracks.md} +1 -1
  23. package/generated-docs/react/carouselview.md +15 -0
  24. package/generated-docs/react/chatprops.md +2 -2
  25. package/generated-docs/react/component/audiotrack.md +11 -4
  26. package/generated-docs/react/component/audiovisualizer.md +18 -1
  27. package/generated-docs/react/component/{carouselview.md → carousellayout.md} +8 -4
  28. package/generated-docs/react/component/chattoggle.md +5 -1
  29. package/generated-docs/react/component/clearpinbutton.md +3 -3
  30. package/generated-docs/react/component/connectionqualityindicator.md +1 -1
  31. package/generated-docs/react/component/connectionstate.md +1 -1
  32. package/generated-docs/react/component/connectionstatetoast.md +2 -0
  33. package/generated-docs/react/component/controlbar.md +1 -1
  34. package/generated-docs/react/component/disconnectbutton.md +1 -1
  35. package/generated-docs/react/component/focuslayout.md +7 -0
  36. package/generated-docs/react/component/focuslayoutcontainer.md +2 -0
  37. package/generated-docs/react/component/focustoggle.md +14 -3
  38. package/generated-docs/react/component/gridlayout.md +5 -1
  39. package/generated-docs/react/component/livekitroom.md +1 -1
  40. package/generated-docs/react/component/mediadevicemenu.md +1 -1
  41. package/generated-docs/react/component/mediadeviceselect.md +1 -1
  42. package/generated-docs/react/component/participantaudiotile.md +6 -1
  43. package/generated-docs/react/component/participantcontextifneeded.md +11 -1
  44. package/generated-docs/react/component/participantloop.md +1 -1
  45. package/generated-docs/react/component/participantname.md +1 -1
  46. package/generated-docs/react/component/participanttile.md +20 -5
  47. package/generated-docs/react/component/prejoin.md +7 -2
  48. package/generated-docs/react/component/roomaudiorenderer.md +1 -1
  49. package/generated-docs/react/component/roomname.md +1 -1
  50. package/generated-docs/react/component/startaudio.md +1 -1
  51. package/generated-docs/react/component/toast.md +9 -1
  52. package/generated-docs/react/component/trackloop.md +6 -6
  53. package/generated-docs/react/component/trackmutedindicator.md +11 -4
  54. package/generated-docs/react/component/tracktoggle.md +1 -1
  55. package/generated-docs/react/component/videoconference.md +2 -2
  56. package/generated-docs/react/component/videotrack.md +12 -5
  57. package/generated-docs/react/focuslayoutcontainerprops.focustrack.md +6 -0
  58. package/generated-docs/react/focuslayoutcontainerprops.participants.md +6 -0
  59. package/generated-docs/react/focuslayoutprops.md +5 -4
  60. package/generated-docs/react/focuslayoutprops.track.md +6 -0
  61. package/generated-docs/react/focuslayoutprops.trackref.md +13 -0
  62. package/generated-docs/react/focustoggleprops.md +5 -4
  63. package/generated-docs/react/focustoggleprops.participant.md +6 -0
  64. package/generated-docs/react/focustoggleprops.trackref.md +9 -0
  65. package/generated-docs/react/focustoggleprops.tracksource.md +7 -1
  66. package/generated-docs/react/hook/usechat.md +13 -1
  67. package/generated-docs/react/hook/usechattoggle.md +16 -1
  68. package/generated-docs/react/hook/useclearpinbutton.md +11 -1
  69. package/generated-docs/react/hook/useconnectionqualityindicator.md +17 -2
  70. package/generated-docs/react/hook/useconnectionstate.md +3 -1
  71. package/generated-docs/react/hook/usecreatelayoutcontext.md +3 -1
  72. package/generated-docs/react/hook/usedatachannel.md +17 -2
  73. package/generated-docs/react/hook/usedatachannel_1.md +17 -2
  74. package/generated-docs/react/hook/usedisconnectbutton.md +19 -2
  75. package/generated-docs/react/hook/useensurecreatelayoutcontext.md +3 -1
  76. package/generated-docs/react/hook/useensurelayoutcontext.md +3 -1
  77. package/generated-docs/react/hook/useensureparticipant.md +3 -1
  78. package/generated-docs/react/hook/useensureroom.md +3 -1
  79. package/generated-docs/react/hook/useensuretrackref.md +24 -0
  80. package/generated-docs/react/hook/useensuretrackreference.md +7 -1
  81. package/generated-docs/react/hook/usefocustoggle.md +20 -3
  82. package/generated-docs/react/hook/usegridlayout.md +13 -3
  83. package/generated-docs/react/hook/useismuted.md +13 -6
  84. package/generated-docs/react/hook/useismuted_1.md +29 -0
  85. package/generated-docs/react/hook/useisspeaking.md +12 -2
  86. package/generated-docs/react/hook/uselayoutcontext.md +3 -1
  87. package/generated-docs/react/hook/uselivekitroom.md +16 -2
  88. package/generated-docs/react/hook/uselocalparticipant.md +20 -3
  89. package/generated-docs/react/hook/uselocalparticipantpermissions.md +12 -2
  90. package/generated-docs/react/hook/usemaybelayoutcontext.md +3 -1
  91. package/generated-docs/react/hook/usemaybeparticipantcontext.md +3 -1
  92. package/generated-docs/react/hook/usemayberoomcontext.md +3 -1
  93. package/generated-docs/react/hook/usemaybetrackcontext.md +7 -1
  94. package/generated-docs/react/hook/usemaybetrackrefcontext.md +19 -0
  95. package/generated-docs/react/hook/usemediadevices.md +13 -2
  96. package/generated-docs/react/hook/usemediadeviceselect.md +19 -2
  97. package/generated-docs/react/hook/usemediatrack.md +13 -1
  98. package/generated-docs/react/hook/usemediatrackbyname.md +13 -1
  99. package/generated-docs/react/hook/useparticipantcontext.md +3 -1
  100. package/generated-docs/react/hook/useparticipantinfo.md +7 -1
  101. package/generated-docs/react/hook/useparticipantpermissions.md +3 -1
  102. package/generated-docs/react/hook/useparticipants.md +18 -3
  103. package/generated-docs/react/hook/useparticipanttile.md +12 -2
  104. package/generated-docs/react/hook/usepinnedtracks.md +16 -2
  105. package/generated-docs/react/hook/usepreviewdevice.md +7 -1
  106. package/generated-docs/react/hook/useremoteparticipant.md +16 -2
  107. package/generated-docs/react/hook/useremoteparticipants.md +18 -3
  108. package/generated-docs/react/hook/useroomcontext.md +3 -1
  109. package/generated-docs/react/hook/useroominfo.md +6 -1
  110. package/generated-docs/react/hook/usesortedparticipants.md +4 -2
  111. package/generated-docs/react/hook/usespeakingparticipants.md +11 -3
  112. package/generated-docs/react/hook/usetoken.md +12 -2
  113. package/generated-docs/react/hook/usetrack.md +31 -0
  114. package/generated-docs/react/hook/usetrackbyname.md +31 -0
  115. package/generated-docs/react/hook/usetrackcontext.md +8 -2
  116. package/generated-docs/react/hook/usetrackmutedindicator.md +13 -6
  117. package/generated-docs/react/hook/usetrackmutedindicator_1.md +29 -0
  118. package/generated-docs/react/hook/usetrackrefcontext.md +19 -0
  119. package/generated-docs/react/hook/usetracks.md +3 -1
  120. package/generated-docs/react/hook/usetracktoggle.md +19 -2
  121. package/generated-docs/react/hook/usevisualstableupdate.md +16 -7
  122. package/generated-docs/react/index.md +163 -155
  123. package/generated-docs/react/localuserchoices.md +2 -0
  124. package/generated-docs/react/meta-data.json +1 -1
  125. package/generated-docs/react/participanttileprops.md +8 -7
  126. package/generated-docs/react/participanttileprops.participant.md +6 -0
  127. package/generated-docs/react/participanttileprops.publication.md +6 -0
  128. package/generated-docs/react/participanttileprops.source.md +6 -0
  129. package/generated-docs/react/participanttileprops.trackref.md +13 -0
  130. package/generated-docs/react/prejoinprops.md +12 -11
  131. package/generated-docs/react/prejoinprops.showe2eeoptions.md +9 -0
  132. package/generated-docs/react/trackcontext.md +4 -0
  133. package/generated-docs/react/trackmutedindicatorprops.md +6 -5
  134. package/generated-docs/react/trackmutedindicatorprops.participant.md +6 -0
  135. package/generated-docs/react/trackmutedindicatorprops.source.md +7 -1
  136. package/generated-docs/react/trackmutedindicatorprops.trackref.md +9 -0
  137. package/generated-docs/react/trackrefcontext.md +13 -0
  138. package/generated-docs/react/usefocustoggleprops.md +6 -5
  139. package/generated-docs/react/usefocustoggleprops.participant.md +6 -0
  140. package/generated-docs/react/usefocustoggleprops.trackref.md +9 -0
  141. package/generated-docs/react/usefocustoggleprops.tracksource.md +7 -1
  142. package/generated-docs/react/useparticipantinfooptions.md +9 -1
  143. package/generated-docs/react/useparticipantpermissionsoptions.md +9 -1
  144. package/generated-docs/react/useparticipanttileprops.md +9 -8
  145. package/generated-docs/react/useparticipanttileprops.participant.md +7 -1
  146. package/generated-docs/react/useparticipanttileprops.publication.md +6 -0
  147. package/generated-docs/react/useparticipanttileprops.source.md +7 -1
  148. package/generated-docs/react/useparticipanttileprops.trackref.md +13 -0
  149. package/generated-docs/react/useremoteparticipantoptions.md +3 -3
  150. package/generated-docs/react/useremoteparticipantoptions.updateonlyon.md +4 -0
  151. package/generated-docs/react/useroominfooptions.md +13 -1
  152. package/generated-docs/react/usetrackmutedindicatoroptions.participant.md +6 -0
  153. package/generated-docs/react/usetrackoptions.element.md +9 -0
  154. package/generated-docs/react/usetrackoptions.md +18 -0
  155. package/generated-docs/react/usetrackoptions.props.md +9 -0
  156. package/generated-docs/react/videoconferenceprops.md +2 -2
  157. package/generated-docs/react/videotrackprops.md +10 -9
  158. package/generated-docs/react/videotrackprops.name.md +6 -0
  159. package/generated-docs/react/videotrackprops.participant.md +6 -0
  160. package/generated-docs/react/videotrackprops.publication.md +6 -0
  161. package/generated-docs/react/videotrackprops.source.md +7 -1
  162. package/generated-docs/react/videotrackprops.trackref.md +13 -0
  163. package/package.json +1 -1
  164. package/generated-docs/react/carouselviewprops.md +0 -21
  165. /package/generated-docs/{react → core}/messagedecoder.md +0 -0
  166. /package/generated-docs/{react → core}/messageencoder.md +0 -0
@@ -0,0 +1,9 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ ## TrackReferenceId type
4
+
5
+ **Signature:**
6
+
7
+ ```typescript
8
+ export type TrackReferenceId = ReturnType<typeof getTrackReferenceId>;
9
+ ```
@@ -14,11 +14,12 @@ export interface AudioTrackProps<T extends HTMLMediaElement = HTMLMediaElement>
14
14
 
15
15
  ## Properties
16
16
 
17
- | Property | Type | Description |
18
- | -------------------------------------------------------------------------------------- | -------------------------------- | -------------------------------------------------------- |
19
- | [name?](./react/audiotrackprops.name.md) | string | _(Optional)_ |
20
- | [onSubscriptionStatusChanged?](./react/audiotrackprops.onsubscriptionstatuschanged.md) | (subscribed: boolean) =&gt; void | _(Optional)_ |
21
- | [participant?](./react/audiotrackprops.participant.md) | Participant | _(Optional)_ |
22
- | [publication?](./react/audiotrackprops.publication.md) | TrackPublication | _(Optional)_ |
23
- | [source](./react/audiotrackprops.source.md) | Track.Source | |
24
- | [volume?](./react/audiotrackprops.volume.md) | number | _(Optional)_ by the default the range is between 0 and 1 |
17
+ | Property | Type | Description |
18
+ | -------------------------------------------------------------------------------------- | ------------------------------------------ | ------------------------------------------------------------------------------------- |
19
+ | [name?](./react/audiotrackprops.name.md) | string | _(Optional)_ |
20
+ | [onSubscriptionStatusChanged?](./react/audiotrackprops.onsubscriptionstatuschanged.md) | (subscribed: boolean) =&gt; void | _(Optional)_ |
21
+ | [participant?](./react/audiotrackprops.participant.md) | Participant | _(Optional)_ |
22
+ | [publication?](./react/audiotrackprops.publication.md) | TrackPublication | _(Optional)_ |
23
+ | [source?](./react/audiotrackprops.source.md) | Track.Source | _(Optional)_ |
24
+ | [trackRef?](./react/audiotrackprops.trackref.md) | [TrackReference](./core/trackreference.md) | _(Optional)_ The track reference of the track from which the audio is to be rendered. |
25
+ | [volume?](./react/audiotrackprops.volume.md) | number | _(Optional)_ by the default the range is between 0 and 1 |
@@ -2,8 +2,14 @@
2
2
 
3
3
  ## AudioTrackProps.name property
4
4
 
5
+ > Warning: This API is now obsolete.
6
+ >
7
+ > This property will be removed in a future version use `trackRef` instead.
8
+
5
9
  **Signature:**
6
10
 
7
11
  ```typescript
8
12
  name?: string;
9
13
  ```
14
+
15
+ {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -2,8 +2,14 @@
2
2
 
3
3
  ## AudioTrackProps.participant property
4
4
 
5
+ > Warning: This API is now obsolete.
6
+ >
7
+ > This property will be removed in a future version use `trackRef` instead.
8
+
5
9
  **Signature:**
6
10
 
7
11
  ```typescript
8
12
  participant?: Participant;
9
13
  ```
14
+
15
+ {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -2,8 +2,14 @@
2
2
 
3
3
  ## AudioTrackProps.publication property
4
4
 
5
+ > Warning: This API is now obsolete.
6
+ >
7
+ > This property will be removed in a future version use `trackRef` instead.
8
+
5
9
  **Signature:**
6
10
 
7
11
  ```typescript
8
12
  publication?: TrackPublication;
9
13
  ```
14
+
15
+ {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -2,8 +2,14 @@
2
2
 
3
3
  ## AudioTrackProps.source property
4
4
 
5
+ > Warning: This API is now obsolete.
6
+ >
7
+ > This property will be removed in a future version use `trackRef` instead.
8
+
5
9
  **Signature:**
6
10
 
7
11
  ```typescript
8
- source: Track.Source;
12
+ source?: Track.Source;
9
13
  ```
14
+
15
+ {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -0,0 +1,13 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ ## AudioTrackProps.trackRef property
4
+
5
+ The track reference of the track from which the audio is to be rendered.
6
+
7
+ **Signature:**
8
+
9
+ ```typescript
10
+ trackRef?: TrackReference;
11
+ ```
12
+
13
+ {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -14,6 +14,7 @@ export interface AudioVisualizerProps extends React.HTMLAttributes<SVGElement>
14
14
 
15
15
  ## Properties
16
16
 
17
- | Property | Type | Description |
18
- | ----------------------------------------------------------- | ----------- | ------------ |
19
- | [participant?](./react/audiovisualizerprops.participant.md) | Participant | _(Optional)_ |
17
+ | Property | Type | Description |
18
+ | ----------------------------------------------------------- | -------------------------------------------------------------------- | ------------ |
19
+ | [participant?](./react/audiovisualizerprops.participant.md) | Participant | _(Optional)_ |
20
+ | [trackRef?](./react/audiovisualizerprops.trackref.md) | [TrackReferenceOrPlaceholder](./core/trackreferenceorplaceholder.md) | _(Optional)_ |
@@ -2,8 +2,14 @@
2
2
 
3
3
  ## AudioVisualizerProps.participant property
4
4
 
5
+ > Warning: This API is now obsolete.
6
+ >
7
+ > this property will be removed in a future version, use `trackRef` instead
8
+
5
9
  **Signature:**
6
10
 
7
11
  ```typescript
8
12
  participant?: Participant;
9
13
  ```
14
+
15
+ {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -0,0 +1,9 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ ## AudioVisualizerProps.trackRef property
4
+
5
+ **Signature:**
6
+
7
+ ```typescript
8
+ trackRef?: TrackReferenceOrPlaceholder;
9
+ ```
@@ -1,6 +1,6 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- ## CarouselViewProps.children property
3
+ ## CarouselLayoutProps.children property
4
4
 
5
5
  **Signature:**
6
6
 
@@ -0,0 +1,21 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ ## CarouselLayoutProps interface
4
+
5
+ **Signature:**
6
+
7
+ ```typescript
8
+ export interface CarouselLayoutProps extends React.HTMLAttributes<HTMLMediaElement>
9
+ ```
10
+
11
+ **Extends:** React.HTMLAttributes&lt;HTMLMediaElement&gt;
12
+
13
+ {% partial file="p_usage.md" variables={exampleCount: 0} /%}
14
+
15
+ ## Properties
16
+
17
+ | Property | Type | Description |
18
+ | ---------------------------------------------------------- | -------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
19
+ | [children](./react/carousellayoutprops.children.md) | React.ReactNode | |
20
+ | [orientation?](./react/carousellayoutprops.orientation.md) | 'vertical' \| 'horizontal' | _(Optional)_ Place the tiles vertically or horizontally next to each other. If undefined orientation is guessed by the dimensions of the container. |
21
+ | [tracks](./react/carousellayoutprops.tracks.md) | [TrackReferenceOrPlaceholder](./core/trackreferenceorplaceholder.md)<!-- -->\[\] | |
@@ -1,6 +1,6 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- ## CarouselViewProps.orientation property
3
+ ## CarouselLayoutProps.orientation property
4
4
 
5
5
  Place the tiles vertically or horizontally next to each other. If undefined orientation is guessed by the dimensions of the container.
6
6
 
@@ -1,6 +1,6 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- ## CarouselViewProps.tracks property
3
+ ## CarouselLayoutProps.tracks property
4
4
 
5
5
  **Signature:**
6
6
 
@@ -0,0 +1,15 @@
1
+ <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
+
3
+ ## CarouselView variable
4
+
5
+ > Warning: This API is now obsolete.
6
+ >
7
+ > Renamed to \[\[CarouselLayout\]\]
8
+
9
+ **Signature:**
10
+
11
+ ```typescript
12
+ CarouselView: typeof CarouselLayout;
13
+ ```
14
+
15
+ {% partial file="p_usage.md" variables={exampleCount: 0} /%}
@@ -16,6 +16,6 @@ export interface ChatProps extends React.HTMLAttributes<HTMLDivElement>
16
16
 
17
17
  | Property | Type | Description |
18
18
  | ---------------------------------------------------------- | ----------------------------------------------- | ------------ |
19
- | [messageDecoder?](./react/chatprops.messagedecoder.md) | [MessageDecoder](./react/messagedecoder.md) | _(Optional)_ |
20
- | [messageEncoder?](./react/chatprops.messageencoder.md) | [MessageEncoder](./react/messageencoder.md) | _(Optional)_ |
19
+ | [messageDecoder?](./react/chatprops.messagedecoder.md) | [MessageDecoder](./core/messagedecoder.md) | _(Optional)_ |
20
+ | [messageEncoder?](./react/chatprops.messageencoder.md) | [MessageEncoder](./core/messageencoder.md) | _(Optional)_ |
21
21
  | [messageFormatter?](./react/chatprops.messageformatter.md) | [MessageFormatter](./react/messageformatter.md) | _(Optional)_ |
@@ -14,7 +14,7 @@ import { AudioTrack } from '@livekit/components-react';
14
14
 
15
15
  ```tsx
16
16
  <ParticipantTile>
17
- <AudioTrack source={Track.Source.Microphone} />
17
+ <AudioTrack trackRef={trackRef} />
18
18
  </ParticipantTile>
19
19
  ```
20
20
 
@@ -22,9 +22,6 @@ import { AudioTrack } from '@livekit/components-react';
22
22
 
23
23
  ## Properties
24
24
 
25
- {% parameter name="source" type="Track.Source" optional=false %}
26
- {% /parameter %}
27
-
28
25
  {% parameter name="name" type="string" optional=true %}
29
26
  _(Optional)_
30
27
 
@@ -45,6 +42,16 @@ _(Optional)_
45
42
 
46
43
  {% /parameter %}
47
44
 
45
+ {% parameter name="source" type="Track.Source" optional=true %}
46
+ _(Optional)_
47
+
48
+ {% /parameter %}
49
+
50
+ {% parameter name="trackRef" type="TrackReference" optional=true %}
51
+ _(Optional)_ The track reference of the track from which the audio is to be rendered.
52
+
53
+ {% /parameter %}
54
+
48
55
  {% parameter name="volume" type="number" optional=true %}
49
56
  _(Optional)_ by the default the range is between 0 and 1
50
57
 
@@ -2,13 +2,25 @@
2
2
 
3
3
  # AudioVisualizer
4
4
 
5
+ The AudioVisualizer component is used to visualize the audio volume of a given audio track.
6
+
5
7
  ## Import
6
8
 
7
9
  ```typescript
8
10
  import { AudioVisualizer } from '@livekit/components-react';
9
11
  ```
10
12
 
11
- {% partial file="p_usage.md" variables={exampleCount: 0} /%}
13
+ ## Remarks
14
+
15
+ Requires a `TrackReferenceOrPlaceholder` to be provided either as a property or via the `TrackRefContext`<!-- -->.
16
+
17
+ ## Usage
18
+
19
+ ```tsx
20
+ <AudioVisualizer />
21
+ ```
22
+
23
+ {% partial file="p_usage.md" variables={exampleCount: 1} /%}
12
24
 
13
25
  ## Properties
14
26
 
@@ -16,3 +28,8 @@ import { AudioVisualizer } from '@livekit/components-react';
16
28
  _(Optional)_
17
29
 
18
30
  {% /parameter %}
31
+
32
+ {% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=true %}
33
+ _(Optional)_
34
+
35
+ {% /parameter %}
@@ -1,19 +1,23 @@
1
1
  <!-- Do not edit this file. It is automatically generated by API Documenter. -->
2
2
 
3
- # CarouselView
3
+ # CarouselLayout
4
4
 
5
- The `CarouselLayout` displays a list of tracks horizontally or vertically. Depending on the size of the container, the carousel will display as many tiles as possible and overflows the rest. The CarouselLayout uses the `useVisualStableUpdate` hook to ensure that tile reordering due to track updates is visually stable but still moves the important tiles (speaking participants) to the front.
5
+ The `CarouselLayout` component displays a list of tracks in a scroll container. It will display as many tiles as possible and overflow the rest.
6
6
 
7
7
  ## Import
8
8
 
9
9
  ```typescript
10
- import { CarouselView } from '@livekit/components-react';
10
+ import { CarouselLayout } from '@livekit/components-react';
11
11
  ```
12
12
 
13
+ ## Remarks
14
+
15
+ To ensure visual stability when tiles are reordered due to track updates, the component uses the `useVisualStableUpdate` hook.
16
+
13
17
  ## Usage
14
18
 
15
19
  ```tsx
16
- const tracks = useTracks();
20
+ const tracks = useTracks([Track.Source.Camera]);
17
21
  <CarouselLayout tracks={tracks}>
18
22
  <ParticipantTile />
19
23
  </CarouselLayout>;
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ChatToggle
4
4
 
5
- The ChatToggle component toggles the visibility of the chat component.
5
+ The `ChatToggle` component is a button that toggles the visibility of the `Chat` component.
6
6
 
7
7
  ## Import
8
8
 
@@ -10,6 +10,10 @@ The ChatToggle component toggles the visibility of the chat component.
10
10
  import { ChatToggle } from '@livekit/components-react';
11
11
  ```
12
12
 
13
+ ## Remarks
14
+
15
+ For the component to have any effect it has to live inside a `LayoutContext` context.
16
+
13
17
  ## Usage
14
18
 
15
19
  ```tsx
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ClearPinButton
4
4
 
5
- The ClearPinButton is a basic html button with the added ability to signal the LiveKitRoom that it should display the grid view again.
5
+ The `ClearPinButton` is a basic html button with the added ability to signal the `LayoutContext` that it should display the grid view again.
6
6
 
7
7
  ## Import
8
8
 
@@ -12,13 +12,13 @@ import { ClearPinButton } from '@livekit/components-react';
12
12
 
13
13
  ## Remarks
14
14
 
15
- This component works only inside a PinContext.
15
+ This component works only inside a `LayoutContext`<!-- -->.
16
16
 
17
17
  ## Usage
18
18
 
19
19
  ```tsx
20
20
  <LiveKitRoom>
21
- <ClearPinButton>Leave room</ClearPinButton>
21
+ <ClearPinButton>Back to grid view</ClearPinButton>
22
22
  </LiveKitRoom>
23
23
  ```
24
24
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ConnectionQualityIndicator
4
4
 
5
- The ConnectionQualityIndicator shows the individual connection quality of a participant.
5
+ The `ConnectionQualityIndicator` shows the individual connection quality of a participant.
6
6
 
7
7
  ## Import
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ConnectionState
4
4
 
5
- The ConnectionState component displays the connection status of the room in written form.
5
+ The `ConnectionState` component displays the connection status of the room as strings (`"connected" | "connecting" | "disconnected" | "reconnecting"`<!-- -->).
6
6
 
7
7
  ## Import
8
8
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  # ConnectionStateToast
4
4
 
5
+ The `ConnectionStateToast` component displays a toast notification indicating the current connection state of the room.
6
+
5
7
  ## Import
6
8
 
7
9
  ```typescript
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ControlBar
4
4
 
5
- The ControlBar prefab component gives the user the basic user interface to control their media devices and leave the room.
5
+ The `ControlBar` prefab gives the user the basic user interface to control their media devices (camera, microphone and screen share), open the `Chat` and leave the room.
6
6
 
7
7
  ## Import
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # DisconnectButton
4
4
 
5
- The DisconnectButton is a basic html button with the added ability to disconnect from a LiveKit room. Normally, it is used by end-users to leave a video or audio call.
5
+ The `DisconnectButton` 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.
6
6
 
7
7
  ## Import
8
8
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  # FocusLayout
4
4
 
5
+ The `FocusLayout` component is just a light wrapper around the `ParticipantTile` to display a single participant.
6
+
5
7
  ## Import
6
8
 
7
9
  ```typescript
@@ -21,3 +23,8 @@ _(Optional)_
21
23
  _(Optional)_
22
24
 
23
25
  {% /parameter %}
26
+
27
+ {% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=true %}
28
+ _(Optional)_ The track to display in the focus layout.
29
+
30
+ {% /parameter %}
@@ -2,6 +2,8 @@
2
2
 
3
3
  # FocusLayoutContainer
4
4
 
5
+ The `FocusLayoutContainer` 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 `FocusLayout` component.
6
+
5
7
  ## Import
6
8
 
7
9
  ```typescript
@@ -2,7 +2,7 @@
2
2
 
3
3
  # FocusToggle
4
4
 
5
- The FocusToggle puts the ParticipantTile in focus or removes it from focus.
5
+ The `FocusToggle` puts the `ParticipantTile` in focus or removes it from focus.
6
6
 
7
7
  ## Import
8
8
 
@@ -10,6 +10,10 @@ The FocusToggle puts the ParticipantTile in focus or removes it from focus.
10
10
  import { FocusToggle } from '@livekit/components-react';
11
11
  ```
12
12
 
13
+ ## Remarks
14
+
15
+ This component needs to live inside `LayoutContext` to work properly.
16
+
13
17
  ## Usage
14
18
 
15
19
  ```tsx
@@ -22,10 +26,17 @@ import { FocusToggle } from '@livekit/components-react';
22
26
 
23
27
  ## Properties
24
28
 
25
- {% parameter name="trackSource" type="Track.Source" optional=false %}
29
+ {% parameter name="participant" type="Participant" optional=true %}
30
+ _(Optional)_
31
+
26
32
  {% /parameter %}
27
33
 
28
- {% parameter name="participant" type="Participant" optional=true %}
34
+ {% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=true %}
35
+ _(Optional)_
36
+
37
+ {% /parameter %}
38
+
39
+ {% parameter name="trackSource" type="Track.Source" optional=true %}
29
40
  _(Optional)_
30
41
 
31
42
  {% /parameter %}
@@ -2,7 +2,7 @@
2
2
 
3
3
  # GridLayout
4
4
 
5
- The GridLayout component displays the nested participants in a grid where every participants has the same size.
5
+ The `GridLayout` 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.
6
6
 
7
7
  ## Import
8
8
 
@@ -10,6 +10,10 @@ The GridLayout component displays the nested participants in a grid where every
10
10
  import { GridLayout } from '@livekit/components-react';
11
11
  ```
12
12
 
13
+ ## Remarks
14
+
15
+ To ensure visual stability when tiles are reordered due to track updates, the component uses the `useVisualStableUpdate` hook.
16
+
13
17
  ## Usage
14
18
 
15
19
  ```tsx
@@ -2,7 +2,7 @@
2
2
 
3
3
  # LiveKitRoom
4
4
 
5
- The LiveKitRoom 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.
5
+ The `LiveKitRoom` 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.
6
6
 
7
7
  ## Import
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # MediaDeviceMenu
4
4
 
5
- The MediaDeviceMenu prefab component is a button that opens a menu that lists all media devices and allows the user to select them.
5
+ The `MediaDeviceMenu` component is a button that opens a menu that lists all media devices and allows the user to select them.
6
6
 
7
7
  ## Import
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # MediaDeviceSelect
4
4
 
5
- The MediaDeviceSelect list all media devices of one kind. Clicking on one of the listed devices make it the active media device.
5
+ The `MediaDeviceSelect` list all media devices of one kind. Clicking on one of the listed devices make it the active media device.
6
6
 
7
7
  ## Import
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ParticipantAudioTile
4
4
 
5
- The ParticipantAudioTile component is the base utility wrapper for displaying a visual representation of a participant. This component can be used as a child of the `TileLoop` or independently if a participant is passed as a property.
5
+ The `ParticipantAudioTile` component is the base utility wrapper for displaying a visual representation of a participant. This component can be used as a child of the `TileLoop` or independently if a participant is passed as a property.
6
6
 
7
7
  ## Import
8
8
 
@@ -44,3 +44,8 @@ _(Optional)_
44
44
  _(Optional)_
45
45
 
46
46
  {% /parameter %}
47
+
48
+ {% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=true %}
49
+ _(Optional)_ The track reference to display.
50
+
51
+ {% /parameter %}
@@ -2,10 +2,20 @@
2
2
 
3
3
  # ParticipantContextIfNeeded
4
4
 
5
+ The `ParticipantContextIfNeeded` component only creates a `ParticipantContext` if there is no `ParticipantContext` already.
6
+
5
7
  ## Import
6
8
 
7
9
  ```typescript
8
10
  import { ParticipantContextIfNeeded } from '@livekit/components-react';
9
11
  ```
10
12
 
11
- {% partial file="p_usage.md" variables={exampleCount: 0} /%}
13
+ ## Usage
14
+
15
+ ```tsx
16
+ <ParticipantContextIfNeeded participant={trackReference.participant}>
17
+ ...
18
+ </ParticipantContextIfNeeded>
19
+ ```
20
+
21
+ {% partial file="p_usage.md" variables={exampleCount: 1} /%}
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ParticipantLoop
4
4
 
5
- The ParticipantLoop 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.
5
+ The `ParticipantLoop` 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.
6
6
 
7
7
  ## Import
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  # ParticipantName
4
4
 
5
- The ParticipantName 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.
5
+ The `ParticipantName` 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.
6
6
 
7
7
  ## Import
8
8