@vgroup/dialbox 0.4.63 → 0.4.64

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.
@@ -1782,6 +1782,7 @@ class CallProgressComponent {
1782
1782
  this.searchText = '';
1783
1783
  this.filteredList = [];
1784
1784
  this.showButton = false;
1785
+ this.micOn = false;
1785
1786
  this.isMinimised = false;
1786
1787
  console.log('Call Progress Component');
1787
1788
  this.call = this.twilioService.device;
@@ -2336,6 +2337,7 @@ class CallProgressComponent {
2336
2337
  // conferenceId: this.conferenceId,
2337
2338
  // mute: !this.isMute,
2338
2339
  // })
2340
+ this.toggleMic();
2339
2341
  this.isMute = !this.isMute;
2340
2342
  console.log('isMute', this.call);
2341
2343
  console.log('isMutedevice', this.twilioService.device);
@@ -2345,6 +2347,18 @@ class CallProgressComponent {
2345
2347
  this.currentCall.isMute = this.isMute;
2346
2348
  });
2347
2349
  }
2350
+ toggleMic() {
2351
+ return __awaiter(this, void 0, void 0, function* () {
2352
+ if (!this.audioStream) {
2353
+ // first time: request mic
2354
+ this.audioStream = yield navigator.mediaDevices.getUserMedia({ audio: true });
2355
+ }
2356
+ this.micOn = !this.micOn;
2357
+ this.audioStream.getAudioTracks().forEach(track => {
2358
+ track.enabled = this.micOn; // false = muted, true = sending audio
2359
+ });
2360
+ });
2361
+ }
2348
2362
  toggleKeypad() {
2349
2363
  this.showKeypad = !this.showKeypad;
2350
2364
  this.callInput = '';