@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.
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DeviceSelectorComponent
3
- } from "../chunk-CKIZ6YUP.mjs";
3
+ } from "../chunk-5UBYT2TF.mjs";
4
4
  import "../chunk-32YFHJN5.mjs";
5
5
  export {
6
6
  DeviceSelectorComponent
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 == input) {
62273
+ if (this.inputChannel === input) {
62262
62274
  return;
62263
62275
  }
62264
- if (input == "audio" /* Audio */) {
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
  /**