@livekit/components-js-docs 0.1.25 → 0.1.27
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/index.md +131 -129
- package/generated-docs/core/participantbyidentifierobserver.md +20 -0
- package/generated-docs/core/participantidentifier.md +26 -0
- package/generated-docs/react/component/audiotrack.md +50 -0
- package/generated-docs/react/{audiovisualizer.md → component/audiovisualizer.md} +9 -4
- package/generated-docs/react/component/chatentry.md +50 -0
- package/generated-docs/react/{chattoggle.md → component/chattoggle.md} +2 -4
- package/generated-docs/react/{clearpinbutton.md → component/clearpinbutton.md} +2 -4
- package/generated-docs/react/{connectionqualityindicator.md → component/connectionqualityindicator.md} +2 -4
- package/generated-docs/react/{connectionstate.md → component/connectionstate.md} +9 -4
- package/generated-docs/react/{disconnectbutton.md → component/disconnectbutton.md} +9 -4
- package/generated-docs/react/{focustoggle.md → component/focustoggle.md} +9 -4
- package/generated-docs/react/component/livekitroom.md +77 -0
- package/generated-docs/react/component/mediadeviceselect.md +73 -0
- package/generated-docs/react/{participantaudiotile.md → component/participantaudiotile.md} +19 -4
- package/generated-docs/react/{participantname.md → component/participantname.md} +2 -4
- package/generated-docs/react/{participanttile.md → component/participanttile.md} +19 -4
- package/generated-docs/react/{roomname.md → component/roomname.md} +9 -2
- package/generated-docs/react/{startaudio.md → component/startaudio.md} +7 -4
- package/generated-docs/react/{trackmutedindicator.md → component/trackmutedindicator.md} +12 -4
- package/generated-docs/react/component/tracktoggle.md +64 -0
- package/generated-docs/react/{videotrack.md → component/videotrack.md} +24 -4
- package/generated-docs/react/hook/useclearpinbutton.md +1 -1
- package/generated-docs/react/hook/useremoteparticipant.md +3 -3
- package/generated-docs/react/hook/useremoteparticipant_1.md +44 -0
- package/generated-docs/react/index.md +99 -97
- package/generated-docs/react/meta-data.json +1 -1
- package/generated-docs/react/participantidentifier.md +26 -0
- package/package.json +2 -2
- package/generated-docs/react/audiotrack.md +0 -30
- package/generated-docs/react/chatentry.md +0 -28
- package/generated-docs/react/mediadeviceselect.md +0 -30
- package/generated-docs/react/tracktoggle.md +0 -31
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "AudioTrack",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/components/participant/AudioTrack.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# AudioTrack
|
|
11
|
+
|
|
12
|
+
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 `Participant` as a property.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { AudioTrack } from "@livekit/components-react";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<ParticipantTile>
|
|
24
|
+
<AudioTrack trackRef={trackRef} />
|
|
25
|
+
</ParticipantTile>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
{% parameter name="muted" type="boolean" optional=true %}
|
|
33
|
+
_(Optional)_ Mutes the audio track if set to `true`<!-- -->.
|
|
34
|
+
|
|
35
|
+
{% /parameter %}
|
|
36
|
+
|
|
37
|
+
{% parameter name="onSubscriptionStatusChanged" type="(subscribed: boolean) => void" optional=true %}
|
|
38
|
+
_(Optional)_
|
|
39
|
+
|
|
40
|
+
{% /parameter %}
|
|
41
|
+
|
|
42
|
+
{% parameter name="trackRef" type="TrackReference" optional=true %}
|
|
43
|
+
_(Optional)_ The track reference of the track from which the audio is to be rendered.
|
|
44
|
+
|
|
45
|
+
{% /parameter %}
|
|
46
|
+
|
|
47
|
+
{% parameter name="volume" type="number" optional=true %}
|
|
48
|
+
_(Optional)_ Sets the volume of the audio track. By default, the range is between `0.0` and `1.0`<!-- -->.
|
|
49
|
+
|
|
50
|
+
{% /parameter %}
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The AudioVisualizer component is used to visualize the audio volume of a given audio track.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
AudioVisualizer
|
|
18
|
-
AudioVisualizerProps & React.RefAttributes<SVGSVGElement>
|
|
19
|
-
>;
|
|
17
|
+
import { AudioVisualizer } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Remarks
|
|
@@ -30,3 +28,10 @@ Requires a `TrackReferenceOrPlaceholder` to be provided either as a property or
|
|
|
30
28
|
```
|
|
31
29
|
|
|
32
30
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
31
|
+
|
|
32
|
+
## Properties
|
|
33
|
+
|
|
34
|
+
{% parameter name="trackRef" type="TrackReference" optional=true %}
|
|
35
|
+
_(Optional)_
|
|
36
|
+
|
|
37
|
+
{% /parameter %}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "ChatEntry",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/components/ChatEntry.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# ChatEntry
|
|
11
|
+
|
|
12
|
+
The `ChatEntry` component holds and displays one chat message.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { ChatEntry } from "@livekit/components-react";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<Chat>
|
|
24
|
+
<ChatEntry />
|
|
25
|
+
</Chat>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
{% parameter name="entry" type="ReceivedChatMessage" optional=false %}
|
|
33
|
+
The chat massage object to display.
|
|
34
|
+
|
|
35
|
+
{% /parameter %}
|
|
36
|
+
|
|
37
|
+
{% parameter name="hideName" type="boolean" optional=true %}
|
|
38
|
+
_(Optional)_ Hide sender name. Useful when displaying multiple consecutive chat messages from the same person.
|
|
39
|
+
|
|
40
|
+
{% /parameter %}
|
|
41
|
+
|
|
42
|
+
{% parameter name="hideTimestamp" type="boolean" optional=true %}
|
|
43
|
+
_(Optional)_ Hide message timestamp.
|
|
44
|
+
|
|
45
|
+
{% /parameter %}
|
|
46
|
+
|
|
47
|
+
{% parameter name="messageFormatter" type="MessageFormatter" optional=true %}
|
|
48
|
+
_(Optional)_ An optional formatter for the message body.
|
|
49
|
+
|
|
50
|
+
{% /parameter %}
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `ChatToggle` component is a button that toggles the visibility of the `Chat` component.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
ChatToggle
|
|
18
|
-
ChatToggleProps & React.RefAttributes<HTMLButtonElement>
|
|
19
|
-
>;
|
|
17
|
+
import { ChatToggle } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Remarks
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `ClearPinButton` is a basic html button with the added ability to signal the `LayoutContext` that it should display the grid view again.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
ClearPinButton
|
|
18
|
-
ClearPinButtonProps & React.RefAttributes<HTMLButtonElement>
|
|
19
|
-
>;
|
|
17
|
+
import { ClearPinButton } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Remarks
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `ConnectionQualityIndicator` shows the individual connection quality of a participant.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
ConnectionQualityIndicator
|
|
18
|
-
ConnectionQualityIndicatorProps & React.RefAttributes<HTMLDivElement>
|
|
19
|
-
>;
|
|
17
|
+
import { ConnectionQualityIndicator } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `ConnectionState` component displays the connection status of the room as strings (`"connected" | "connecting" | "disconnected" | "reconnecting"`<!-- -->).
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
ConnectionState
|
|
18
|
-
ConnectionStatusProps & React.RefAttributes<HTMLDivElement>
|
|
19
|
-
>;
|
|
17
|
+
import { ConnectionState } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
@@ -28,3 +26,10 @@ ConnectionState: React.ForwardRefExoticComponent<
|
|
|
28
26
|
```
|
|
29
27
|
|
|
30
28
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
{% parameter name="room" type="Room" optional=true %}
|
|
33
|
+
_(Optional)_ The room from which the connection status should be displayed.
|
|
34
|
+
|
|
35
|
+
{% /parameter %}
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
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.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
DisconnectButton
|
|
18
|
-
DisconnectButtonProps & React.RefAttributes<HTMLButtonElement>
|
|
19
|
-
>;
|
|
17
|
+
import { DisconnectButton } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
@@ -28,3 +26,10 @@ DisconnectButton: React.ForwardRefExoticComponent<
|
|
|
28
26
|
```
|
|
29
27
|
|
|
30
28
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
{% parameter name="stopTracks" type="boolean" optional=true %}
|
|
33
|
+
_(Optional)_
|
|
34
|
+
|
|
35
|
+
{% /parameter %}
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `FocusToggle` puts the `ParticipantTile` in focus or removes it from focus.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
FocusToggle
|
|
18
|
-
FocusToggleProps & React.RefAttributes<HTMLButtonElement>
|
|
19
|
-
>;
|
|
17
|
+
import { FocusToggle } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Remarks
|
|
@@ -32,3 +30,10 @@ This component needs to live inside `LayoutContext` to work properly.
|
|
|
32
30
|
```
|
|
33
31
|
|
|
34
32
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
33
|
+
|
|
34
|
+
## Properties
|
|
35
|
+
|
|
36
|
+
{% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=true %}
|
|
37
|
+
_(Optional)_
|
|
38
|
+
|
|
39
|
+
{% /parameter %}
|
|
@@ -26,3 +26,80 @@ import { LiveKitRoom } from "@livekit/components-react";
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
{% parameter name="serverUrl" type="string | undefined" optional=false %}
|
|
33
|
+
URL to the LiveKit server. For example: `wss://<domain>.livekit.cloud` To simplify the implementation, `undefined` is also accepted as an intermediate value, but only with a valid string url can the connection be established.
|
|
34
|
+
|
|
35
|
+
{% /parameter %}
|
|
36
|
+
|
|
37
|
+
{% parameter name="token" type="string | undefined" optional=false %}
|
|
38
|
+
A user specific access token for a client to authenticate to the room. This token is necessary to establish a connection to the room. To simplify the implementation, `undefined` is also accepted as an intermediate value, but only with a valid string token can the connection be established.
|
|
39
|
+
|
|
40
|
+
{% /parameter %}
|
|
41
|
+
|
|
42
|
+
{% parameter name="audio" type="AudioCaptureOptions | boolean" optional=true %}
|
|
43
|
+
_(Optional)_ Publish audio immediately after connecting to your LiveKit room.
|
|
44
|
+
|
|
45
|
+
{% /parameter %}
|
|
46
|
+
|
|
47
|
+
{% parameter name="connect" type="boolean" optional=true %}
|
|
48
|
+
_(Optional)_ If set to true a connection to LiveKit room is initiated.
|
|
49
|
+
|
|
50
|
+
{% /parameter %}
|
|
51
|
+
|
|
52
|
+
{% parameter name="connectOptions" type="RoomConnectOptions" optional=true %}
|
|
53
|
+
_(Optional)_ Define options how to connect to the LiveKit server.
|
|
54
|
+
|
|
55
|
+
{% /parameter %}
|
|
56
|
+
|
|
57
|
+
{% parameter name="onConnected" type="() => void" optional=true %}
|
|
58
|
+
_(Optional)_
|
|
59
|
+
|
|
60
|
+
{% /parameter %}
|
|
61
|
+
|
|
62
|
+
{% parameter name="onDisconnected" type="() => void" optional=true %}
|
|
63
|
+
_(Optional)_
|
|
64
|
+
|
|
65
|
+
{% /parameter %}
|
|
66
|
+
|
|
67
|
+
{% parameter name="onEncryptionError" type="(error: Error) => void" optional=true %}
|
|
68
|
+
_(Optional)_
|
|
69
|
+
|
|
70
|
+
{% /parameter %}
|
|
71
|
+
|
|
72
|
+
{% parameter name="onError" type="(error: Error) => void" optional=true %}
|
|
73
|
+
_(Optional)_
|
|
74
|
+
|
|
75
|
+
{% /parameter %}
|
|
76
|
+
|
|
77
|
+
{% parameter name="onMediaDeviceFailure" type="(failure?: MediaDeviceFailure) => void" optional=true %}
|
|
78
|
+
_(Optional)_
|
|
79
|
+
|
|
80
|
+
{% /parameter %}
|
|
81
|
+
|
|
82
|
+
{% parameter name="options" type="RoomOptions" optional=true %}
|
|
83
|
+
_(Optional)_ Options for when creating a new room. When you pass your own room instance to this component, these options have no effect. Instead, set the options directly in the room instance.
|
|
84
|
+
|
|
85
|
+
{% /parameter %}
|
|
86
|
+
|
|
87
|
+
{% parameter name="room" type="Room" optional=true %}
|
|
88
|
+
_(Optional)_ Optional room instance. By passing your own room instance you overwrite the `options` parameter, make sure to set the options directly on the room instance itself.
|
|
89
|
+
|
|
90
|
+
{% /parameter %}
|
|
91
|
+
|
|
92
|
+
{% parameter name="screen" type="ScreenShareCaptureOptions | boolean" optional=true %}
|
|
93
|
+
_(Optional)_ Publish screen share immediately after connecting to your LiveKit room.
|
|
94
|
+
|
|
95
|
+
{% /parameter %}
|
|
96
|
+
|
|
97
|
+
{% parameter name="simulateParticipants" type="number | undefined" optional=true %}
|
|
98
|
+
_(Optional)_
|
|
99
|
+
|
|
100
|
+
{% /parameter %}
|
|
101
|
+
|
|
102
|
+
{% parameter name="video" type="VideoCaptureOptions | boolean" optional=true %}
|
|
103
|
+
_(Optional)_ Publish video immediately after connecting to your LiveKit room.
|
|
104
|
+
|
|
105
|
+
{% /parameter %}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "MediaDeviceSelect",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/components/controls/MediaDeviceSelect.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# MediaDeviceSelect
|
|
11
|
+
|
|
12
|
+
The `MediaDeviceSelect` list all media devices of one kind. Clicking on one of the listed devices make it the active media device.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { MediaDeviceSelect } from "@livekit/components-react";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<LiveKitRoom>
|
|
24
|
+
<MediaDeviceSelect kind="audioinput" />
|
|
25
|
+
</LiveKitRoom>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
{% parameter name="kind" type="MediaDeviceKind" optional=false %}
|
|
33
|
+
{% /parameter %}
|
|
34
|
+
|
|
35
|
+
{% parameter name="exactMatch" type="boolean" optional=true %}
|
|
36
|
+
_(Optional)_ will force the browser to only return the specified device will call `onDeviceSelectError` with the error in case this fails
|
|
37
|
+
|
|
38
|
+
{% /parameter %}
|
|
39
|
+
|
|
40
|
+
{% parameter name="initialSelection" type="string" optional=true %}
|
|
41
|
+
_(Optional)_
|
|
42
|
+
|
|
43
|
+
{% /parameter %}
|
|
44
|
+
|
|
45
|
+
{% parameter name="onActiveDeviceChange" type="(deviceId: string) => void" optional=true %}
|
|
46
|
+
_(Optional)_
|
|
47
|
+
|
|
48
|
+
{% /parameter %}
|
|
49
|
+
|
|
50
|
+
{% parameter name="onDeviceListChange" type="(devices: MediaDeviceInfo[]) => void" optional=true %}
|
|
51
|
+
_(Optional)_
|
|
52
|
+
|
|
53
|
+
{% /parameter %}
|
|
54
|
+
|
|
55
|
+
{% parameter name="onDeviceSelectError" type="(e: Error) => void" optional=true %}
|
|
56
|
+
_(Optional)_
|
|
57
|
+
|
|
58
|
+
{% /parameter %}
|
|
59
|
+
|
|
60
|
+
{% parameter name="onError" type="(e: Error) => void" optional=true %}
|
|
61
|
+
_(Optional)_
|
|
62
|
+
|
|
63
|
+
{% /parameter %}
|
|
64
|
+
|
|
65
|
+
{% parameter name="requestPermissions" type="boolean" optional=true %}
|
|
66
|
+
_(Optional)_ this will call getUserMedia if the permissions are not yet given to enumerate the devices with device labels. in some browsers multiple calls to getUserMedia result in multiple permission prompts. It's generally advised only flip this to true, once a (preview) track has been acquired successfully with the appropriate permissions.
|
|
67
|
+
|
|
68
|
+
{% /parameter %}
|
|
69
|
+
|
|
70
|
+
{% parameter name="track" type="LocalAudioTrack | LocalVideoTrack" optional=true %}
|
|
71
|
+
_(Optional)_
|
|
72
|
+
|
|
73
|
+
{% /parameter %}
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
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.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
ParticipantAudioTile
|
|
18
|
-
ParticipantTileProps & React.RefAttributes<HTMLDivElement>
|
|
19
|
-
>;
|
|
17
|
+
import { ParticipantAudioTile } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
@@ -26,3 +24,20 @@ ParticipantAudioTile: React.ForwardRefExoticComponent<
|
|
|
26
24
|
```
|
|
27
25
|
|
|
28
26
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
{% parameter name="disableSpeakingIndicator" type="boolean" optional=true %}
|
|
31
|
+
_(Optional)_
|
|
32
|
+
|
|
33
|
+
{% /parameter %}
|
|
34
|
+
|
|
35
|
+
{% parameter name="onParticipantClick" type="(event: ParticipantClickEvent) => void" optional=true %}
|
|
36
|
+
_(Optional)_
|
|
37
|
+
|
|
38
|
+
{% /parameter %}
|
|
39
|
+
|
|
40
|
+
{% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=true %}
|
|
41
|
+
_(Optional)_ The track reference to display.
|
|
42
|
+
|
|
43
|
+
{% /parameter %}
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
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.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
ParticipantName
|
|
18
|
-
ParticipantNameProps & React.RefAttributes<HTMLSpanElement>
|
|
19
|
-
>;
|
|
17
|
+
import { ParticipantName } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `ParticipantTile` component is the base utility wrapper for displaying a visual representation of a participant. This component can be used as a child of the `TrackLoop` component or by passing a track reference as property.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
ParticipantTile
|
|
18
|
-
ParticipantTileProps & React.RefAttributes<HTMLDivElement>
|
|
19
|
-
>;
|
|
17
|
+
import { ParticipantTile } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Usage Example 1
|
|
@@ -38,3 +36,20 @@ Using the `ParticipantTile` component as a child of the `TrackLoop` component:
|
|
|
38
36
|
```
|
|
39
37
|
|
|
40
38
|
{% partial file="p_usage.md" variables={exampleCount: 2} /%}
|
|
39
|
+
|
|
40
|
+
## Properties
|
|
41
|
+
|
|
42
|
+
{% parameter name="disableSpeakingIndicator" type="boolean" optional=true %}
|
|
43
|
+
_(Optional)_
|
|
44
|
+
|
|
45
|
+
{% /parameter %}
|
|
46
|
+
|
|
47
|
+
{% parameter name="onParticipantClick" type="(event: ParticipantClickEvent) => void" optional=true %}
|
|
48
|
+
_(Optional)_
|
|
49
|
+
|
|
50
|
+
{% /parameter %}
|
|
51
|
+
|
|
52
|
+
{% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=true %}
|
|
53
|
+
_(Optional)_ The track reference to display.
|
|
54
|
+
|
|
55
|
+
{% /parameter %}
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `RoomName` component renders the name of the connected LiveKit room inside a span tag.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
RoomName
|
|
17
|
+
import { RoomName } from "@livekit/components-react";
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
## Usage
|
|
@@ -26,3 +26,10 @@ RoomName: React.ForwardRefExoticComponent<RoomNameProps & React.RefAttributes<HT
|
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
{% parameter name="childrenPosition" type="'before' | 'after'" optional=true %}
|
|
33
|
+
_(Optional)_
|
|
34
|
+
|
|
35
|
+
{% /parameter %}
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `StartAudio` 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.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
StartAudio
|
|
18
|
-
AllowAudioPlaybackProps & React.RefAttributes<HTMLButtonElement>
|
|
19
|
-
>;
|
|
17
|
+
import { StartAudio } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
@@ -28,3 +26,8 @@ StartAudio: React.ForwardRefExoticComponent<
|
|
|
28
26
|
```
|
|
29
27
|
|
|
30
28
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
29
|
+
|
|
30
|
+
## Properties
|
|
31
|
+
|
|
32
|
+
{% parameter name="label" type="string" optional=false %}
|
|
33
|
+
{% /parameter %}
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `TrackMutedIndicator` 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.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
TrackMutedIndicator
|
|
18
|
-
TrackMutedIndicatorProps & React.RefAttributes<HTMLDivElement>
|
|
19
|
-
>;
|
|
17
|
+
import { TrackMutedIndicator } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
@@ -26,3 +24,13 @@ TrackMutedIndicator: React.ForwardRefExoticComponent<
|
|
|
26
24
|
```
|
|
27
25
|
|
|
28
26
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
{% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=false %}
|
|
31
|
+
{% /parameter %}
|
|
32
|
+
|
|
33
|
+
{% parameter name="show" type="'always' | 'muted' | 'unmuted'" optional=true %}
|
|
34
|
+
_(Optional)_
|
|
35
|
+
|
|
36
|
+
{% /parameter %}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "TrackToggle",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/components/controls/TrackToggle.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# TrackToggle
|
|
11
|
+
|
|
12
|
+
With the `TrackToggle` 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.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { TrackToggle } from "@livekit/components-react";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
<LiveKitRoom>
|
|
24
|
+
<TrackToggle source={Track.Source.Microphone} />
|
|
25
|
+
<TrackToggle source={Track.Source.Camera} />
|
|
26
|
+
</LiveKitRoom>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
30
|
+
|
|
31
|
+
## Properties
|
|
32
|
+
|
|
33
|
+
{% parameter name="source" type="T" optional=false %}
|
|
34
|
+
{% /parameter %}
|
|
35
|
+
|
|
36
|
+
{% parameter name="captureOptions" type="CaptureOptionsBySource<T>" optional=true %}
|
|
37
|
+
_(Optional)_
|
|
38
|
+
|
|
39
|
+
{% /parameter %}
|
|
40
|
+
|
|
41
|
+
{% parameter name="initialState" type="boolean" optional=true %}
|
|
42
|
+
_(Optional)_
|
|
43
|
+
|
|
44
|
+
{% /parameter %}
|
|
45
|
+
|
|
46
|
+
{% parameter name="onChange" type="(enabled: boolean, isUserInitiated: boolean) => void" optional=true %}
|
|
47
|
+
_(Optional)_ Function that is called when the enabled state of the toggle changes. The second function argument `isUserInitiated` is `true` if the change was initiated by a user interaction, such as a click.
|
|
48
|
+
|
|
49
|
+
{% /parameter %}
|
|
50
|
+
|
|
51
|
+
{% parameter name="onDeviceError" type="(error: Error) => void" optional=true %}
|
|
52
|
+
_(Optional)_
|
|
53
|
+
|
|
54
|
+
{% /parameter %}
|
|
55
|
+
|
|
56
|
+
{% parameter name="publishOptions" type="TrackPublishOptions" optional=true %}
|
|
57
|
+
_(Optional)_
|
|
58
|
+
|
|
59
|
+
{% /parameter %}
|
|
60
|
+
|
|
61
|
+
{% parameter name="showIcon" type="boolean" optional=true %}
|
|
62
|
+
_(Optional)_
|
|
63
|
+
|
|
64
|
+
{% /parameter %}
|
|
@@ -11,12 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
The `VideoTrack` component is responsible for rendering participant video tracks like `camera` and `screen_share`<!-- -->. This component must have access to the participant's context, or alternatively pass it a `Participant` as a property.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
## Import
|
|
15
15
|
|
|
16
16
|
```typescript
|
|
17
|
-
VideoTrack
|
|
18
|
-
VideoTrackProps & React.RefAttributes<HTMLVideoElement>
|
|
19
|
-
>;
|
|
17
|
+
import { VideoTrack } from "@livekit/components-react";
|
|
20
18
|
```
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
@@ -26,3 +24,25 @@ VideoTrack: React.ForwardRefExoticComponent<
|
|
|
26
24
|
```
|
|
27
25
|
|
|
28
26
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
{% parameter name="manageSubscription" type="boolean" optional=true %}
|
|
31
|
+
_(Optional)_
|
|
32
|
+
|
|
33
|
+
{% /parameter %}
|
|
34
|
+
|
|
35
|
+
{% parameter name="onSubscriptionStatusChanged" type="(subscribed: boolean) => void" optional=true %}
|
|
36
|
+
_(Optional)_
|
|
37
|
+
|
|
38
|
+
{% /parameter %}
|
|
39
|
+
|
|
40
|
+
{% parameter name="onTrackClick" type="(evt: ParticipantClickEvent) => void" optional=true %}
|
|
41
|
+
_(Optional)_
|
|
42
|
+
|
|
43
|
+
{% /parameter %}
|
|
44
|
+
|
|
45
|
+
{% parameter name="trackRef" type="TrackReference" optional=true %}
|
|
46
|
+
_(Optional)_ The track reference of the track to render.
|
|
47
|
+
|
|
48
|
+
{% /parameter %}
|