@livekit/components-js-docs 0.1.38 → 0.1.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generated-docs/core/chatoptions.md +3 -3
- package/generated-docs/core/createchatobserver.md +23 -0
- package/generated-docs/core/index.md +4 -1
- package/generated-docs/core/{chatmessage.id.md → legacychatmessage.ignore.md} +3 -3
- package/generated-docs/core/legacychatmessage.md +24 -0
- package/generated-docs/{react/chatmessage.id.md → core/legacyreceivedchatmessage.ignore.md} +3 -3
- package/generated-docs/core/legacyreceivedchatmessage.md +24 -0
- package/generated-docs/core/messagedecoder.md +10 -2
- package/generated-docs/core/messageencoder.md +10 -2
- package/generated-docs/core/receivedchatmessage.md +4 -5
- package/generated-docs/core/setupchat.md +9 -1
- package/generated-docs/core/setupchatmessagehandler.md +33 -0
- package/generated-docs/react/component/barvisualizer.md +1 -1
- package/generated-docs/react/component/controlbar.md +1 -1
- package/generated-docs/react/component/participantloop.md +1 -1
- package/generated-docs/react/component/prejoin.md +1 -1
- package/generated-docs/react/component/trackloop.md +5 -5
- package/generated-docs/react/component/videoconference.md +1 -1
- package/generated-docs/react/controlbarprops.md +6 -6
- package/generated-docs/react/controlbarprops.saveuserchoices.md +1 -1
- package/generated-docs/react/hook/usechat.md +7 -6
- package/generated-docs/react/hook/usevoiceassistant.md +1 -1
- package/generated-docs/react/index.md +0 -1
- package/generated-docs/react/messagedecoder.md +9 -3
- package/generated-docs/react/messageencoder.md +9 -3
- package/generated-docs/react/receivedchatmessage.md +4 -5
- package/package.json +2 -2
- package/generated-docs/core/chatmessage.md +0 -26
- package/generated-docs/core/chatmessage.message.md +0 -13
- package/generated-docs/core/chatmessage.timestamp.md +0 -13
- package/generated-docs/core/receivedchatmessage.edittimestamp.md +0 -13
- package/generated-docs/react/chatmessage.md +0 -26
- package/generated-docs/react/chatmessage.message.md +0 -13
- package/generated-docs/react/chatmessage.timestamp.md +0 -13
- package/generated-docs/react/receivedchatmessage.edittimestamp.md +0 -13
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
15
|
export type ChatOptions = {
|
|
16
|
-
messageEncoder?: (message:
|
|
17
|
-
messageDecoder?: (message: Uint8Array) =>
|
|
16
|
+
messageEncoder?: (message: LegacyChatMessage) => Uint8Array;
|
|
17
|
+
messageDecoder?: (message: Uint8Array) => LegacyReceivedChatMessage;
|
|
18
18
|
channelTopic?: string;
|
|
19
19
|
updateChannelTopic?: string;
|
|
20
20
|
};
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
**References:** [
|
|
23
|
+
**References:** [LegacyChatMessage](./core/legacychatmessage.md)<!-- -->, [LegacyReceivedChatMessage](./core/legacyreceivedchatmessage.md)
|
|
24
24
|
|
|
25
25
|
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "createChatObserver",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/observables/room.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# createChatObserver
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export declare function createChatObserver(
|
|
16
|
+
room: Room
|
|
17
|
+
): Observable<
|
|
18
|
+
[
|
|
19
|
+
message: import("livekit-client").ChatMessage,
|
|
20
|
+
participant?: LocalParticipant | import("livekit-client").RemoteParticipant | undefined
|
|
21
|
+
]
|
|
22
|
+
>;
|
|
23
|
+
```
|
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
| [AudioSource](./core/audiosource.md) | |
|
|
21
21
|
| [BaseDataMessage](./core/basedatamessage.md) | |
|
|
22
22
|
| [CaptureOptionsBySource](./core/captureoptionsbysource.md) | |
|
|
23
|
-
| [ChatMessage](./core/chatmessage.md) | |
|
|
24
23
|
| [ChatOptions](./core/chatoptions.md) | |
|
|
25
24
|
| [computeMenuPosition(button, menu)](./core/computemenuposition.md) | |
|
|
26
25
|
| [connectedParticipantObserver(room, identity, options)](./core/connectedparticipantobserver.md) | |
|
|
@@ -28,6 +27,7 @@
|
|
|
28
27
|
| [connectedParticipantsObserver(room, options)](./core/connectedparticipantsobserver.md) | |
|
|
29
28
|
| [connectionStateObserver(room)](./core/connectionstateobserver.md) | |
|
|
30
29
|
| [createActiveDeviceObservable(room, kind)](./core/createactivedeviceobservable.md) | |
|
|
30
|
+
| [createChatObserver(room)](./core/createchatobserver.md) | |
|
|
31
31
|
| [createConnectionQualityObserver(participant)](./core/createconnectionqualityobserver.md) | |
|
|
32
32
|
| [createDataObserver(room)](./core/createdataobserver.md) | |
|
|
33
33
|
| [createDefaultGrammar()](./core/createdefaultgrammar.md) | |
|
|
@@ -58,6 +58,8 @@
|
|
|
58
58
|
| [isSourceWitOptions(source)](./core/issourcewitoptions.md) | |
|
|
59
59
|
| [isTrackReferencePinned(trackReference, pinState)](./core/istrackreferencepinned.md) | Check if the <code>TrackReference</code> is pinned. |
|
|
60
60
|
| [isTrackReferencePlaceholder(trackReference)](./core/istrackreferenceplaceholder.md) | |
|
|
61
|
+
| [LegacyChatMessage](./core/legacychatmessage.md) | |
|
|
62
|
+
| [LegacyReceivedChatMessage](./core/legacyreceivedchatmessage.md) | |
|
|
61
63
|
| [loadUserChoices(defaults, preventLoad)](./core/loaduserchoices.md) | Reads the user choices from local storage, or returns the default settings if none are found. |
|
|
62
64
|
| [LocalUserChoices](./core/localuserchoices.md) | Represents the user's choices for video and audio input devices, as well as their username. |
|
|
63
65
|
| [log](./core/log.md) | |
|
|
@@ -103,6 +105,7 @@
|
|
|
103
105
|
| [setLogLevel(level, options)](./core/setloglevel.md) | Set the log level for both the <code>@livekit/components-react</code> package and the <code>@livekit-client</code> package. To set the <code>@livekit-client</code> log independently, use the <code>liveKitClientLogLevel</code> prop on the <code>options</code> object. |
|
|
104
106
|
| [SetMediaDeviceOptions](./core/setmediadeviceoptions.md) | |
|
|
105
107
|
| [setupChat(room, options)](./core/setupchat.md) | |
|
|
108
|
+
| [setupChatMessageHandler(room)](./core/setupchatmessagehandler.md) | |
|
|
106
109
|
| [setupChatToggle()](./core/setupchattoggle.md) | |
|
|
107
110
|
| [setupClearPinButton()](./core/setupclearpinbutton.md) | |
|
|
108
111
|
| [setupConnectionQualityIndicator(participant)](./core/setupconnectionqualityindicator.md) | |
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
{ "title": "
|
|
2
|
+
{ "title": "LegacyChatMessage.ignore property" }
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# LegacyChatMessage.ignore property
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
|
|
12
|
+
ignore?: true;
|
|
13
13
|
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "LegacyChatMessage interface",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/components/chat.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# LegacyChatMessage interface
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export interface LegacyChatMessage extends ChatMessage
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Extends:** ChatMessage
|
|
19
|
+
|
|
20
|
+
## Properties
|
|
21
|
+
|
|
22
|
+
| Property | Type | Description |
|
|
23
|
+
| --------------------------------------------- | ---- | ------------ |
|
|
24
|
+
| [ignore?](./core/legacychatmessage.ignore.md) | true | _(Optional)_ |
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
|
-
{ "title": "
|
|
2
|
+
{ "title": "LegacyReceivedChatMessage.ignore property" }
|
|
3
3
|
---
|
|
4
4
|
|
|
5
5
|
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
# LegacyReceivedChatMessage.ignore property
|
|
8
8
|
|
|
9
9
|
**Signature:**
|
|
10
10
|
|
|
11
11
|
```typescript
|
|
12
|
-
|
|
12
|
+
ignore?: true;
|
|
13
13
|
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "LegacyReceivedChatMessage interface",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/components/chat.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# LegacyReceivedChatMessage interface
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export interface LegacyReceivedChatMessage extends ReceivedChatMessage
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Extends:** [ReceivedChatMessage](./core/receivedchatmessage.md)
|
|
19
|
+
|
|
20
|
+
## Properties
|
|
21
|
+
|
|
22
|
+
| Property | Type | Description |
|
|
23
|
+
| ----------------------------------------------------- | ---- | ------------ |
|
|
24
|
+
| [ignore?](./core/legacyreceivedchatmessage.ignore.md) | true | _(Optional)_ |
|
|
@@ -9,12 +9,20 @@
|
|
|
9
9
|
|
|
10
10
|
# MessageDecoder type
|
|
11
11
|
|
|
12
|
+
{% callout type="caution" variation="normal" %}
|
|
13
|
+
|
|
14
|
+
This API is deprecated:
|
|
15
|
+
|
|
16
|
+
the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead
|
|
17
|
+
|
|
18
|
+
{% /callout %}
|
|
19
|
+
|
|
12
20
|
**Signature:**
|
|
13
21
|
|
|
14
22
|
```typescript
|
|
15
|
-
export type MessageDecoder = (message: Uint8Array) =>
|
|
23
|
+
export type MessageDecoder = (message: Uint8Array) => LegacyReceivedChatMessage;
|
|
16
24
|
```
|
|
17
25
|
|
|
18
|
-
**References:** [
|
|
26
|
+
**References:** [LegacyReceivedChatMessage](./core/legacyreceivedchatmessage.md)
|
|
19
27
|
|
|
20
28
|
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -9,12 +9,20 @@
|
|
|
9
9
|
|
|
10
10
|
# MessageEncoder type
|
|
11
11
|
|
|
12
|
+
{% callout type="caution" variation="normal" %}
|
|
13
|
+
|
|
14
|
+
This API is deprecated:
|
|
15
|
+
|
|
16
|
+
the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead
|
|
17
|
+
|
|
18
|
+
{% /callout %}
|
|
19
|
+
|
|
12
20
|
**Signature:**
|
|
13
21
|
|
|
14
22
|
```typescript
|
|
15
|
-
export type MessageEncoder = (message:
|
|
23
|
+
export type MessageEncoder = (message: LegacyChatMessage) => Uint8Array;
|
|
16
24
|
```
|
|
17
25
|
|
|
18
|
-
**References:** [
|
|
26
|
+
**References:** [LegacyChatMessage](./core/legacychatmessage.md)
|
|
19
27
|
|
|
20
28
|
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -15,13 +15,12 @@
|
|
|
15
15
|
export interface ReceivedChatMessage extends ChatMessage
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
**Extends:**
|
|
18
|
+
**Extends:** ChatMessage
|
|
19
19
|
|
|
20
20
|
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
24
|
-
| Property
|
|
25
|
-
|
|
|
26
|
-
| [
|
|
27
|
-
| [from?](./core/receivedchatmessage.from.md) | Participant | _(Optional)_ |
|
|
24
|
+
| Property | Type | Description |
|
|
25
|
+
| ------------------------------------------- | ----------- | ------------ |
|
|
26
|
+
| [from?](./core/receivedchatmessage.from.md) | Participant | _(Optional)_ |
|
|
@@ -19,6 +19,14 @@ export declare function setupChat(
|
|
|
19
19
|
messageObservable: import("rxjs").Observable<ReceivedChatMessage[]>;
|
|
20
20
|
isSendingObservable: BehaviorSubject<boolean>;
|
|
21
21
|
send: (message: string) => Promise<ChatMessage>;
|
|
22
|
-
update: (
|
|
22
|
+
update: (
|
|
23
|
+
message: string,
|
|
24
|
+
originalMessageOrId: string | ChatMessage
|
|
25
|
+
) => Promise<{
|
|
26
|
+
readonly message: string;
|
|
27
|
+
readonly editTimestamp: number;
|
|
28
|
+
readonly id: string;
|
|
29
|
+
readonly timestamp: number;
|
|
30
|
+
}>;
|
|
23
31
|
};
|
|
24
32
|
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "setupChatMessageHandler",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/observables/dataChannel.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# setupChatMessageHandler
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export declare function setupChatMessageHandler(room: Room): {
|
|
16
|
+
chatObservable: Observable<
|
|
17
|
+
[
|
|
18
|
+
message: ChatMessage,
|
|
19
|
+
participant?: LocalParticipant | import("livekit-client").RemoteParticipant | undefined
|
|
20
|
+
]
|
|
21
|
+
>;
|
|
22
|
+
send: (text: string) => Promise<ChatMessage>;
|
|
23
|
+
edit: (
|
|
24
|
+
text: string,
|
|
25
|
+
originalMsg: ChatMessage
|
|
26
|
+
) => Promise<{
|
|
27
|
+
readonly message: string;
|
|
28
|
+
readonly editTimestamp: number;
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly timestamp: number;
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
```
|
|
@@ -21,7 +21,7 @@ import { BarVisualizer } from "@livekit/components-react";
|
|
|
21
21
|
|
|
22
22
|
## Remarks
|
|
23
23
|
|
|
24
|
-
For VoiceAssistant state transitions this component requires a voice assistant agent running with livekit-agents ><!-- -->= 0.
|
|
24
|
+
For VoiceAssistant state transitions this component requires a voice assistant agent running with livekit-agents ><!-- -->= 0.9.0
|
|
25
25
|
|
|
26
26
|
## Usage
|
|
27
27
|
|
|
@@ -47,7 +47,7 @@ _(Optional)_
|
|
|
47
47
|
{% /parameter %}
|
|
48
48
|
|
|
49
49
|
{% parameter name="saveUserChoices" type="boolean" optional=true %}
|
|
50
|
-
_(Optional)_ If `true`<!-- -->, the user's device choices will be persisted. This will
|
|
50
|
+
_(Optional)_ If `true`<!-- -->, the user's device choices will be persisted. This will enable the user to have the same device choices when they rejoin the room.
|
|
51
51
|
|
|
52
52
|
{% /parameter %}
|
|
53
53
|
|
|
@@ -27,7 +27,7 @@ If you want to loop over individual tracks instead of participants, you can use
|
|
|
27
27
|
const participants = useParticipants();
|
|
28
28
|
<ParticipantLoop participants={participants}>
|
|
29
29
|
<ParticipantName />
|
|
30
|
-
|
|
30
|
+
</ParticipantLoop>;
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
@@ -19,7 +19,7 @@ import { PreJoin } from "@livekit/components-react";
|
|
|
19
19
|
|
|
20
20
|
## Remarks
|
|
21
21
|
|
|
22
|
-
This component is independent of the `LiveKitRoom` component and should not be nested within it. Because it only
|
|
22
|
+
This component is independent of the `LiveKitRoom` component and should not be nested within it. Because it only accesses the local media tracks this component is self-contained and works without connection to the LiveKit server.
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
@@ -21,11 +21,11 @@ import { TrackLoop } from "@livekit/components-react";
|
|
|
21
21
|
|
|
22
22
|
```tsx
|
|
23
23
|
const trackRefs = useTracks([Track.Source.Camera]);
|
|
24
|
-
<TrackLoop tracks={trackRefs}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
<TrackLoop tracks={trackRefs}>
|
|
25
|
+
<TrackRefContext.Consumer>
|
|
26
|
+
{(trackRef) => trackRef && <VideoTrack trackRef={trackRef} />}
|
|
27
|
+
</TrackRefContext.Consumer>
|
|
28
|
+
</TrackLoop>;
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
@@ -19,7 +19,7 @@ import { VideoConference } from "@livekit/components-react";
|
|
|
19
19
|
|
|
20
20
|
## Remarks
|
|
21
21
|
|
|
22
|
-
The component is implemented with other LiveKit components like `FocusContextProvider`<!-- -->, `GridLayout`<!-- -->, `ControlBar`<!-- -->, `FocusLayoutContainer` and `FocusLayout`<!-- -->. You can use
|
|
22
|
+
The component is implemented with other LiveKit components like `FocusContextProvider`<!-- -->, `GridLayout`<!-- -->, `ControlBar`<!-- -->, `FocusLayoutContainer` and `FocusLayout`<!-- -->. You can use these components as a starting point for your own custom video conferencing application.
|
|
23
23
|
|
|
24
24
|
## Usage
|
|
25
25
|
|
|
@@ -21,9 +21,9 @@ export interface ControlBarProps extends React.HTMLAttributes<HTMLDivElement>
|
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
24
|
-
| Property | Type | Description
|
|
25
|
-
| -------------------------------------------------------------- | ----------------------------------------------------------- |
|
|
26
|
-
| [controls?](./react/controlbarprops.controls.md) | [ControlBarControls](./react/controlbarcontrols.md) | _(Optional)_
|
|
27
|
-
| [onDeviceError?](./react/controlbarprops.ondeviceerror.md) | (error: { source: Track.Source; error: Error; }) => void | _(Optional)_
|
|
28
|
-
| [saveUserChoices?](./react/controlbarprops.saveuserchoices.md) | boolean | _(Optional)_ If <code>true</code>, the user's device choices will be persisted. This will
|
|
29
|
-
| [variation?](./react/controlbarprops.variation.md) | 'minimal' \| 'verbose' \| 'textOnly' | _(Optional)_
|
|
24
|
+
| Property | Type | Description |
|
|
25
|
+
| -------------------------------------------------------------- | ----------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
26
|
+
| [controls?](./react/controlbarprops.controls.md) | [ControlBarControls](./react/controlbarcontrols.md) | _(Optional)_ |
|
|
27
|
+
| [onDeviceError?](./react/controlbarprops.ondeviceerror.md) | (error: { source: Track.Source; error: Error; }) => void | _(Optional)_ |
|
|
28
|
+
| [saveUserChoices?](./react/controlbarprops.saveuserchoices.md) | boolean | _(Optional)_ If <code>true</code>, the user's device choices will be persisted. This will enable the user to have the same device choices when they rejoin the room. |
|
|
29
|
+
| [variation?](./react/controlbarprops.variation.md) | 'minimal' \| 'verbose' \| 'textOnly' | _(Optional)_ |
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
# ControlBarProps.saveUserChoices property
|
|
8
8
|
|
|
9
|
-
If `true`<!-- -->, the user's device choices will be persisted. This will
|
|
9
|
+
If `true`<!-- -->, the user's device choices will be persisted. This will enable the user to have the same device choices when they rejoin the room.
|
|
10
10
|
|
|
11
11
|
**Signature:**
|
|
12
12
|
|
|
@@ -17,10 +17,6 @@ The `useChat` hook provides chat functionality for a LiveKit room. It returns a
|
|
|
17
17
|
import { useChat } from "@livekit/components-react";
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
## Remarks
|
|
21
|
-
|
|
22
|
-
It is possible to pass configurations for custom message encoding and decoding and non-default topics on which to send the messages.
|
|
23
|
-
|
|
24
20
|
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
25
21
|
|
|
26
22
|
## Properties
|
|
@@ -32,8 +28,13 @@ It is possible to pass configurations for custom message encoding and decoding a
|
|
|
32
28
|
|
|
33
29
|
```typescript
|
|
34
30
|
{
|
|
35
|
-
send: (message: string) => Promise<import("
|
|
36
|
-
update: (message: string,
|
|
31
|
+
send: (message: string) => Promise<import("livekit-client").ChatMessage>;
|
|
32
|
+
update: (message: string, originalMessageOrId: string | import("livekit-client").ChatMessage) => Promise<{
|
|
33
|
+
readonly message: string;
|
|
34
|
+
readonly editTimestamp: number;
|
|
35
|
+
readonly id: string;
|
|
36
|
+
readonly timestamp: number;
|
|
37
|
+
}>;
|
|
37
38
|
chatMessages: ReceivedChatMessage[];
|
|
38
39
|
isSending: boolean;
|
|
39
40
|
}
|
|
@@ -146,7 +146,6 @@
|
|
|
146
146
|
| [BarVisualizerProps](./react/barvisualizerprops.md) | **_(BETA)_** |
|
|
147
147
|
| [CarouselLayoutProps](./react/carousellayoutprops.md) | |
|
|
148
148
|
| [ChatEntryProps](./react/chatentryprops.md) | ChatEntry composes the HTML div element under the hood, so you can pass all its props. These are the props specific to the ChatEntry component: |
|
|
149
|
-
| [ChatMessage](./react/chatmessage.md) | |
|
|
150
149
|
| [ChatProps](./react/chatprops.md) | |
|
|
151
150
|
| [ChatToggleProps](./react/chattoggleprops.md) | |
|
|
152
151
|
| [ClearPinButtonProps](./react/clearpinbuttonprops.md) | |
|
|
@@ -9,12 +9,18 @@
|
|
|
9
9
|
|
|
10
10
|
# MessageDecoder type
|
|
11
11
|
|
|
12
|
+
{% callout type="caution" variation="normal" %}
|
|
13
|
+
|
|
14
|
+
This API is deprecated:
|
|
15
|
+
|
|
16
|
+
the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead
|
|
17
|
+
|
|
18
|
+
{% /callout %}
|
|
19
|
+
|
|
12
20
|
**Signature:**
|
|
13
21
|
|
|
14
22
|
```typescript
|
|
15
|
-
export type MessageDecoder = (message: Uint8Array) =>
|
|
23
|
+
export type MessageDecoder = (message: Uint8Array) => LegacyReceivedChatMessage;
|
|
16
24
|
```
|
|
17
25
|
|
|
18
|
-
**References:** [ReceivedChatMessage](./react/receivedchatmessage.md)
|
|
19
|
-
|
|
20
26
|
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -9,12 +9,18 @@
|
|
|
9
9
|
|
|
10
10
|
# MessageEncoder type
|
|
11
11
|
|
|
12
|
+
{% callout type="caution" variation="normal" %}
|
|
13
|
+
|
|
14
|
+
This API is deprecated:
|
|
15
|
+
|
|
16
|
+
the new chat API doesn't rely on encoders and decoders anymore and uses a dedicated chat API instead
|
|
17
|
+
|
|
18
|
+
{% /callout %}
|
|
19
|
+
|
|
12
20
|
**Signature:**
|
|
13
21
|
|
|
14
22
|
```typescript
|
|
15
|
-
export type MessageEncoder = (message:
|
|
23
|
+
export type MessageEncoder = (message: LegacyChatMessage) => Uint8Array;
|
|
16
24
|
```
|
|
17
25
|
|
|
18
|
-
**References:** [ChatMessage](./react/chatmessage.md)
|
|
19
|
-
|
|
20
26
|
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -15,13 +15,12 @@
|
|
|
15
15
|
export interface ReceivedChatMessage extends ChatMessage
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
**Extends:**
|
|
18
|
+
**Extends:** ChatMessage
|
|
19
19
|
|
|
20
20
|
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
21
21
|
|
|
22
22
|
## Properties
|
|
23
23
|
|
|
24
|
-
| Property
|
|
25
|
-
|
|
|
26
|
-
| [
|
|
27
|
-
| [from?](./react/receivedchatmessage.from.md) | Participant | _(Optional)_ |
|
|
24
|
+
| Property | Type | Description |
|
|
25
|
+
| -------------------------------------------- | ----------- | ------------ |
|
|
26
|
+
| [from?](./react/receivedchatmessage.from.md) | Participant | _(Optional)_ |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@livekit/components-js-docs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"description": "Automatically generated documentation pages for LiveKit Components JS. Intended to be consumed by the documentation page.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"directory": "/docs/beta-docs"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@livekit/components-react": "2.6.
|
|
11
|
+
"@livekit/components-react": "2.6.1"
|
|
12
12
|
},
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "Apache-2.0",
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
{
|
|
3
|
-
"title": "ChatMessage interface",
|
|
4
|
-
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/components/chat.ts"
|
|
5
|
-
}
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
-
|
|
10
|
-
# ChatMessage interface
|
|
11
|
-
|
|
12
|
-
**Signature:**
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
export interface ChatMessage
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
19
|
-
|
|
20
|
-
## Properties
|
|
21
|
-
|
|
22
|
-
| Property | Type | Description |
|
|
23
|
-
| -------------------------------------------- | ------ | ----------- |
|
|
24
|
-
| [id](./core/chatmessage.id.md) | string | |
|
|
25
|
-
| [message](./core/chatmessage.message.md) | string | |
|
|
26
|
-
| [timestamp](./core/chatmessage.timestamp.md) | number | |
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
{ "title": "ReceivedChatMessage.editTimestamp property" }
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
-
|
|
7
|
-
# ReceivedChatMessage.editTimestamp property
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
editTimestamp?: number;
|
|
13
|
-
```
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
{
|
|
3
|
-
"title": "ChatMessage interface",
|
|
4
|
-
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/../core/src/components/chat.ts"
|
|
5
|
-
}
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
-
|
|
10
|
-
# ChatMessage interface
|
|
11
|
-
|
|
12
|
-
**Signature:**
|
|
13
|
-
|
|
14
|
-
```typescript
|
|
15
|
-
export interface ChatMessage
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
19
|
-
|
|
20
|
-
## Properties
|
|
21
|
-
|
|
22
|
-
| Property | Type | Description |
|
|
23
|
-
| --------------------------------------------- | ------ | ----------- |
|
|
24
|
-
| [id](./react/chatmessage.id.md) | string | |
|
|
25
|
-
| [message](./react/chatmessage.message.md) | string | |
|
|
26
|
-
| [timestamp](./react/chatmessage.timestamp.md) | number | |
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
{ "title": "ReceivedChatMessage.editTimestamp property" }
|
|
3
|
-
---
|
|
4
|
-
|
|
5
|
-
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
-
|
|
7
|
-
# ReceivedChatMessage.editTimestamp property
|
|
8
|
-
|
|
9
|
-
**Signature:**
|
|
10
|
-
|
|
11
|
-
```typescript
|
|
12
|
-
editTimestamp?: number;
|
|
13
|
-
```
|