@livekit/components-js-docs 0.1.7 → 0.1.9
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/captureoptionsbysource.md +4 -4
- package/generated-docs/core/chatmessage.id.md +13 -0
- package/generated-docs/core/chatmessage.md +1 -0
- package/generated-docs/core/chatoptions.md +1 -0
- package/generated-docs/core/createmediadeviceobserver.md +1 -1
- package/generated-docs/core/datatopic.md +1 -0
- package/generated-docs/core/defaultuserchoices.md +16 -0
- package/generated-docs/core/index.md +5 -4
- package/generated-docs/core/localuserchoices.md +0 -2
- package/generated-docs/core/participanttrackevents.md +16 -0
- package/generated-docs/core/participanttrackidentifier.md +23 -0
- package/generated-docs/core/participanttracksobservable.md +19 -0
- package/generated-docs/core/receivedchatmessage.edittimestamp.md +13 -0
- package/generated-docs/core/receivedchatmessage.md +4 -3
- package/generated-docs/core/sendmessage.md +1 -2
- package/generated-docs/core/setupchat.md +2 -1
- package/generated-docs/core/setupdatamessagehandler.md +2 -2
- package/generated-docs/react/audiotrackprops.md +0 -4
- package/generated-docs/react/audiovisualizerprops.md +3 -4
- package/generated-docs/react/chatmessage.id.md +13 -0
- package/generated-docs/react/chatmessage.md +1 -0
- package/generated-docs/react/component/audiotrack.md +0 -36
- package/generated-docs/react/component/audiovisualizer.md +0 -9
- package/generated-docs/react/component/focuslayout.md +0 -9
- package/generated-docs/react/component/focuslayoutcontainer.md +0 -20
- package/generated-docs/react/component/focustoggle.md +0 -18
- package/generated-docs/react/component/participantaudiotile.md +0 -27
- package/generated-docs/react/component/participanttile.md +0 -27
- package/generated-docs/react/component/prejoin.md +0 -9
- package/generated-docs/react/component/trackmutedindicator.md +2 -22
- package/generated-docs/react/component/videotrack.md +0 -36
- package/generated-docs/react/focuslayoutcontainerprops.md +0 -7
- package/generated-docs/react/focuslayoutprops.md +0 -1
- package/generated-docs/react/focustoggleprops.md +3 -5
- package/generated-docs/react/hook/usechat.md +4 -3
- package/generated-docs/react/hook/usefocustoggle.md +0 -14
- package/generated-docs/react/hook/usemediadevices.md +2 -1
- package/generated-docs/react/hook/useparticipanttile.md +0 -21
- package/generated-docs/react/hook/useparticipanttracks.md +34 -0
- package/generated-docs/react/hook/usepreviewtracks.md +1 -1
- package/generated-docs/react/hook/usetrackbyname.md +5 -9
- package/generated-docs/react/index.md +76 -88
- package/generated-docs/react/localuserchoices.md +0 -2
- package/generated-docs/react/meta-data.json +1 -1
- package/generated-docs/react/participanttileprops.md +0 -3
- package/generated-docs/react/prejoinprops.md +0 -1
- package/generated-docs/react/receivedchatmessage.edittimestamp.md +13 -0
- package/generated-docs/react/receivedchatmessage.md +4 -3
- package/generated-docs/react/trackmutedindicatorprops.md +4 -6
- package/generated-docs/react/trackmutedindicatorprops.trackref.md +1 -1
- package/generated-docs/react/usefocustoggleprops.md +4 -6
- package/generated-docs/react/useparticipanttileprops.md +0 -3
- package/generated-docs/react/usetrackshookreturntype.md +2 -2
- package/generated-docs/react/videotrackprops.md +0 -4
- package/package.json +2 -2
- package/generated-docs/core/datasendoptions.md +0 -19
- package/generated-docs/core/isparticipantsourcepinned.md +0 -32
- package/generated-docs/core/trackidentifier.md +0 -24
- package/generated-docs/react/audiotrackprops.name.md +0 -23
- package/generated-docs/react/audiotrackprops.participant.md +0 -23
- package/generated-docs/react/audiotrackprops.publication.md +0 -23
- package/generated-docs/react/audiotrackprops.source.md +0 -23
- package/generated-docs/react/audiovisualizerprops.participant.md +0 -23
- package/generated-docs/react/carouselview.md +0 -26
- package/generated-docs/react/focuslayoutcontainerprops.focustrack.md +0 -23
- package/generated-docs/react/focuslayoutcontainerprops.participants.md +0 -23
- package/generated-docs/react/focuslayoutprops.track.md +0 -23
- package/generated-docs/react/focustoggleprops.participant.md +0 -23
- package/generated-docs/react/focustoggleprops.tracksource.md +0 -23
- package/generated-docs/react/hook/useensuretrackreference.md +0 -39
- package/generated-docs/react/hook/useismuted_1.md +0 -40
- package/generated-docs/react/hook/usemaybetrackcontext.md +0 -34
- package/generated-docs/react/hook/usemediatrack.md +0 -49
- package/generated-docs/react/hook/usemediatrackbyname.md +0 -49
- package/generated-docs/react/hook/usetrack.md +0 -38
- package/generated-docs/react/hook/usetrackcontext.md +0 -34
- package/generated-docs/react/hook/usetrackmutedindicator_1.md +0 -40
- package/generated-docs/react/participanttileprops.participant.md +0 -23
- package/generated-docs/react/participanttileprops.publication.md +0 -23
- package/generated-docs/react/participanttileprops.source.md +0 -23
- package/generated-docs/react/prejoinprops.showe2eeoptions.md +0 -23
- package/generated-docs/react/trackcontext.md +0 -26
- package/generated-docs/react/trackmutedindicatorprops.participant.md +0 -23
- package/generated-docs/react/trackmutedindicatorprops.source.md +0 -23
- package/generated-docs/react/usefocustoggleprops.participant.md +0 -23
- package/generated-docs/react/usefocustoggleprops.tracksource.md +0 -23
- package/generated-docs/react/usemediatrackoptions.element.md +0 -13
- package/generated-docs/react/usemediatrackoptions.md +0 -25
- package/generated-docs/react/usemediatrackoptions.props.md +0 -13
- package/generated-docs/react/useparticipanttileprops.participant.md +0 -23
- package/generated-docs/react/useparticipanttileprops.publication.md +0 -23
- package/generated-docs/react/useparticipanttileprops.source.md +0 -23
- package/generated-docs/react/usetrackmutedindicatoroptions.md +0 -24
- package/generated-docs/react/usetrackmutedindicatoroptions.participant.md +0 -23
- package/generated-docs/react/usetrackoptions.element.md +0 -13
- package/generated-docs/react/usetrackoptions.md +0 -25
- package/generated-docs/react/usetrackoptions.props.md +0 -13
- package/generated-docs/react/videotrackprops.name.md +0 -23
- package/generated-docs/react/videotrackprops.participant.md +0 -23
- package/generated-docs/react/videotrackprops.publication.md +0 -23
- package/generated-docs/react/videotrackprops.source.md +0 -23
|
@@ -21,8 +21,6 @@ export interface FocusToggleProps extends React.ButtonHTMLAttributes<HTMLButtonE
|
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
24
|
-
| Property
|
|
25
|
-
|
|
|
26
|
-
| [
|
|
27
|
-
| [trackRef?](./react/focustoggleprops.trackref.md) | [TrackReferenceOrPlaceholder](./react/trackreferenceorplaceholder.md) | _(Optional)_ |
|
|
28
|
-
| [trackSource?](./react/focustoggleprops.tracksource.md) | Track.Source | _(Optional)_ |
|
|
24
|
+
| Property | Type | Description |
|
|
25
|
+
| ------------------------------------------------- | --------------------------------------------------------------------- | ------------ |
|
|
26
|
+
| [trackRef?](./react/focustoggleprops.trackref.md) | [TrackReferenceOrPlaceholder](./react/trackreferenceorplaceholder.md) | _(Optional)_ |
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
|
|
10
10
|
# useChat
|
|
11
11
|
|
|
12
|
-
The `useChat` hook provides chat functionality for a LiveKit room. It returns a simple `send` function to send chat messages and an array of `chatMessages` to hold received messages.
|
|
12
|
+
The `useChat` hook provides chat functionality for a LiveKit room. It returns a simple `send` function to send chat messages and an array of `chatMessages` to hold received messages. It also returns a `update` function that allows you to implement message-edit functionality.
|
|
13
13
|
|
|
14
14
|
## Import
|
|
15
15
|
|
|
@@ -19,7 +19,7 @@ import { useChat } from "@livekit/components-react";
|
|
|
19
19
|
|
|
20
20
|
## Remarks
|
|
21
21
|
|
|
22
|
-
It is possible to pass configurations for custom message encoding and decoding.
|
|
22
|
+
It is possible to pass configurations for custom message encoding and decoding and non-default topics on which to send the messages.
|
|
23
23
|
|
|
24
24
|
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
25
25
|
|
|
@@ -32,7 +32,8 @@ It is possible to pass configurations for custom message encoding and decoding.
|
|
|
32
32
|
|
|
33
33
|
```typescript
|
|
34
34
|
{
|
|
35
|
-
send: ((message: string) => Promise<
|
|
35
|
+
send: ((message: string) => Promise<import("@livekit/components-core").ChatMessage>) | undefined;
|
|
36
|
+
update: ((message: string, messageId: string) => Promise<import("@livekit/components-core").ChatMessage>) | undefined;
|
|
36
37
|
chatMessages: ReceivedChatMessage[];
|
|
37
38
|
isSending: boolean;
|
|
38
39
|
}
|
|
@@ -34,20 +34,6 @@ return <button {...mergedProps}>{inFocus ? "Unfocus" : "Focus"}</button>;
|
|
|
34
34
|
{% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=true %}
|
|
35
35
|
{% /parameter %}
|
|
36
36
|
|
|
37
|
-
{% parameter name="participant" type="Participant" optional=true deprecated=true %}
|
|
38
|
-
{% callout type="caution" variation="compact" %}
|
|
39
|
-
This parameter will be removed in a future version use `trackRef` instead.
|
|
40
|
-
|
|
41
|
-
{% /callout %}
|
|
42
|
-
{% /parameter %}
|
|
43
|
-
|
|
44
|
-
{% parameter name="trackSource" type="Track.Source" optional=true deprecated=true %}
|
|
45
|
-
{% callout type="caution" variation="compact" %}
|
|
46
|
-
This parameter will be removed in a future version use `trackRef` instead.
|
|
47
|
-
|
|
48
|
-
{% /callout %}
|
|
49
|
-
{% /parameter %}
|
|
50
|
-
|
|
51
37
|
## Returns
|
|
52
38
|
|
|
53
39
|
```typescript
|
|
@@ -28,8 +28,9 @@ const audioDevices = useMediaDevices({ kind: "audioinput" });
|
|
|
28
28
|
|
|
29
29
|
## Properties
|
|
30
30
|
|
|
31
|
-
{% parameter name="{ kind }" type="{
|
|
31
|
+
{% parameter name="{ kind, onError, }" type="{
|
|
32
32
|
kind: MediaDeviceKind;
|
|
33
|
+
onError?: (e: Error) => void;
|
|
33
34
|
}" optional=false %}
|
|
34
35
|
{% /parameter %}
|
|
35
36
|
|
|
@@ -39,27 +39,6 @@ The track reference to display.
|
|
|
39
39
|
|
|
40
40
|
{% /parameter %}
|
|
41
41
|
|
|
42
|
-
{% parameter name="participant" type="Participant" optional=true deprecated=true %}
|
|
43
|
-
{% callout type="caution" variation="compact" %}
|
|
44
|
-
This parameter will be removed in a future version use `trackRef` instead.
|
|
45
|
-
|
|
46
|
-
{% /callout %}
|
|
47
|
-
{% /parameter %}
|
|
48
|
-
|
|
49
|
-
{% parameter name="publication" type="TrackPublication" optional=true deprecated=true %}
|
|
50
|
-
{% callout type="caution" variation="compact" %}
|
|
51
|
-
This parameter will be removed in a future version use `trackRef` instead.
|
|
52
|
-
|
|
53
|
-
{% /callout %}
|
|
54
|
-
{% /parameter %}
|
|
55
|
-
|
|
56
|
-
{% parameter name="source" type="Track.Source" optional=true deprecated=true %}
|
|
57
|
-
{% callout type="caution" variation="compact" %}
|
|
58
|
-
This parameter will be removed in a future version use `trackRef` instead.
|
|
59
|
-
|
|
60
|
-
{% /callout %}
|
|
61
|
-
{% /parameter %}
|
|
62
|
-
|
|
63
42
|
## Returns
|
|
64
43
|
|
|
65
44
|
```typescript
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "useParticipantTracks",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/hooks/useParticipantTracks.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# useParticipantTracks
|
|
11
|
+
|
|
12
|
+
`useParticipantTracks` 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.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { useParticipantTracks } from "@livekit/components-react";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
{% parameter name="sources" type="Track.Source[]" optional=false %}
|
|
25
|
+
{% /parameter %}
|
|
26
|
+
|
|
27
|
+
{% parameter name="participantIdentity" type="string" optional=true %}
|
|
28
|
+
{% /parameter %}
|
|
29
|
+
|
|
30
|
+
## Returns
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
TrackReference[]
|
|
34
|
+
```
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
# useTrackByName
|
|
11
11
|
|
|
12
|
+
This function `useTrackByName` allows you to access a track by referencing its track name. Inside the function, it ensures that the a valid `participant` reference is available by checking for both a passed participant argument and, if not available, a valid participant context.
|
|
13
|
+
|
|
12
14
|
## Import
|
|
13
15
|
|
|
14
16
|
```typescript
|
|
@@ -19,20 +21,14 @@ import { useTrackByName } from "@livekit/components-react";
|
|
|
19
21
|
|
|
20
22
|
## Properties
|
|
21
23
|
|
|
22
|
-
{% parameter name="
|
|
24
|
+
{% parameter name="name" type="string" optional=false %}
|
|
23
25
|
{% /parameter %}
|
|
24
26
|
|
|
25
|
-
{% parameter name="
|
|
27
|
+
{% parameter name="participant" type="Participant" optional=true %}
|
|
26
28
|
{% /parameter %}
|
|
27
29
|
|
|
28
30
|
## Returns
|
|
29
31
|
|
|
30
32
|
```typescript
|
|
31
|
-
|
|
32
|
-
publication: import("livekit-client").TrackPublication | undefined;
|
|
33
|
-
isMuted: boolean | undefined;
|
|
34
|
-
isSubscribed: boolean | undefined;
|
|
35
|
-
track: import("livekit-client").Track | undefined;
|
|
36
|
-
elementProps: import("react").HTMLAttributes<HTMLElement>;
|
|
37
|
-
}
|
|
33
|
+
import("@livekit/components-core").TrackReferenceOrPlaceholder;
|
|
38
34
|
```
|