@pipecat-ai/client-react 0.4.1 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -13,53 +13,52 @@ npm install @pipecat-ai/client-js @pipecat-ai/client-react
13
13
 
14
14
  ## Quick Start
15
15
 
16
- Instantiate an `RTVIClient` instance and pass it down to the `RTVIClientProvider`. Render the `<RTVIClientAudio>` component to have audio output setup automatically.
16
+ Instantiate a `PipecatClient` instance and pass it down to the `PipecatClientProvider`. Render the `<PipecatClientAudio>` component to have audio output setup automatically.
17
17
 
18
18
  ```tsx
19
- import { RTVIClient } from "@pipecat-ai/client-js";
20
- import { RTVIClientAudio, RTVIClientProvider } from "@pipecat-ai/client-react";
19
+ import { PipecatClient } from "@pipecat-ai/client-js";
20
+ import { PipecatClientAudio, PipecatClientProvider } from "@pipecat-ai/client-react";
21
21
 
22
- const client = new RTVIClient({
23
- baseUrl: "https://rtvi.pipecat.bot",
24
- enableMic: true,
22
+ const client = new PipecatClient({
23
+ transport: myTransportType.create(),
25
24
  });
26
25
 
27
26
  render(
28
- <RTVIClientProvider client={client}>
27
+ <PipecatClientProvider client={client}>
29
28
  <MyApp />
30
- <RTVIClientAudio />
31
- </RTVIClientProvider>
29
+ <PipecatClientAudio />
30
+ </PipecatClientProvider>
32
31
  );
33
32
  ```
34
33
 
35
34
  We recommend starting the voiceClient from a click of a button, so here's a minimal implementation of `<MyApp>` to get started:
36
35
 
37
36
  ```tsx
38
- import { useRTVIClient } from "@pipecat-ai/client-react";
37
+ import { usePipecatClient } from "@pipecat-ai/client-react";
39
38
 
40
39
  const MyApp = () => {
41
- const client = useRTVIClient();
40
+ const client = usePipecatClient();
42
41
  return <button onClick={() => client.start()}>OK Computer</button>;
43
42
  };
44
43
  ```
45
44
 
46
45
  ## Components
47
46
 
48
- ### RTVIClientProvider
47
+ ### PipecatClientProvider
49
48
 
50
- The root component for providing RTVI client context to your application.
49
+ The root component for providing Pipecat client context to your application.
51
50
 
52
51
  #### Props
53
52
 
54
- - `client` (RTVIClient, required): A singleton instance of RTVIClient.
53
+ - `client` (PipecatClient, required): A singleton instance of PipecatClient.
55
54
 
56
55
  ```jsx
57
- <RTVIClientProvider client={rtviClient}>
56
+ <PipecatClientProvider client={pcClient}>
58
57
  {/* Child components */}
59
- </RTVIClientProvider>
58
+ </PipecatClientProvider>
60
59
  ```
61
60
 
62
- ### RTVIClientAudio
61
+ ### PipecatClientAudio
63
62
 
64
63
  Creates a new `<audio>` element that mounts the bot's audio track.
65
64
 
@@ -68,10 +67,10 @@ Creates a new `<audio>` element that mounts the bot's audio track.
68
67
  No props
69
68
 
70
69
  ```jsx
71
- <RTVIClientAudio />
70
+ <PipecatClientAudio />
72
71
  ```
73
72
 
74
- ### RTVIClientVideo
73
+ ### PipecatClientVideo
75
74
 
76
75
  Creates a new `<video>` element that renders either the bot or local participant's video track.
77
76
 
@@ -83,7 +82,7 @@ Creates a new `<video>` element that renders either the bot or local participant
83
82
  - `onResize(dimensions: object)` (function, optional): Triggered whenever the video's rendered width or height changes. Returns the video's native `width`, `height` and `aspectRatio`.
84
83
 
85
84
  ```jsx
86
- <RTVIClientVideo
85
+ <PipecatClientVideo
87
86
  participant="local"
88
87
  fit="cover"
89
88
  mirror
@@ -93,7 +92,7 @@ Creates a new `<video>` element that renders either the bot or local participant
93
92
  />
94
93
  ```
95
94
 
96
- ### RTVIClientCamToggle
95
+ ### PipecatClientCamToggle
97
96
 
98
97
  This is a stateful headless component and exposes the user's camEnabled state and an `onClick` handler to toggle the state.
99
98
 
@@ -103,16 +102,16 @@ This is a stateful headless component and exposes the user's camEnabled state an
103
102
  - `disabled` (boolean, optional): Disables the cam toggle
104
103
 
105
104
  ```jsx
106
- <RTVIClientCamToggle>
105
+ <PipecatClientCamToggle>
107
106
  {({ disabled, isCamEnabled, onClick }) => (
108
107
  <button disabled={disabled} onClick={onClick}>
109
108
  {isCamEnabled ? "Turn off" : "Turn on"} camera
110
109
  </button>
111
110
  )}
112
- </RTVIClientCamToggle>
111
+ </PipecatClientCamToggle>
113
112
  ```
114
113
 
115
- ### RTVIClientMicToggle
114
+ ### PipecatClientMicToggle
116
115
 
117
116
  This is a stateful headless component and exposes the user's micEnabled state and an `onClick` handler to toggle the state.
118
117
 
@@ -122,13 +121,13 @@ This is a stateful headless component and exposes the user's micEnabled state an
122
121
  - `disabled` (boolean, optional): Disables the mic toggle
123
122
 
124
123
  ```jsx
125
- <RTVIClientMicToggle>
124
+ <PipecatClientMicToggle>
126
125
  {({ disabled, isMicEnabled, onClick }) => (
127
126
  <button disabled={disabled} onClick={onClick}>
128
127
  {isMicEnabled ? "Mute" : "Unmute"} microphone
129
128
  </button>
130
129
  )}
131
- </RTVIClientMicToggle>
130
+ </PipecatClientMicToggle>
132
131
  ```
133
132
 
134
133
  ### VoiceVisualizer
@@ -161,21 +160,21 @@ The visualization consists of vertical bars.
161
160
 
162
161
  ## Hooks
163
162
 
164
- ### useRTVIClient
163
+ ### usePipecatClient
165
164
 
166
- Provides access to the `RTVIClient` instance originally passed to [`RTVIClientProvider`](#rtviclientprovider).
165
+ Provides access to the `PipecatClient` instance originally passed to [`PipecatClientProvider`](#rtviclientprovider).
167
166
 
168
167
  ```jsx
169
- import { useRTVIClient } from "@pipecat-ai/client-react";
168
+ import { usePipecatClient } from "@pipecat-ai/client-react";
170
169
 
171
170
  function MyComponent() {
172
- const rtviClient = useRTVIClient();
171
+ const pcClient = usePipecatClient();
173
172
  }
174
173
  ```
175
174
 
176
175
  ### useRTVIClientEvent
177
176
 
178
- Allows subscribing to RTVI client events.
177
+ Allows subscribing to RTVI events.
179
178
  It is advised to wrap handlers with `useCallback`.
180
179
 
181
180
  #### Arguments
@@ -198,36 +197,36 @@ function EventListener() {
198
197
  }
199
198
  ```
200
199
 
201
- ### useRTVIClientCamControl
200
+ ### usePipecatClientCamControl
202
201
 
203
202
  Allows to control the user's camera state.
204
203
 
205
204
  ```jsx
206
- import { useRTVIClientCamControl } from "@pipecat-ai/client-react";
205
+ import { usePipecatClientCamControl } from "@pipecat-ai/client-react";
207
206
 
208
207
  function CustomCamToggle() {
209
- const { enableCam, isCamEnabled } = useRTVIClientCamControl();
208
+ const { enableCam, isCamEnabled } = usePipecatClientCamControl();
210
209
  }
211
210
  ```
212
211
 
213
- ### useRTVIClientMicControl
212
+ ### usePipecatClientMicControl
214
213
 
215
214
  Allows to control the user's microphone state.
216
215
 
217
216
  ```jsx
218
- import { useRTVIClientMicControl } from "@pipecat-ai/client-react";
217
+ import { usePipecatClientMicControl } from "@pipecat-ai/client-react";
219
218
 
220
219
  function CustomMicToggle() {
221
- const { enableMic, isMicEnabled } = useRTVIClientMicControl();
220
+ const { enableMic, isMicEnabled } = usePipecatClientMicControl();
222
221
  }
223
222
  ```
224
223
 
225
- ### useRTVIClientMediaDevices
224
+ ### usePipecatClientMediaDevices
226
225
 
227
226
  Manage and list available media devices.
228
227
 
229
228
  ```jsx
230
- import { useRTVIClientMediaDevices } from "@pipecat-ai/client-react";
229
+ import { usePipecatClientMediaDevices } from "@pipecat-ai/client-react";
231
230
 
232
231
  function DeviceSelector() {
233
232
  const {
@@ -237,7 +236,7 @@ function DeviceSelector() {
237
236
  selectedMic,
238
237
  updateCam,
239
238
  updateMic,
240
- } = useRTVIClientMediaDevices();
239
+ } = usePipecatClientMediaDevices();
241
240
 
242
241
  return (
243
242
  <>
@@ -268,7 +267,7 @@ function DeviceSelector() {
268
267
  }
269
268
  ```
270
269
 
271
- ### useRTVIClientMediaTrack
270
+ ### usePipecatClientMediaTrack
272
271
 
273
272
  Access audio and video tracks.
274
273
 
@@ -278,22 +277,22 @@ Access audio and video tracks.
278
277
  - `participantType` ("bot" | "local", required)
279
278
 
280
279
  ```jsx
281
- import { useRTVIClientMediaTrack } from "@pipecat-ai/client-react";
280
+ import { usePipecatClientMediaTrack } from "@pipecat-ai/client-react";
282
281
 
283
282
  function MyTracks() {
284
- const localAudioTrack = useRTVIClientMediaTrack("audio", "local");
285
- const botAudioTrack = useRTVIClientMediaTrack("audio", "bot");
283
+ const localAudioTrack = usePipecatClientMediaTrack("audio", "local");
284
+ const botAudioTrack = usePipecatClientMediaTrack("audio", "bot");
286
285
  }
287
286
  ```
288
287
 
289
- ### useRTVIClientTransportState
288
+ ### usePipecatClientTransportState
290
289
 
291
290
  Returns the current transport state.
292
291
 
293
292
  ```jsx
294
- import { useRTVIClientTransportState } from "@pipecat-ai/client-react";
293
+ import { usePipecatClientTransportState } from "@pipecat-ai/client-react";
295
294
 
296
295
  function ConnectionStatus() {
297
- const transportState = useRTVIClientTransportState();
296
+ const transportState = usePipecatClientTransportState();
298
297
  }
299
298
  ```
package/dist/index.d.ts CHANGED
@@ -1,30 +1,30 @@
1
- import { RTVIClient, RTVIEvent, RTVIEventHandler, Tracks, TransportState } from "@pipecat-ai/client-js";
1
+ import { PipecatClient, RTVIEvent, RTVIEventHandler, Tracks, TransportState } from "@pipecat-ai/client-js";
2
2
  import { Provider } from "jotai/react";
3
3
  import React from "react";
4
4
  import { JSX } from "react/jsx-runtime";
5
5
  interface Props {
6
- client: RTVIClient;
6
+ client: PipecatClient;
7
7
  jotaiStore?: React.ComponentProps<typeof Provider>["store"];
8
8
  }
9
- export const RTVIClientProvider: React.FC<React.PropsWithChildren<Props>>;
10
- export const useRTVIClient: () => RTVIClient | undefined;
9
+ export const PipecatClientProvider: React.FC<React.PropsWithChildren<Props>>;
10
+ export const usePipecatClient: () => PipecatClient | undefined;
11
11
  export const useRTVIClientEvent: <E extends RTVIEvent>(event: E, handler: RTVIEventHandler<E>) => void;
12
12
  type ParticipantType = keyof Tracks;
13
13
  type TrackType = keyof Tracks["local"];
14
- export const useRTVIClientMediaTrack: (trackType: TrackType, participantType: ParticipantType) => MediaStreamTrack | null;
15
- export const RTVIClientAudio: {
14
+ export const usePipecatClientMediaTrack: (trackType: TrackType, participantType: ParticipantType) => MediaStreamTrack | null;
15
+ export const PipecatClientAudio: {
16
16
  (): JSX.Element;
17
17
  displayName: string;
18
18
  };
19
- export const useRTVIClientTransportState: () => TransportState;
19
+ export const usePipecatClientTransportState: () => TransportState;
20
20
  /**
21
21
  * Hook to control camera state
22
22
  */
23
- export const useRTVIClientCamControl: () => {
23
+ export const usePipecatClientCamControl: () => {
24
24
  enableCam: (enabled: boolean) => void;
25
25
  isCamEnabled: boolean;
26
26
  };
27
- interface RTVIClientCamToggleProps {
27
+ interface PipecatClientCamToggleProps {
28
28
  /**
29
29
  * Callback fired when camera state changes
30
30
  */
@@ -47,15 +47,15 @@ interface RTVIClientCamToggleProps {
47
47
  /**
48
48
  * Headless component for controlling camera state
49
49
  */
50
- export const RTVIClientCamToggle: React.FC<RTVIClientCamToggleProps>;
50
+ export const PipecatClientCamToggle: React.FC<PipecatClientCamToggleProps>;
51
51
  /**
52
52
  * Hook to control microphone state
53
53
  */
54
- export const useRTVIClientMicControl: () => {
54
+ export const usePipecatClientMicControl: () => {
55
55
  enableMic: (enabled: boolean) => void;
56
56
  isMicEnabled: boolean;
57
57
  };
58
- interface RTVIClientMicToggleProps {
58
+ interface PipecatClientMicToggleProps {
59
59
  /**
60
60
  * Callback fired when microphone state changes
61
61
  */
@@ -78,8 +78,8 @@ interface RTVIClientMicToggleProps {
78
78
  /**
79
79
  * Headless component for controlling microphone state
80
80
  */
81
- export const RTVIClientMicToggle: React.FC<RTVIClientMicToggleProps>;
82
- interface RTVIClientVideoInterface {
81
+ export const PipecatClientMicToggle: React.FC<PipecatClientMicToggleProps>;
82
+ interface PipecatClientVideoInterface {
83
83
  aspectRatio: number;
84
84
  height: number;
85
85
  width: number;
@@ -102,11 +102,11 @@ interface _Props1 extends Omit<React.VideoHTMLAttributes<HTMLVideoElement>, "onR
102
102
  * Optional callback, which is triggered whenever the video's rendered width or height changes.
103
103
  * Returns the video's native width, height and aspectRatio.
104
104
  */
105
- onResize?(dimensions: RTVIClientVideoInterface): void;
105
+ onResize?(dimensions: PipecatClientVideoInterface): void;
106
106
  }
107
- export const RTVIClientVideo: React.ForwardRefExoticComponent<_Props1 & React.RefAttributes<HTMLVideoElement>>;
107
+ export const PipecatClientVideo: React.ForwardRefExoticComponent<_Props1 & React.RefAttributes<HTMLVideoElement>>;
108
108
  type OptionalMediaDeviceInfo = MediaDeviceInfo | Record<string, never>;
109
- export const useRTVIClientMediaDevices: () => {
109
+ export const usePipecatClientMediaDevices: () => {
110
110
  availableCams: MediaDeviceInfo[];
111
111
  availableMics: MediaDeviceInfo[];
112
112
  availableSpeakers: MediaDeviceInfo[];
@@ -117,7 +117,7 @@ export const useRTVIClientMediaDevices: () => {
117
117
  updateMic: (id: string) => void;
118
118
  updateSpeaker: (id: string) => void;
119
119
  };
120
- type _ParticipantType1 = Parameters<typeof useRTVIClientMediaTrack>[1];
120
+ type _ParticipantType1 = Parameters<typeof usePipecatClientMediaTrack>[1];
121
121
  interface _Props2 {
122
122
  backgroundColor?: string;
123
123
  barColor?: string;
@@ -1 +1 @@
1
- {"mappings":";;;;AAWA;IACE,MAAM,EAAE,UAAU,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,cAAc,CAAC,eAAoB,CAAC,CAAC,OAAO,CAAC,CAAC;CAClE;AAMD,OAAO,MAAM,oBAAoB,MAAM,EAAE,CAAC,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAYvE,CAAC;ACtBF,OAAO,MAAM,2CAGZ,CAAC;ACFF,OAAO,MAAM,qBAAsB,CAAC,SAAS,SAAS,SAC7C,CAAC,WACC,iBAAiB,CAAC,CAAC,SAW7B,CAAC;ACTF,uBAAuB,MAAM,MAAM,CAAC;AACpC,iBAAiB,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;AA4BvC,OAAO,MAAM,qCACA,SAAS,mBACH,eAAe,4BA+DjC,CAAC;ACjGF,OAAO,MAAM;;;CA6BZ,CAAC;AC5BF,OAAO,MAAM,iDAMZ,CAAC;ACdF;;GAEG;AACH,OAAO,MAAM;yBAqBC,OAAO;;CAWpB,CAAC;ACpCF;IACE;;OAEG;IACH,mBAAmB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AO,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,CAAC,UAAU,EAAE,wBAAwB,GAAG,IAAI,CAAC;CACvD;AAED,OAAO,MAAM,iGAwJZ,CAAC;AC1LF,+BAA+B,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AASvE,OAAO,MAAM;;;;;;;oBAqFJ,MAAM;oBAMN,MAAM;wBAMN,MAAM;CAiBd,CAAC;ACzHF,yBAAuB,UAAU,CAAC,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC;AAErE;IACE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,iBAAe,CAAC;CAClC;AAED,OAAO,MAAM,iBAAiB,MAAM,EAAE,CAAC,OAAK,CAoR3C,CAAC","sources":["client-react/src/src/RTVIClientProvider.tsx","client-react/src/src/useRTVIClient.ts","client-react/src/src/useRTVIClientEvent.ts","client-react/src/src/useRTVIClientMediaTrack.ts","client-react/src/src/RTVIClientAudio.tsx","client-react/src/src/useRTVIClientTransportState.ts","client-react/src/src/useRTVIClientCamControl.ts","client-react/src/src/RTVIClientCamToggle.tsx","client-react/src/src/useRTVIClientMicControl.ts","client-react/src/src/RTVIClientMicToggle.tsx","client-react/src/src/useMergedRef.ts","client-react/src/src/RTVIClientVideo.tsx","client-react/src/src/useRTVIClientMediaDevices.ts","client-react/src/src/VoiceVisualizer.tsx","client-react/src/src/index.ts","client-react/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/**\n * Copyright (c) 2024, Daily.\n *\n * SPDX-License-Identifier: BSD-2-Clause\n */\n\nimport { RTVIClientAudio } from \"./RTVIClientAudio\";\nimport { RTVIClientCamToggle } from \"./RTVIClientCamToggle\";\nimport { RTVIClientMicToggle } from \"./RTVIClientMicToggle\";\nimport { RTVIClientProvider } from \"./RTVIClientProvider\";\nimport { RTVIClientVideo } from \"./RTVIClientVideo\";\nimport { useRTVIClient } from \"./useRTVIClient\";\nimport { useRTVIClientCamControl } from \"./useRTVIClientCamControl\";\nimport { useRTVIClientEvent } from \"./useRTVIClientEvent\";\nimport { useRTVIClientMediaDevices } from \"./useRTVIClientMediaDevices\";\nimport { useRTVIClientMediaTrack } from \"./useRTVIClientMediaTrack\";\nimport { useRTVIClientMicControl } from \"./useRTVIClientMicControl\";\nimport { useRTVIClientTransportState } from \"./useRTVIClientTransportState\";\nimport { VoiceVisualizer } from \"./VoiceVisualizer\";\n\nexport {\n RTVIClientAudio,\n RTVIClientCamToggle,\n RTVIClientMicToggle,\n RTVIClientProvider,\n RTVIClientVideo,\n useRTVIClient,\n useRTVIClientCamControl,\n useRTVIClientEvent,\n useRTVIClientMediaDevices,\n useRTVIClientMediaTrack,\n useRTVIClientMicControl,\n useRTVIClientTransportState,\n VoiceVisualizer,\n};\n"],"names":[],"version":3,"file":"index.d.ts.map"}
1
+ {"mappings":";;;;ACsBA;IACE,MAAM,EAAE,aAAa,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,cAAc,CAAC,eAAoB,CAAC,CAAC,OAAO,CAAC,CAAC;CAClE;AAYD,OAAO,MAAM,uBAAuB,MAAM,EAAE,CAC1C,MAAM,iBAAiB,CAAC,KAAK,CAAC,CAoF/B,CAAC;AChHF,OAAO,MAAM,iDAGZ,CAAC;ACFF,OAAO,MAAM,qBAAsB,CAAC,SAAS,SAAS,EACpD,OAAO,CAAC,EACR,SAAS,iBAAiB,CAAC,CAAC,SAU7B,CAAC;ACRF,uBAAuB,MAAM,MAA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;CACf;AAED,iBACE,SAAQ,IAAI,CAAC,MAAM,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,UAAU,CAAC;IACrE,WAAW,EAAE,OAAO,GAAG,KAAK,CAAC;IAE7B;;OAEG;IACH,SAAS,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC;IAEpC;;OAEG;IACH,GAAG,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;OAGG;IACH,QAAQ,CAAC,CAAC,UAAU,EAAE,2BAA2B,GAAG,IAAI,CAAC;CAC1D;AAED,OAAO,MAAM,oGAwJZ,CAAC;AC1LF,+BAA+B,eAAe,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AASvE,OAAO,MAAM;;;;;;;oBAqFJ,MAAM;oBAMN,MAAM;wBAMN,MAAM;CAiBd,CAAC;ACzHF,yBAAuB,UAAU,CAAC,iCAAiC,CAAC,CAAC,CAAC,CAAC,CAAC;AAExE;IACE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,iBAAe,CAAC;CAClC;AAED,OAAO,MAAM,iBAAiB,MAAM,EAAE,CAAC,OAAK,CAoR3C,CAAC","sources":["client-react/src/src/RTVIEventContext.ts","client-react/src/src/PipecatClientProvider.tsx","client-react/src/src/usePipecatClient.ts","client-react/src/src/useRTVIClientEvent.ts","client-react/src/src/usePipecatClientMediaTrack.ts","client-react/src/src/PipecatClientAudio.tsx","client-react/src/src/usePipecatClientTransportState.ts","client-react/src/src/usePipecatClientCamControl.ts","client-react/src/src/PipecatClientCamToggle.tsx","client-react/src/src/usePipecatClientMicControl.ts","client-react/src/src/PipecatClientMicToggle.tsx","client-react/src/src/useMergedRef.ts","client-react/src/src/PipecatClientVideo.tsx","client-react/src/src/usePipecatClientMediaDevices.ts","client-react/src/src/VoiceVisualizer.tsx","client-react/src/src/index.ts","client-react/src/index.ts"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"/**\n * Copyright (c) 2024, Daily.\n *\n * SPDX-License-Identifier: BSD-2-Clause\n */\n\nimport { PipecatClientAudio } from \"./PipecatClientAudio\";\nimport { PipecatClientCamToggle } from \"./PipecatClientCamToggle\";\nimport { PipecatClientMicToggle } from \"./PipecatClientMicToggle\";\nimport { PipecatClientProvider } from \"./PipecatClientProvider\";\nimport { PipecatClientVideo } from \"./PipecatClientVideo\";\nimport { usePipecatClient } from \"./usePipecatClient\";\nimport { usePipecatClientCamControl } from \"./usePipecatClientCamControl\";\nimport { usePipecatClientMediaDevices } from \"./usePipecatClientMediaDevices\";\nimport { usePipecatClientMediaTrack } from \"./usePipecatClientMediaTrack\";\nimport { usePipecatClientMicControl } from \"./usePipecatClientMicControl\";\nimport { usePipecatClientTransportState } from \"./usePipecatClientTransportState\";\nimport { useRTVIClientEvent } from \"./useRTVIClientEvent\";\nimport { VoiceVisualizer } from \"./VoiceVisualizer\";\n\nexport {\n PipecatClientAudio,\n PipecatClientCamToggle,\n PipecatClientMicToggle,\n PipecatClientProvider,\n PipecatClientVideo,\n usePipecatClient,\n usePipecatClientCamControl,\n usePipecatClientMediaDevices,\n usePipecatClientMediaTrack,\n usePipecatClientMicControl,\n usePipecatClientTransportState,\n useRTVIClientEvent,\n VoiceVisualizer,\n};\n"],"names":[],"version":3,"file":"index.d.ts.map"}