@vgroup/dialbox 0.4.97 → 0.4.99

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.
@@ -1783,7 +1783,8 @@ class CallProgressComponent {
1783
1783
  this.filteredList = [];
1784
1784
  this.showButton = false;
1785
1785
  this.isRinging = false;
1786
- this.incomingAudio = new Audio('../../../assets/phone-ringing.mp3');
1786
+ this.audioURL = '../../shared/incoming_call.mp3';
1787
+ this.incomingAudio = new Audio(this.audioURL);
1787
1788
  this.micOn = false;
1788
1789
  this.isMinimised = false;
1789
1790
  console.log('Call Progress Component');
@@ -1948,7 +1949,7 @@ class CallProgressComponent {
1948
1949
  }
1949
1950
  }
1950
1951
  this.cdr.detectChanges();
1951
- let incomingData = this.currentCallList.find((res) => res.isIncomingCall && !res.isAcceptCall);
1952
+ let incomingData = this.currentCallList.find((res) => res.isIncomingCall && !res.isAcceptCall && res.businessOtp);
1952
1953
  if ((incomingData === null || incomingData === void 0 ? void 0 : incomingData.id) && !this.isRinging) {
1953
1954
  this.incomingAudio.play();
1954
1955
  this.isRinging = true;
@@ -1960,6 +1961,10 @@ class CallProgressComponent {
1960
1961
  console.log('currentCallList', this.currentCallList);
1961
1962
  }
1962
1963
  else if (!((_k = this.newIncomingCallsList) === null || _k === void 0 ? void 0 : _k.length)) {
1964
+ if (this.incomingAudio && this.isRinging) {
1965
+ this.incomingAudio.pause();
1966
+ }
1967
+ this.isRinging = false;
1963
1968
  this.isConcurrentIncoming = false;
1964
1969
  this.incomingCallDiv = false;
1965
1970
  this.cdr.detectChanges();