@rapidaai/react 1.1.46 → 1.1.47
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/dist/{chunk-CKIZ6YUP.mjs → chunk-5UBYT2TF.mjs} +22 -7
- package/dist/{chunk-CKIZ6YUP.mjs.map → chunk-5UBYT2TF.mjs.map} +1 -1
- package/dist/components/device-selector.js +21 -6
- package/dist/components/device-selector.js.map +1 -1
- package/dist/components/device-selector.mjs +1 -1
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +5 -1
|
@@ -29553,16 +29553,31 @@ var VoiceAgent = class extends Agent {
|
|
|
29553
29553
|
* @param input
|
|
29554
29554
|
* @returns
|
|
29555
29555
|
*/
|
|
29556
|
+
// public setInputChannel = async (input: Channel) => {
|
|
29557
|
+
// if (this.inputChannel == input) {
|
|
29558
|
+
// return;
|
|
29559
|
+
// }
|
|
29560
|
+
// if (input == Channel.Audio) {
|
|
29561
|
+
// await this.connectAudio();
|
|
29562
|
+
// } else {
|
|
29563
|
+
// await this.disconnectAudio();
|
|
29564
|
+
// }
|
|
29565
|
+
// this.inputChannel = input;
|
|
29566
|
+
// this.emit(AgentEvent.InputChannelChangeEvent, this.inputChannel);
|
|
29567
|
+
// };
|
|
29556
29568
|
setInputChannel = async (input) => {
|
|
29557
|
-
if (this.inputChannel
|
|
29569
|
+
if (this.inputChannel === input) {
|
|
29558
29570
|
return;
|
|
29559
29571
|
}
|
|
29560
|
-
|
|
29561
|
-
await this.connectAudio();
|
|
29562
|
-
} else {
|
|
29563
|
-
await this.disconnectAudio();
|
|
29564
|
-
}
|
|
29572
|
+
await this.disconnectAudio();
|
|
29565
29573
|
this.inputChannel = input;
|
|
29574
|
+
if (input === "audio" /* Audio */) {
|
|
29575
|
+
if (this.isConnected) {
|
|
29576
|
+
await this.connectAudio();
|
|
29577
|
+
} else {
|
|
29578
|
+
console.log("Audio initialization deferred until connect()");
|
|
29579
|
+
}
|
|
29580
|
+
}
|
|
29566
29581
|
this.emit("onInputChannelChangeEvent" /* InputChannelChangeEvent */, this.inputChannel);
|
|
29567
29582
|
};
|
|
29568
29583
|
/**
|
|
@@ -30180,4 +30195,4 @@ export {
|
|
|
30180
30195
|
useSelectInputDeviceAgent,
|
|
30181
30196
|
DeviceSelectorComponent
|
|
30182
30197
|
};
|
|
30183
|
-
//# sourceMappingURL=chunk-
|
|
30198
|
+
//# sourceMappingURL=chunk-5UBYT2TF.mjs.map
|