@vgroup/dialbox 0.4.93 → 0.4.95
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.
- package/esm2020/lib/components/call-progress/call-progress.component.mjs +8 -7
- package/fesm2015/vgroup-dialbox.mjs +7 -6
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +7 -6
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/lib/components/call-progress/call-progress.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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(
|
|
1784
|
+
this.incomingAudio = new Audio();
|
|
1785
1785
|
this.micOn = false;
|
|
1786
1786
|
this.isMinimised = false;
|
|
1787
1787
|
console.log('Call Progress Component');
|
|
@@ -1791,7 +1791,8 @@ class CallProgressComponent {
|
|
|
1791
1791
|
console.log('Call Progress Component ngOnInit');
|
|
1792
1792
|
// Subscribe to incoming calls from TwilioService
|
|
1793
1793
|
try {
|
|
1794
|
-
this.incomingAudio
|
|
1794
|
+
this.incomingAudio = new Audio('assets/phone-ringing.mp3');
|
|
1795
|
+
this.incomingAudio['loop'] = true;
|
|
1795
1796
|
this.twilioService.currentCall.subscribe((incoming) => {
|
|
1796
1797
|
if (!incoming) {
|
|
1797
1798
|
return;
|
|
@@ -1997,13 +1998,13 @@ class CallProgressComponent {
|
|
|
1997
1998
|
}
|
|
1998
1999
|
this.cdr.detectChanges();
|
|
1999
2000
|
let incomingData = this.currentCallList.find((res) => res.isIncomingCall && !res.isAcceptCall);
|
|
2000
|
-
if (incomingData?.id) {
|
|
2001
|
-
this.isRinging = true;
|
|
2001
|
+
if (incomingData?.id && !this.isRinging) {
|
|
2002
2002
|
this.incomingAudio.play();
|
|
2003
|
+
this.isRinging = true;
|
|
2003
2004
|
}
|
|
2004
|
-
else if (!incomingData?.id) {
|
|
2005
|
-
this.isRinging = false;
|
|
2005
|
+
else if (!incomingData?.id && this.isRinging) {
|
|
2006
2006
|
this.incomingAudio.pause();
|
|
2007
|
+
this.isRinging = false;
|
|
2007
2008
|
}
|
|
2008
2009
|
console.log('currentCallList', this.currentCallList);
|
|
2009
2010
|
}
|