@vgroup/dialbox 0.4.93 → 0.4.94

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.
@@ -1781,7 +1781,7 @@ class CallProgressComponent {
1781
1781
  this.filteredList = [];
1782
1782
  this.showButton = false;
1783
1783
  this.isRinging = false;
1784
- this.incomingAudio = new Audio('assets/silent-sound.mp3');
1784
+ this.incomingAudio = new Audio('assets/phone-ringing.mp3');
1785
1785
  this.micOn = false;
1786
1786
  this.isMinimised = false;
1787
1787
  console.log('Call Progress Component');
@@ -1791,7 +1791,7 @@ class CallProgressComponent {
1791
1791
  console.log('Call Progress Component ngOnInit');
1792
1792
  // Subscribe to incoming calls from TwilioService
1793
1793
  try {
1794
- this.incomingAudio['loop'] = false;
1794
+ this.incomingAudio['loop'] = true;
1795
1795
  this.twilioService.currentCall.subscribe((incoming) => {
1796
1796
  if (!incoming) {
1797
1797
  return;
@@ -1997,11 +1997,11 @@ class CallProgressComponent {
1997
1997
  }
1998
1998
  this.cdr.detectChanges();
1999
1999
  let incomingData = this.currentCallList.find((res) => res.isIncomingCall && !res.isAcceptCall);
2000
- if (incomingData?.id) {
2000
+ if (incomingData?.id && !this.isRinging) {
2001
2001
  this.isRinging = true;
2002
2002
  this.incomingAudio.play();
2003
2003
  }
2004
- else if (!incomingData?.id) {
2004
+ else if (!incomingData?.id && this.isRinging) {
2005
2005
  this.isRinging = false;
2006
2006
  this.incomingAudio.pause();
2007
2007
  }