@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
|
@@ -28809,16 +28809,31 @@ var VoiceAgent = class extends Agent {
|
|
|
28809
28809
|
* @param input
|
|
28810
28810
|
* @returns
|
|
28811
28811
|
*/
|
|
28812
|
+
// public setInputChannel = async (input: Channel) => {
|
|
28813
|
+
// if (this.inputChannel == input) {
|
|
28814
|
+
// return;
|
|
28815
|
+
// }
|
|
28816
|
+
// if (input == Channel.Audio) {
|
|
28817
|
+
// await this.connectAudio();
|
|
28818
|
+
// } else {
|
|
28819
|
+
// await this.disconnectAudio();
|
|
28820
|
+
// }
|
|
28821
|
+
// this.inputChannel = input;
|
|
28822
|
+
// this.emit(AgentEvent.InputChannelChangeEvent, this.inputChannel);
|
|
28823
|
+
// };
|
|
28812
28824
|
setInputChannel = async (input) => {
|
|
28813
|
-
if (this.inputChannel
|
|
28825
|
+
if (this.inputChannel === input) {
|
|
28814
28826
|
return;
|
|
28815
28827
|
}
|
|
28816
|
-
|
|
28817
|
-
await this.connectAudio();
|
|
28818
|
-
} else {
|
|
28819
|
-
await this.disconnectAudio();
|
|
28820
|
-
}
|
|
28828
|
+
await this.disconnectAudio();
|
|
28821
28829
|
this.inputChannel = input;
|
|
28830
|
+
if (input === "audio" /* Audio */) {
|
|
28831
|
+
if (this.isConnected) {
|
|
28832
|
+
await this.connectAudio();
|
|
28833
|
+
} else {
|
|
28834
|
+
console.log("Audio initialization deferred until connect()");
|
|
28835
|
+
}
|
|
28836
|
+
}
|
|
28822
28837
|
this.emit("onInputChannelChangeEvent" /* InputChannelChangeEvent */, this.inputChannel);
|
|
28823
28838
|
};
|
|
28824
28839
|
/**
|