@vgroup/dialbox 0.4.91 → 0.4.92

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.
@@ -1993,11 +1993,14 @@ class CallProgressComponent {
1993
1993
  }
1994
1994
  }
1995
1995
  this.cdr.detectChanges();
1996
- if (this.currentCallList && this.currentCallList[0].isIncomingCall && this.currentCallList[0].isAcceptCall) {
1997
- let incomingAudio = new Audio('assets/sample-file-4.mp3');
1998
- incomingAudio.loop = false;
1996
+ let incomingAudio = new Audio('assets/sample-file-4.mp3');
1997
+ incomingAudio.loop = false;
1998
+ if (this.currentCallList && this.currentCallList[0].isIncomingCall && !this.currentCallList[0].isAcceptCall) {
1999
1999
  incomingAudio.play();
2000
2000
  }
2001
+ else {
2002
+ incomingAudio.pause();
2003
+ }
2001
2004
  console.log('currentCallList', this.currentCallList);
2002
2005
  }
2003
2006
  else if (!this.newIncomingCallsList?.length) {