@livekit/components-js-docs 0.1.32 → 0.1.33
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/encryptionstatusobservable.md +1 -1
- package/generated-docs/core/index.md +1 -0
- package/generated-docs/core/mediatoggletype.md +4 -1
- package/generated-docs/core/participantattributesobserver.md +4 -10
- package/generated-docs/core/participantattributesobserver_1.md +19 -0
- package/generated-docs/core/participantinfoobserver.md +14 -12
- package/generated-docs/core/setupparticipantname.md +14 -12
- package/generated-docs/react/audiovisualizerprops.md +8 -0
- package/generated-docs/react/audiowaveformoptions.barcount.md +13 -0
- package/generated-docs/react/audiowaveformoptions.md +26 -0
- package/generated-docs/react/audiowaveformoptions.updateinterval.md +13 -0
- package/generated-docs/react/audiowaveformoptions.volmultiplier.md +13 -0
- package/generated-docs/react/barvisualizeroptions.md +23 -0
- package/generated-docs/react/barvisualizerprops.barcount.md +19 -0
- package/generated-docs/react/barvisualizerprops.md +31 -0
- package/generated-docs/react/barvisualizerprops.options.md +15 -0
- package/generated-docs/react/barvisualizerprops.state.md +19 -0
- package/generated-docs/react/barvisualizerprops.trackref.md +15 -0
- package/generated-docs/react/component/audiovisualizer.md +8 -0
- package/generated-docs/react/component/barvisualizer.md +35 -0
- package/generated-docs/react/component/roomname.md +0 -7
- package/generated-docs/react/component/voiceassistantcontext.md +18 -0
- package/generated-docs/react/component/voiceassistantcontrolbar.md +40 -0
- package/generated-docs/react/hook/useaudiowaveform.md +34 -0
- package/generated-docs/react/hook/useparticipantattributes.md +1 -1
- package/generated-docs/react/hook/useparticipantinfo.md +1 -1
- package/generated-docs/react/hook/usetracktoggle.md +5 -4
- package/generated-docs/react/hook/usetracktranscription.md +1 -1
- package/generated-docs/react/hook/usevoiceassistant.md +30 -0
- package/generated-docs/react/index.md +13 -1
- package/generated-docs/react/meta-data.json +1 -1
- package/generated-docs/react/tracktranscriptionoptions.md +4 -3
- package/generated-docs/react/tracktranscriptionoptions.ontranscription.md +17 -0
- package/generated-docs/react/voiceassistant.agent.md +13 -0
- package/generated-docs/react/voiceassistant.agentattributes.md +13 -0
- package/generated-docs/react/voiceassistant.agenttranscriptions.md +13 -0
- package/generated-docs/react/voiceassistant.audiotrack.md +13 -0
- package/generated-docs/react/voiceassistant.md +28 -0
- package/generated-docs/react/voiceassistant.state.md +13 -0
- package/generated-docs/react/voiceassistantcontrolbarcontrols.md +23 -0
- package/generated-docs/react/voiceassistantcontrolbarprops.controls.md +15 -0
- package/generated-docs/react/voiceassistantcontrolbarprops.md +30 -0
- package/generated-docs/react/voiceassistantcontrolbarprops.ondeviceerror.md +18 -0
- package/generated-docs/react/voiceassistantcontrolbarprops.saveuserchoices.md +17 -0
- package/generated-docs/react/voiceassistantstate.md +24 -0
- package/package.json +2 -2
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
| [observeRoomEvents(room, events)](./core/observeroomevents.md) | |
|
|
71
71
|
| [observeTrackEvents(track, events)](./core/observetrackevents.md) | |
|
|
72
72
|
| [participantAttributesObserver(participant)](./core/participantattributesobserver.md) | |
|
|
73
|
+
| [participantAttributesObserver(participant)](./core/participantattributesobserver_1.md) | |
|
|
73
74
|
| [participantByIdentifierObserver(room, { kind, identity }, options)](./core/participantbyidentifierobserver.md) | |
|
|
74
75
|
| [participantEventSelector(participant, event)](./core/participanteventselector.md) | |
|
|
75
76
|
| [ParticipantFilter](./core/participantfilter.md) | |
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
```typescript
|
|
15
15
|
export type MediaToggleType<T extends ToggleSource> = {
|
|
16
16
|
pendingObserver: Observable<boolean>;
|
|
17
|
-
toggle: (
|
|
17
|
+
toggle: (
|
|
18
|
+
forceState?: boolean,
|
|
19
|
+
captureOptions?: CaptureOptionsBySource<T>
|
|
20
|
+
) => Promise<boolean | undefined>;
|
|
18
21
|
className: string;
|
|
19
22
|
enabledObserver: Observable<boolean>;
|
|
20
23
|
};
|
|
@@ -12,14 +12,8 @@
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
export declare function participantAttributesObserver(participant: Participant): Observable<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
| {
|
|
21
|
-
changed: Readonly<Record<string, string>>;
|
|
22
|
-
attributes: Readonly<Record<string, string>>;
|
|
23
|
-
}
|
|
24
|
-
>;
|
|
15
|
+
export declare function participantAttributesObserver(participant: Participant): Observable<{
|
|
16
|
+
changed: Readonly<Record<string, string>>;
|
|
17
|
+
attributes: Readonly<Record<string, string>>;
|
|
18
|
+
}>;
|
|
25
19
|
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "participantAttributesObserver",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/core/src/observables/participant.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# participantAttributesObserver
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export declare function participantAttributesObserver(participant: undefined): Observable<{
|
|
16
|
+
changed: undefined;
|
|
17
|
+
attributes: undefined;
|
|
18
|
+
}>;
|
|
19
|
+
```
|
|
@@ -12,16 +12,18 @@
|
|
|
12
12
|
**Signature:**
|
|
13
13
|
|
|
14
14
|
```typescript
|
|
15
|
-
export declare function participantInfoObserver(participant
|
|
16
|
-
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
15
|
+
export declare function participantInfoObserver(participant?: Participant):
|
|
16
|
+
| Observable<
|
|
17
|
+
| {
|
|
18
|
+
name: string | undefined;
|
|
19
|
+
identity: string;
|
|
20
|
+
metadata: string | undefined;
|
|
21
|
+
}
|
|
22
|
+
| {
|
|
23
|
+
name: string | undefined;
|
|
24
|
+
identity: string;
|
|
25
|
+
metadata: string | undefined;
|
|
26
|
+
}
|
|
27
|
+
>
|
|
28
|
+
| undefined;
|
|
27
29
|
```
|
|
@@ -14,17 +14,19 @@
|
|
|
14
14
|
```typescript
|
|
15
15
|
export declare function setupParticipantName(participant: Participant): {
|
|
16
16
|
className: string;
|
|
17
|
-
infoObserver:
|
|
18
|
-
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
17
|
+
infoObserver:
|
|
18
|
+
| import("rxjs").Observable<
|
|
19
|
+
| {
|
|
20
|
+
name: string | undefined;
|
|
21
|
+
identity: string;
|
|
22
|
+
metadata: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
| {
|
|
25
|
+
name: string | undefined;
|
|
26
|
+
identity: string;
|
|
27
|
+
metadata: string | undefined;
|
|
28
|
+
}
|
|
29
|
+
>
|
|
30
|
+
| undefined;
|
|
29
31
|
};
|
|
30
32
|
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "AudioWaveformOptions.barCount property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# AudioWaveformOptions.barCount property
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
barCount?: number;
|
|
13
|
+
```
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "AudioWaveformOptions interface",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/hooks/useTrackVolume.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# AudioWaveformOptions interface
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export interface AudioWaveformOptions
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
19
|
+
|
|
20
|
+
## Properties
|
|
21
|
+
|
|
22
|
+
| Property | Type | Description |
|
|
23
|
+
| ----------------------------------------------------------------- | ------ | ------------ |
|
|
24
|
+
| [barCount?](./react/audiowaveformoptions.barcount.md) | number | _(Optional)_ |
|
|
25
|
+
| [updateInterval?](./react/audiowaveformoptions.updateinterval.md) | number | _(Optional)_ |
|
|
26
|
+
| [volMultiplier?](./react/audiowaveformoptions.volmultiplier.md) | number | _(Optional)_ |
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "AudioWaveformOptions.updateInterval property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# AudioWaveformOptions.updateInterval property
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
updateInterval?: number;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "AudioWaveformOptions.volMultiplier property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# AudioWaveformOptions.volMultiplier property
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
volMultiplier?: number;
|
|
13
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "BarVisualizerOptions type",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/components/participant/BarVisualizer.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# BarVisualizerOptions type
|
|
11
|
+
|
|
12
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
13
|
+
|
|
14
|
+
**Signature:**
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
export type BarVisualizerOptions = {
|
|
18
|
+
maxHeight?: number;
|
|
19
|
+
minHeight?: number;
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "BarVisualizerProps.barCount property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# BarVisualizerProps.barCount property
|
|
8
|
+
|
|
9
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
10
|
+
|
|
11
|
+
Number of bars that show up in the visualizer
|
|
12
|
+
|
|
13
|
+
**Signature:**
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
barCount?: number;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "BarVisualizerProps interface",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/components/participant/BarVisualizer.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# BarVisualizerProps interface
|
|
11
|
+
|
|
12
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
13
|
+
|
|
14
|
+
**Signature:**
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
export interface BarVisualizerProps extends React.HTMLProps<HTMLDivElement>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Extends:** React.HTMLProps<HTMLDivElement>
|
|
21
|
+
|
|
22
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
23
|
+
|
|
24
|
+
## Properties
|
|
25
|
+
|
|
26
|
+
| Property | Type | Description |
|
|
27
|
+
| --------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| [barCount?](./react/barvisualizerprops.barcount.md) | number | **_(BETA)_** _(Optional)_ Number of bars that show up in the visualizer |
|
|
29
|
+
| [options?](./react/barvisualizerprops.options.md) | [BarVisualizerOptions](./react/barvisualizeroptions.md) | **_(BETA)_** _(Optional)_ |
|
|
30
|
+
| [state?](./react/barvisualizerprops.state.md) | [VoiceAssistantState](./react/voiceassistantstate.md) | **_(BETA)_** _(Optional)_ If set, the visualizer will transition between different voice assistant states |
|
|
31
|
+
| [trackRef?](./react/barvisualizerprops.trackref.md) | [TrackReferenceOrPlaceholder](./react/trackreferenceorplaceholder.md) | **_(BETA)_** _(Optional)_ |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "BarVisualizerProps.options property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# BarVisualizerProps.options property
|
|
8
|
+
|
|
9
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
options?: BarVisualizerOptions;
|
|
15
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "BarVisualizerProps.state property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# BarVisualizerProps.state property
|
|
8
|
+
|
|
9
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
10
|
+
|
|
11
|
+
If set, the visualizer will transition between different voice assistant states
|
|
12
|
+
|
|
13
|
+
**Signature:**
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
state?: VoiceAssistantState;
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "BarVisualizerProps.trackRef property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# BarVisualizerProps.trackRef property
|
|
8
|
+
|
|
9
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
trackRef?: TrackReferenceOrPlaceholder;
|
|
15
|
+
```
|
|
@@ -9,6 +9,14 @@
|
|
|
9
9
|
|
|
10
10
|
# AudioVisualizer
|
|
11
11
|
|
|
12
|
+
{% callout type="caution" variation="normal" %}
|
|
13
|
+
|
|
14
|
+
This API is deprecated:
|
|
15
|
+
|
|
16
|
+
Use BarVisualizer instead
|
|
17
|
+
|
|
18
|
+
{% /callout %}
|
|
19
|
+
|
|
12
20
|
The AudioVisualizer component is used to visualize the audio volume of a given audio track.
|
|
13
21
|
|
|
14
22
|
## Import
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "BarVisualizer",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/components/participant/BarVisualizer.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# BarVisualizer
|
|
11
|
+
|
|
12
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
13
|
+
|
|
14
|
+
Visualizes audio signals from a TrackReference as bars. If the `state` prop is set, it automatically transitions between VoiceAssistant states.
|
|
15
|
+
|
|
16
|
+
## Import
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { BarVisualizer } from "@livekit/components-react";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Remarks
|
|
23
|
+
|
|
24
|
+
For VoiceAssistant state transitions this component requires a voice assistant agent running with livekit-agents ><!-- -->= 0.8.11
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
function SimpleVoiceAssistant() {
|
|
30
|
+
const { state, audioTrack } = useVoiceAssistant();
|
|
31
|
+
return <BarVisualizer state={state} trackRef={audioTrack} />;
|
|
32
|
+
}
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
{% partial file="p_usage.md" variables={exampleCount: 1} /%}
|
|
@@ -26,10 +26,3 @@ import { RoomName } 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="childrenPosition" type="'before' | 'after'" optional=true %}
|
|
33
|
-
_(Optional)_
|
|
34
|
-
|
|
35
|
-
{% /parameter %}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "VoiceAssistantContext",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/context/voice-assistant-context.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# VoiceAssistantContext
|
|
11
|
+
|
|
12
|
+
## Import
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { VoiceAssistantContext } from "@livekit/components-react";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "VoiceAssistantControlBar",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/prefabs/VoiceAssistantControlBar.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# VoiceAssistantControlBar
|
|
11
|
+
|
|
12
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { VoiceAssistantControlBar } from "@livekit/components-react";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
21
|
+
|
|
22
|
+
## Properties
|
|
23
|
+
|
|
24
|
+
{% parameter name="controls" type="VoiceAssistantControlBarControls" optional=true %}
|
|
25
|
+
**_(BETA)_** _(Optional)_
|
|
26
|
+
|
|
27
|
+
{% /parameter %}
|
|
28
|
+
|
|
29
|
+
{% parameter name="onDeviceError" type="(error: {
|
|
30
|
+
source: Track.Source;
|
|
31
|
+
error: Error;
|
|
32
|
+
}) => void" optional=true %}
|
|
33
|
+
**_(BETA)_** _(Optional)_
|
|
34
|
+
|
|
35
|
+
{% /parameter %}
|
|
36
|
+
|
|
37
|
+
{% parameter name="saveUserChoices" type="boolean" optional=true %}
|
|
38
|
+
_(Optional)_ If `true`<!-- -->, the user's device choices will be persisted. This will enables the user to have the same device choices when they rejoin the room.
|
|
39
|
+
|
|
40
|
+
{% /parameter %}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "useAudioWaveform",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/hooks/useTrackVolume.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# useAudioWaveform
|
|
11
|
+
|
|
12
|
+
## Import
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import { useAudioWaveform } from "@livekit/components-react";
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
19
|
+
|
|
20
|
+
## Properties
|
|
21
|
+
|
|
22
|
+
{% parameter name="options" type="AudioWaveformOptions" optional=true %}
|
|
23
|
+
{% /parameter %}
|
|
24
|
+
|
|
25
|
+
{% parameter name="trackOrTrackReference" type="LocalAudioTrack | RemoteAudioTrack | TrackReferenceOrPlaceholder" optional=true %}
|
|
26
|
+
{% /parameter %}
|
|
27
|
+
|
|
28
|
+
## Returns
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
{
|
|
32
|
+
bars: number[];
|
|
33
|
+
}
|
|
34
|
+
```
|
|
@@ -30,10 +30,11 @@ return <button {...buttonProps}>{enabled ? "disable" : "enable"}</button>;
|
|
|
30
30
|
|
|
31
31
|
```typescript
|
|
32
32
|
{
|
|
33
|
-
toggle: (
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
toggle: ((forceState?: boolean | undefined) => Promise<void>) |
|
|
34
|
+
((
|
|
35
|
+
forceState?: boolean | undefined,
|
|
36
|
+
captureOptions?: import("@livekit/components-core").CaptureOptionsBySource<T> | undefined
|
|
37
|
+
) => Promise<boolean | undefined>);
|
|
37
38
|
enabled: boolean;
|
|
38
39
|
pending: boolean;
|
|
39
40
|
track: import("livekit-client").LocalTrackPublication | undefined;
|
|
@@ -19,7 +19,7 @@ import { useTrackTranscription } from "@livekit/components-react";
|
|
|
19
19
|
|
|
20
20
|
## Properties
|
|
21
21
|
|
|
22
|
-
{% parameter name="trackRef" type="TrackReferenceOrPlaceholder" optional=false %}
|
|
22
|
+
{% parameter name="trackRef" type="TrackReferenceOrPlaceholder | undefined" optional=false %}
|
|
23
23
|
{% /parameter %}
|
|
24
24
|
|
|
25
25
|
{% parameter name="options" type="TrackTranscriptionOptions" optional=true %}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "useVoiceAssistant",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/hooks/useVoiceAssistant.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# useVoiceAssistant
|
|
11
|
+
|
|
12
|
+
This hook looks for the first agent-participant in the room. It assumes that the agent participant is based on the LiveKit VoiceAssistant API and returns the most commonly used state vars when interacting with a VoiceAssistant.
|
|
13
|
+
|
|
14
|
+
## Import
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
import { useVoiceAssistant } from "@livekit/components-react";
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Remarks
|
|
21
|
+
|
|
22
|
+
This hook requires a voice assistant agent running with livekit-agents ><!-- -->= 0.8.11
|
|
23
|
+
|
|
24
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
25
|
+
|
|
26
|
+
## Returns
|
|
27
|
+
|
|
28
|
+
```typescript
|
|
29
|
+
VoiceAssistant;
|
|
30
|
+
```
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
| ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
13
13
|
| [AudioTrack(props)](./react/component/audiotrack.md) | The AudioTrack component is responsible for rendering participant audio tracks. This component must have access to the participant's context, or alternatively pass it a <code>Participant</code> as a property. |
|
|
14
14
|
| [AudioVisualizer(props)](./react/component/audiovisualizer.md) | The AudioVisualizer component is used to visualize the audio volume of a given audio track. |
|
|
15
|
+
| [BarVisualizer](./react/component/barvisualizer.md) | **_(BETA)_** Visualizes audio signals from a TrackReference as bars. If the <code>state</code> prop is set, it automatically transitions between VoiceAssistant states. |
|
|
15
16
|
| [CarouselLayout({ tracks, orientation, ...props })](./react/component/carousellayout.md) | The <code>CarouselLayout</code> component displays a list of tracks in a scroll container. It will display as many tiles as possible and overflow the rest. |
|
|
16
17
|
| [ChatEntry(props)](./react/component/chatentry.md) | The <code>ChatEntry</code> component holds and displays one chat message. |
|
|
17
18
|
| [ChatToggle(props)](./react/component/chattoggle.md) | The <code>ChatToggle</code> component is a button that toggles the visibility of the <code>Chat</code> component. |
|
|
@@ -36,7 +37,7 @@
|
|
|
36
37
|
| [ParticipantTile(props)](./react/component/participanttile.md) | The <code>ParticipantTile</code> component is the base utility wrapper for displaying a visual representation of a participant. This component can be used as a child of the <code>TrackLoop</code> component or by passing a track reference as property. |
|
|
37
38
|
| [RoomAudioRenderer({ volume, muted })](./react/component/roomaudiorenderer.md) | The <code>RoomAudioRenderer</code> component is a drop-in solution for adding audio to your LiveKit app. It takes care of handling remote participants’ audio tracks and makes sure that microphones and screen share are audible. |
|
|
38
39
|
| [RoomContext](./react/component/roomcontext.md) | |
|
|
39
|
-
| [RoomName
|
|
40
|
+
| [RoomName](./react/component/roomname.md) | The <code>RoomName</code> component renders the name of the connected LiveKit room inside a span tag. |
|
|
40
41
|
| [StartAudio(props)](./react/component/startaudio.md) | The <code>StartAudio</code> component is only visible when the browser blocks audio playback. This is due to some browser implemented autoplay policies. To start audio playback, the user must perform a user-initiated event such as clicking this button. As soon as audio playback starts, the button hides itself again. |
|
|
41
42
|
| [Toast(props)](./react/component/toast.md) | The <code>Toast</code> component is a rudimentary way to display a message to the user. This message should be short lived and not require user interaction. For example, displaying the current connection state like <code>ConnectionStateToast</code> does. |
|
|
42
43
|
| [TrackLoop({ tracks, ...props })](./react/component/trackloop.md) | The <code>TrackLoop</code> component loops over tracks. It is for example a easy way to loop over all participant camera and screen share tracks. <code>TrackLoop</code> creates a <code>TrackRefContext</code> for each track that you can use to e.g. render the track. |
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
| [TrackRefContext](./react/component/trackrefcontext.md) | This context provides a <code>TrackReferenceOrPlaceholder</code> to all child components. |
|
|
45
46
|
| [TrackToggle(props)](./react/component/tracktoggle.md) | With the <code>TrackToggle</code> component it is possible to mute and unmute your camera and microphone. The component uses an html button element under the hood so you can treat it like a button. |
|
|
46
47
|
| [VideoTrack(props)](./react/component/videotrack.md) | The <code>VideoTrack</code> component is responsible for rendering participant video tracks like <code>camera</code> and <code>screen_share</code>. This component must have access to the participant's context, or alternatively pass it a <code>Participant</code> as a property. |
|
|
48
|
+
| [VoiceAssistantContext](./react/component/voiceassistantcontext.md) | |
|
|
47
49
|
|
|
48
50
|
## Prefabs
|
|
49
51
|
|
|
@@ -55,12 +57,14 @@
|
|
|
55
57
|
| [MediaDeviceMenu({ kind, initialSelection, onActiveDeviceChange, tracks, requestPermissions, ...props })](./react/component/mediadevicemenu.md) | The <code>MediaDeviceMenu</code> component is a button that opens a menu that lists all media devices and allows the user to select them. |
|
|
56
58
|
| [PreJoin({ defaults, onValidate, onSubmit, onError, debug, joinLabel, micLabel, camLabel, userLabel, persistUserChoices, ...htmlProps })](./react/component/prejoin.md) | The <code>PreJoin</code> prefab component is normally presented to the user before he enters a room. This component allows the user to check and select the preferred media device (camera und microphone). On submit the user decisions are returned, which can then be passed on to the <code>LiveKitRoom</code> so that the user enters the room with the correct media devices. |
|
|
57
59
|
| [VideoConference({ chatMessageFormatter, chatMessageDecoder, chatMessageEncoder, SettingsComponent, ...props })](./react/component/videoconference.md) | The <code>VideoConference</code> ready-made component is your drop-in solution for a classic video conferencing application. It provides functionality such as focusing on one participant, grid view with pagination to handle large numbers of participants, basic non-persistent chat, screen sharing, and more. |
|
|
60
|
+
| [VoiceAssistantControlBar({ controls, saveUserChoices, onDeviceError, ...props })](./react/component/voiceassistantcontrolbar.md) | **_(BETA)_** |
|
|
58
61
|
|
|
59
62
|
## Hooks
|
|
60
63
|
|
|
61
64
|
| Hook | Description |
|
|
62
65
|
| -------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
63
66
|
| [useAudioPlayback(room)](./react/hook/useaudioplayback.md) | In many browsers to start audio playback, the user must perform a user-initiated event such as clicking a button. The <code>useAudioPlayback</code> hook returns an object with a boolean <code>canPlayAudio</code> flag that indicates whether audio playback is allowed in the current context, as well as a <code>startAudio</code> function that can be called in a button <code>onClick</code> callback to start audio playback in the current context. |
|
|
67
|
+
| [useAudioWaveform(trackOrTrackReference, options)](./react/hook/useaudiowaveform.md) | |
|
|
64
68
|
| [useChat(options)](./react/hook/usechat.md) | The <code>useChat</code> hook provides chat functionality for a LiveKit room. It returns a simple <code>send</code> function to send chat messages and an array of <code>chatMessages</code> to hold received messages. It also returns a <code>update</code> function that allows you to implement message-edit functionality. |
|
|
65
69
|
| [useChatToggle({ props })](./react/hook/usechattoggle.md) | The <code>useChatToggle</code> hook provides state and functions for toggling the chat window. |
|
|
66
70
|
| [useClearPinButton(props)](./react/hook/useclearpinbutton.md) | The <code>useClearPinButton</code> hook provides props for the [ClearPinButton()](./react/component/clearpinbutton.md) or your custom implementation of it component. It adds the <code>onClick</code> handler to signal the <code>LayoutContext</code> that the tile in focus should be cleared. |
|
|
@@ -125,6 +129,7 @@
|
|
|
125
129
|
| [useTrackTranscription(trackRef, options)](./react/hook/usetracktranscription.md) | |
|
|
126
130
|
| [useTrackVolume(trackOrTrackReference, options)](./react/hook/usetrackvolume.md) | Hook for tracking the volume of an audio track using the Web Audio API. |
|
|
127
131
|
| [useVisualStableUpdate(trackReferences, maxItemsOnPage, options)](./react/hook/usevisualstableupdate.md) | The <code>useVisualStableUpdate</code> hook is used to prevent visually jarring jumps and shifts of elements in an array. The algorithm only starts to update when there are more items than visually fit on a page. If this is the case, it will make sure that speaking participants move to the first page and are always visible. |
|
|
132
|
+
| [useVoiceAssistant()](./react/hook/usevoiceassistant.md) | This hook looks for the first agent-participant in the room. It assumes that the agent participant is based on the LiveKit VoiceAssistant API and returns the most commonly used state vars when interacting with a VoiceAssistant. |
|
|
128
133
|
|
|
129
134
|
## Others
|
|
130
135
|
|
|
@@ -134,6 +139,9 @@
|
|
|
134
139
|
| [AudioConferenceProps](./react/audioconferenceprops.md) | |
|
|
135
140
|
| [AudioTrackProps](./react/audiotrackprops.md) | |
|
|
136
141
|
| [AudioVisualizerProps](./react/audiovisualizerprops.md) | |
|
|
142
|
+
| [AudioWaveformOptions](./react/audiowaveformoptions.md) | |
|
|
143
|
+
| [BarVisualizerOptions](./react/barvisualizeroptions.md) | **_(BETA)_** |
|
|
144
|
+
| [BarVisualizerProps](./react/barvisualizerprops.md) | **_(BETA)_** |
|
|
137
145
|
| [CarouselLayoutProps](./react/carousellayoutprops.md) | |
|
|
138
146
|
| [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: |
|
|
139
147
|
| [ChatMessage](./react/chatmessage.md) | |
|
|
@@ -206,4 +214,8 @@
|
|
|
206
214
|
| [UseVisualStableUpdateOptions](./react/usevisualstableupdateoptions.md) | |
|
|
207
215
|
| [VideoConferenceProps](./react/videoconferenceprops.md) | |
|
|
208
216
|
| [VideoTrackProps](./react/videotrackprops.md) | |
|
|
217
|
+
| [VoiceAssistant](./react/voiceassistant.md) | |
|
|
218
|
+
| [VoiceAssistantControlBarControls](./react/voiceassistantcontrolbarcontrols.md) | **_(BETA)_** |
|
|
219
|
+
| [VoiceAssistantControlBarProps](./react/voiceassistantcontrolbarprops.md) | **_(BETA)_** |
|
|
220
|
+
| [VoiceAssistantState](./react/voiceassistantstate.md) | |
|
|
209
221
|
| [WidgetState](./react/widgetstate.md) | |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"components":[{"filename":"audioconference.md","title":"AudioConference"},{"filename":"audiotrack.md","title":"AudioTrack"},{"filename":"audiovisualizer.md","title":"AudioVisualizer"},{"filename":"carousellayout.md","title":"CarouselLayout"},{"filename":"chat.md","title":"Chat"},{"filename":"chatentry.md","title":"ChatEntry"},{"filename":"chattoggle.md","title":"ChatToggle"},{"filename":"clearpinbutton.md","title":"ClearPinButton"},{"filename":"connectionqualityindicator.md","title":"ConnectionQualityIndicator"},{"filename":"connectionstate.md","title":"ConnectionState"},{"filename":"connectionstatetoast.md","title":"ConnectionStateToast"},{"filename":"controlbar.md","title":"ControlBar"},{"filename":"disconnectbutton.md","title":"DisconnectButton"},{"filename":"focuslayout.md","title":"FocusLayout"},{"filename":"focuslayoutcontainer.md","title":"FocusLayoutContainer"},{"filename":"focustoggle.md","title":"FocusToggle"},{"filename":"gridlayout.md","title":"GridLayout"},{"filename":"layoutcontext.md","title":"LayoutContext"},{"filename":"layoutcontextprovider.md","title":"LayoutContextProvider"},{"filename":"livekitroom.md","title":"LiveKitRoom"},{"filename":"mediadevicemenu.md","title":"MediaDeviceMenu"},{"filename":"mediadeviceselect.md","title":"MediaDeviceSelect"},{"filename":"participantaudiotile.md","title":"ParticipantAudioTile"},{"filename":"participantcontext.md","title":"ParticipantContext"},{"filename":"participantcontextifneeded.md","title":"ParticipantContextIfNeeded"},{"filename":"participantloop.md","title":"ParticipantLoop"},{"filename":"participantname.md","title":"ParticipantName"},{"filename":"participanttile.md","title":"ParticipantTile"},{"filename":"prejoin.md","title":"PreJoin"},{"filename":"roomaudiorenderer.md","title":"RoomAudioRenderer"},{"filename":"roomcontext.md","title":"RoomContext"},{"filename":"roomname.md","title":"RoomName"},{"filename":"startaudio.md","title":"StartAudio"},{"filename":"toast.md","title":"Toast"},{"filename":"trackloop.md","title":"TrackLoop"},{"filename":"trackmutedindicator.md","title":"TrackMutedIndicator"},{"filename":"trackrefcontext.md","title":"TrackRefContext"},{"filename":"tracktoggle.md","title":"TrackToggle"},{"filename":"videoconference.md","title":"VideoConference"},{"filename":"videotrack.md","title":"VideoTrack"}],"hooks":[{"filename":"useaudioplayback.md","title":"useAudioPlayback"},{"filename":"usechat.md","title":"useChat"},{"filename":"usechattoggle.md","title":"useChatToggle"},{"filename":"useclearpinbutton.md","title":"useClearPinButton"},{"filename":"useconnectionqualityindicator.md","title":"useConnectionQualityIndicator"},{"filename":"useconnectionstate.md","title":"useConnectionState"},{"filename":"usecreatelayoutcontext.md","title":"useCreateLayoutContext"},{"filename":"usedatachannel.md","title":"useDataChannel"},{"filename":"usedatachannel_1.md","title":"useDataChannel"},{"filename":"usedisconnectbutton.md","title":"useDisconnectButton"},{"filename":"useensurecreatelayoutcontext.md","title":"useEnsureCreateLayoutContext"},{"filename":"useensurelayoutcontext.md","title":"useEnsureLayoutContext"},{"filename":"useensureparticipant.md","title":"useEnsureParticipant"},{"filename":"useensureroom.md","title":"useEnsureRoom"},{"filename":"useensuretrackref.md","title":"useEnsureTrackRef"},{"filename":"usefacingmode.md","title":"useFacingMode"},{"filename":"usefocustoggle.md","title":"useFocusToggle"},{"filename":"usegridlayout.md","title":"useGridLayout"},{"filename":"useisencrypted.md","title":"useIsEncrypted"},{"filename":"useismuted.md","title":"useIsMuted"},{"filename":"useisrecording.md","title":"useIsRecording"},{"filename":"useisspeaking.md","title":"useIsSpeaking"},{"filename":"uselayoutcontext.md","title":"useLayoutContext"},{"filename":"uselivekitroom.md","title":"useLiveKitRoom"},{"filename":"uselocalparticipant.md","title":"useLocalParticipant"},{"filename":"uselocalparticipantpermissions.md","title":"useLocalParticipantPermissions"},{"filename":"usemaybelayoutcontext.md","title":"useMaybeLayoutContext"},{"filename":"usemaybeparticipantcontext.md","title":"useMaybeParticipantContext"},{"filename":"usemayberoomcontext.md","title":"useMaybeRoomContext"},{"filename":"usemaybetrackrefcontext.md","title":"useMaybeTrackRefContext"},{"filename":"usemediadevices.md","title":"useMediaDevices"},{"filename":"usemediadeviceselect.md","title":"useMediaDeviceSelect"},{"filename":"usemultibandtrackvolume.md","title":"useMultibandTrackVolume"},{"filename":"usepagination.md","title":"usePagination"},{"filename":"useparticipantattribute.md","title":"useParticipantAttribute"},{"filename":"useparticipantattributes.md","title":"useParticipantAttributes"},{"filename":"useparticipantcontext.md","title":"useParticipantContext"},{"filename":"useparticipantinfo.md","title":"useParticipantInfo"},{"filename":"useparticipantpermissions.md","title":"useParticipantPermissions"},{"filename":"useparticipants.md","title":"useParticipants"},{"filename":"useparticipanttile.md","title":"useParticipantTile"},{"filename":"useparticipanttracks.md","title":"useParticipantTracks"},{"filename":"usepersistentuserchoices.md","title":"usePersistentUserChoices"},{"filename":"usepinnedtracks.md","title":"usePinnedTracks"},{"filename":"usepreviewdevice.md","title":"usePreviewDevice"},{"filename":"usepreviewtracks.md","title":"usePreviewTracks"},{"filename":"useremoteparticipant.md","title":"useRemoteParticipant"},{"filename":"useremoteparticipant_1.md","title":"useRemoteParticipant"},{"filename":"useremoteparticipants.md","title":"useRemoteParticipants"},{"filename":"useroomcontext.md","title":"useRoomContext"},{"filename":"useroominfo.md","title":"useRoomInfo"},{"filename":"usesortedparticipants.md","title":"useSortedParticipants"},{"filename":"usespeakingparticipants.md","title":"useSpeakingParticipants"},{"filename":"usestartaudio.md","title":"useStartAudio"},{"filename":"usestartvideo.md","title":"useStartVideo"},{"filename":"useswipe.md","title":"useSwipe"},{"filename":"usetoken.md","title":"useToken"},{"filename":"usetrackbyname.md","title":"useTrackByName"},{"filename":"usetrackmutedindicator.md","title":"useTrackMutedIndicator"},{"filename":"usetrackrefcontext.md","title":"useTrackRefContext"},{"filename":"usetracks.md","title":"useTracks"},{"filename":"usetracktoggle.md","title":"useTrackToggle"},{"filename":"usetracktranscription.md","title":"useTrackTranscription"},{"filename":"usetrackvolume.md","title":"useTrackVolume"},{"filename":"usevisualstableupdate.md","title":"useVisualStableUpdate"}]}
|
|
1
|
+
{"components":[{"filename":"audioconference.md","title":"AudioConference"},{"filename":"audiotrack.md","title":"AudioTrack"},{"filename":"audiovisualizer.md","title":"AudioVisualizer"},{"filename":"barvisualizer.md","title":"BarVisualizer"},{"filename":"carousellayout.md","title":"CarouselLayout"},{"filename":"chat.md","title":"Chat"},{"filename":"chatentry.md","title":"ChatEntry"},{"filename":"chattoggle.md","title":"ChatToggle"},{"filename":"clearpinbutton.md","title":"ClearPinButton"},{"filename":"connectionqualityindicator.md","title":"ConnectionQualityIndicator"},{"filename":"connectionstate.md","title":"ConnectionState"},{"filename":"connectionstatetoast.md","title":"ConnectionStateToast"},{"filename":"controlbar.md","title":"ControlBar"},{"filename":"disconnectbutton.md","title":"DisconnectButton"},{"filename":"focuslayout.md","title":"FocusLayout"},{"filename":"focuslayoutcontainer.md","title":"FocusLayoutContainer"},{"filename":"focustoggle.md","title":"FocusToggle"},{"filename":"gridlayout.md","title":"GridLayout"},{"filename":"layoutcontext.md","title":"LayoutContext"},{"filename":"layoutcontextprovider.md","title":"LayoutContextProvider"},{"filename":"livekitroom.md","title":"LiveKitRoom"},{"filename":"mediadevicemenu.md","title":"MediaDeviceMenu"},{"filename":"mediadeviceselect.md","title":"MediaDeviceSelect"},{"filename":"participantaudiotile.md","title":"ParticipantAudioTile"},{"filename":"participantcontext.md","title":"ParticipantContext"},{"filename":"participantcontextifneeded.md","title":"ParticipantContextIfNeeded"},{"filename":"participantloop.md","title":"ParticipantLoop"},{"filename":"participantname.md","title":"ParticipantName"},{"filename":"participanttile.md","title":"ParticipantTile"},{"filename":"prejoin.md","title":"PreJoin"},{"filename":"roomaudiorenderer.md","title":"RoomAudioRenderer"},{"filename":"roomcontext.md","title":"RoomContext"},{"filename":"roomname.md","title":"RoomName"},{"filename":"startaudio.md","title":"StartAudio"},{"filename":"toast.md","title":"Toast"},{"filename":"trackloop.md","title":"TrackLoop"},{"filename":"trackmutedindicator.md","title":"TrackMutedIndicator"},{"filename":"trackrefcontext.md","title":"TrackRefContext"},{"filename":"tracktoggle.md","title":"TrackToggle"},{"filename":"videoconference.md","title":"VideoConference"},{"filename":"videotrack.md","title":"VideoTrack"},{"filename":"voiceassistantcontext.md","title":"VoiceAssistantContext"},{"filename":"voiceassistantcontrolbar.md","title":"VoiceAssistantControlBar"}],"hooks":[{"filename":"useaudioplayback.md","title":"useAudioPlayback"},{"filename":"useaudiowaveform.md","title":"useAudioWaveform"},{"filename":"usechat.md","title":"useChat"},{"filename":"usechattoggle.md","title":"useChatToggle"},{"filename":"useclearpinbutton.md","title":"useClearPinButton"},{"filename":"useconnectionqualityindicator.md","title":"useConnectionQualityIndicator"},{"filename":"useconnectionstate.md","title":"useConnectionState"},{"filename":"usecreatelayoutcontext.md","title":"useCreateLayoutContext"},{"filename":"usedatachannel.md","title":"useDataChannel"},{"filename":"usedatachannel_1.md","title":"useDataChannel"},{"filename":"usedisconnectbutton.md","title":"useDisconnectButton"},{"filename":"useensurecreatelayoutcontext.md","title":"useEnsureCreateLayoutContext"},{"filename":"useensurelayoutcontext.md","title":"useEnsureLayoutContext"},{"filename":"useensureparticipant.md","title":"useEnsureParticipant"},{"filename":"useensureroom.md","title":"useEnsureRoom"},{"filename":"useensuretrackref.md","title":"useEnsureTrackRef"},{"filename":"usefacingmode.md","title":"useFacingMode"},{"filename":"usefocustoggle.md","title":"useFocusToggle"},{"filename":"usegridlayout.md","title":"useGridLayout"},{"filename":"useisencrypted.md","title":"useIsEncrypted"},{"filename":"useismuted.md","title":"useIsMuted"},{"filename":"useisrecording.md","title":"useIsRecording"},{"filename":"useisspeaking.md","title":"useIsSpeaking"},{"filename":"uselayoutcontext.md","title":"useLayoutContext"},{"filename":"uselivekitroom.md","title":"useLiveKitRoom"},{"filename":"uselocalparticipant.md","title":"useLocalParticipant"},{"filename":"uselocalparticipantpermissions.md","title":"useLocalParticipantPermissions"},{"filename":"usemaybelayoutcontext.md","title":"useMaybeLayoutContext"},{"filename":"usemaybeparticipantcontext.md","title":"useMaybeParticipantContext"},{"filename":"usemayberoomcontext.md","title":"useMaybeRoomContext"},{"filename":"usemaybetrackrefcontext.md","title":"useMaybeTrackRefContext"},{"filename":"usemediadevices.md","title":"useMediaDevices"},{"filename":"usemediadeviceselect.md","title":"useMediaDeviceSelect"},{"filename":"usemultibandtrackvolume.md","title":"useMultibandTrackVolume"},{"filename":"usepagination.md","title":"usePagination"},{"filename":"useparticipantattribute.md","title":"useParticipantAttribute"},{"filename":"useparticipantattributes.md","title":"useParticipantAttributes"},{"filename":"useparticipantcontext.md","title":"useParticipantContext"},{"filename":"useparticipantinfo.md","title":"useParticipantInfo"},{"filename":"useparticipantpermissions.md","title":"useParticipantPermissions"},{"filename":"useparticipants.md","title":"useParticipants"},{"filename":"useparticipanttile.md","title":"useParticipantTile"},{"filename":"useparticipanttracks.md","title":"useParticipantTracks"},{"filename":"usepersistentuserchoices.md","title":"usePersistentUserChoices"},{"filename":"usepinnedtracks.md","title":"usePinnedTracks"},{"filename":"usepreviewdevice.md","title":"usePreviewDevice"},{"filename":"usepreviewtracks.md","title":"usePreviewTracks"},{"filename":"useremoteparticipant.md","title":"useRemoteParticipant"},{"filename":"useremoteparticipant_1.md","title":"useRemoteParticipant"},{"filename":"useremoteparticipants.md","title":"useRemoteParticipants"},{"filename":"useroomcontext.md","title":"useRoomContext"},{"filename":"useroominfo.md","title":"useRoomInfo"},{"filename":"usesortedparticipants.md","title":"useSortedParticipants"},{"filename":"usespeakingparticipants.md","title":"useSpeakingParticipants"},{"filename":"usestartaudio.md","title":"useStartAudio"},{"filename":"usestartvideo.md","title":"useStartVideo"},{"filename":"useswipe.md","title":"useSwipe"},{"filename":"usetoken.md","title":"useToken"},{"filename":"usetrackbyname.md","title":"useTrackByName"},{"filename":"usetrackmutedindicator.md","title":"useTrackMutedIndicator"},{"filename":"usetrackrefcontext.md","title":"useTrackRefContext"},{"filename":"usetracks.md","title":"useTracks"},{"filename":"usetracktoggle.md","title":"useTrackToggle"},{"filename":"usetracktranscription.md","title":"useTrackTranscription"},{"filename":"usetrackvolume.md","title":"useTrackVolume"},{"filename":"usevisualstableupdate.md","title":"useVisualStableUpdate"},{"filename":"usevoiceassistant.md","title":"useVoiceAssistant"}]}
|
|
@@ -19,6 +19,7 @@ export interface TrackTranscriptionOptions
|
|
|
19
19
|
|
|
20
20
|
## Properties
|
|
21
21
|
|
|
22
|
-
| Property
|
|
23
|
-
|
|
|
24
|
-
| [bufferSize?](./react/tracktranscriptionoptions.buffersize.md)
|
|
22
|
+
| Property | Type | Description |
|
|
23
|
+
| ------------------------------------------------------------------------ | -------------------------------------------------- | -------------------------------------------------------------------------------- |
|
|
24
|
+
| [bufferSize?](./react/tracktranscriptionoptions.buffersize.md) | number | _(Optional)_ how many transcription segments should be buffered in state |
|
|
25
|
+
| [onTranscription?](./react/tracktranscriptionoptions.ontranscription.md) | (newSegments: TranscriptionSegment\[\]) => void | _(Optional)_ optional callback for retrieving newly incoming transcriptions only |
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "TrackTranscriptionOptions.onTranscription property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# TrackTranscriptionOptions.onTranscription property
|
|
8
|
+
|
|
9
|
+
optional callback for retrieving newly incoming transcriptions only
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
onTranscription?: (newSegments: TranscriptionSegment[]) => void;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "VoiceAssistant.agent property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# VoiceAssistant.agent property
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
agent: RemoteParticipant | undefined;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "VoiceAssistant.agentAttributes property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# VoiceAssistant.agentAttributes property
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
agentAttributes: RemoteParticipant["attributes"] | undefined;
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "VoiceAssistant.agentTranscriptions property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# VoiceAssistant.agentTranscriptions property
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
agentTranscriptions: ReceivedTranscriptionSegment[];
|
|
13
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "VoiceAssistant.audioTrack property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# VoiceAssistant.audioTrack property
|
|
8
|
+
|
|
9
|
+
**Signature:**
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
audioTrack: TrackReference | undefined;
|
|
13
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "VoiceAssistant interface",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/hooks/useVoiceAssistant.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# VoiceAssistant interface
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export interface VoiceAssistant
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
19
|
+
|
|
20
|
+
## Properties
|
|
21
|
+
|
|
22
|
+
| Property | Type | Description |
|
|
23
|
+
| -------------------------------------------------------------------- | -------------------------------------------------------- | ----------- |
|
|
24
|
+
| [agent](./react/voiceassistant.agent.md) | RemoteParticipant \| undefined | |
|
|
25
|
+
| [agentAttributes](./react/voiceassistant.agentattributes.md) | RemoteParticipant\['attributes'\] \| undefined | |
|
|
26
|
+
| [agentTranscriptions](./react/voiceassistant.agenttranscriptions.md) | ReceivedTranscriptionSegment\[\] | |
|
|
27
|
+
| [audioTrack](./react/voiceassistant.audiotrack.md) | [TrackReference](./react/trackreference.md) \| undefined | |
|
|
28
|
+
| [state](./react/voiceassistant.state.md) | [VoiceAssistantState](./react/voiceassistantstate.md) | |
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "VoiceAssistantControlBarControls type",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/prefabs/VoiceAssistantControlBar.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# VoiceAssistantControlBarControls type
|
|
11
|
+
|
|
12
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
13
|
+
|
|
14
|
+
**Signature:**
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
export type VoiceAssistantControlBarControls = {
|
|
18
|
+
microphone?: boolean;
|
|
19
|
+
leave?: boolean;
|
|
20
|
+
};
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "VoiceAssistantControlBarProps.controls property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# VoiceAssistantControlBarProps.controls property
|
|
8
|
+
|
|
9
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
controls?: VoiceAssistantControlBarControls;
|
|
15
|
+
```
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "VoiceAssistantControlBarProps interface",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/prefabs/VoiceAssistantControlBar.tsx"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# VoiceAssistantControlBarProps interface
|
|
11
|
+
|
|
12
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
13
|
+
|
|
14
|
+
**Signature:**
|
|
15
|
+
|
|
16
|
+
```typescript
|
|
17
|
+
export interface VoiceAssistantControlBarProps extends React.HTMLAttributes<HTMLDivElement>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Extends:** React.HTMLAttributes<HTMLDivElement>
|
|
21
|
+
|
|
22
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
23
|
+
|
|
24
|
+
## Properties
|
|
25
|
+
|
|
26
|
+
| Property | Type | Description |
|
|
27
|
+
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
28
|
+
| [controls?](./react/voiceassistantcontrolbarprops.controls.md) | [VoiceAssistantControlBarControls](./react/voiceassistantcontrolbarcontrols.md) | **_(BETA)_** _(Optional)_ |
|
|
29
|
+
| [onDeviceError?](./react/voiceassistantcontrolbarprops.ondeviceerror.md) | (error: { source: Track.Source; error: Error; }) => void | **_(BETA)_** _(Optional)_ |
|
|
30
|
+
| [saveUserChoices?](./react/voiceassistantcontrolbarprops.saveuserchoices.md) | boolean | _(Optional)_ If <code>true</code>, the user's device choices will be persisted. This will enables the user to have the same device choices when they rejoin the room. |
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "VoiceAssistantControlBarProps.onDeviceError property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# VoiceAssistantControlBarProps.onDeviceError property
|
|
8
|
+
|
|
9
|
+
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
onDeviceError?: (error: {
|
|
15
|
+
source: Track.Source;
|
|
16
|
+
error: Error;
|
|
17
|
+
}) => void;
|
|
18
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
{ "title": "VoiceAssistantControlBarProps.saveUserChoices property" }
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
6
|
+
|
|
7
|
+
# VoiceAssistantControlBarProps.saveUserChoices property
|
|
8
|
+
|
|
9
|
+
If `true`<!-- -->, the user's device choices will be persisted. This will enables the user to have the same device choices when they rejoin the room.
|
|
10
|
+
|
|
11
|
+
**Signature:**
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
saveUserChoices?: boolean;
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
{
|
|
3
|
+
"title": "VoiceAssistantState type",
|
|
4
|
+
"linkToSource": "https://github.com/livekit/components-js/blob/main/packages/react/src/hooks/useVoiceAssistant.ts"
|
|
5
|
+
}
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
|
|
9
|
+
|
|
10
|
+
# VoiceAssistantState type
|
|
11
|
+
|
|
12
|
+
**Signature:**
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
export type VoiceAssistantState =
|
|
16
|
+
| "disconnected"
|
|
17
|
+
| "connecting"
|
|
18
|
+
| "initializing"
|
|
19
|
+
| "listening"
|
|
20
|
+
| "thinking"
|
|
21
|
+
| "speaking";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
{% partial file="p_usage.md" variables={exampleCount: 0} /%}
|
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.33",
|
|
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.
|
|
11
|
+
"@livekit/components-react": "2.5.0"
|
|
12
12
|
},
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "Apache-2.0",
|