@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
package/dist/index.js
CHANGED
|
@@ -62257,16 +62257,31 @@ var VoiceAgent = class extends Agent {
|
|
|
62257
62257
|
* @param input
|
|
62258
62258
|
* @returns
|
|
62259
62259
|
*/
|
|
62260
|
+
// public setInputChannel = async (input: Channel) => {
|
|
62261
|
+
// if (this.inputChannel == input) {
|
|
62262
|
+
// return;
|
|
62263
|
+
// }
|
|
62264
|
+
// if (input == Channel.Audio) {
|
|
62265
|
+
// await this.connectAudio();
|
|
62266
|
+
// } else {
|
|
62267
|
+
// await this.disconnectAudio();
|
|
62268
|
+
// }
|
|
62269
|
+
// this.inputChannel = input;
|
|
62270
|
+
// this.emit(AgentEvent.InputChannelChangeEvent, this.inputChannel);
|
|
62271
|
+
// };
|
|
62260
62272
|
setInputChannel = async (input) => {
|
|
62261
|
-
if (this.inputChannel
|
|
62273
|
+
if (this.inputChannel === input) {
|
|
62262
62274
|
return;
|
|
62263
62275
|
}
|
|
62264
|
-
|
|
62265
|
-
await this.connectAudio();
|
|
62266
|
-
} else {
|
|
62267
|
-
await this.disconnectAudio();
|
|
62268
|
-
}
|
|
62276
|
+
await this.disconnectAudio();
|
|
62269
62277
|
this.inputChannel = input;
|
|
62278
|
+
if (input === "audio" /* Audio */) {
|
|
62279
|
+
if (this.isConnected) {
|
|
62280
|
+
await this.connectAudio();
|
|
62281
|
+
} else {
|
|
62282
|
+
console.log("Audio initialization deferred until connect()");
|
|
62283
|
+
}
|
|
62284
|
+
}
|
|
62270
62285
|
this.emit("onInputChannelChangeEvent" /* InputChannelChangeEvent */, this.inputChannel);
|
|
62271
62286
|
};
|
|
62272
62287
|
/**
|