@vgroup/dialbox 0.3.11 → 0.3.14
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 +13 -13
- package/esm2020/lib/components/call-progress/incoming-call/incoming-call.component.mjs +6 -29
- package/esm2020/lib/dialbox.component.mjs +6 -2
- package/fesm2015/vgroup-dialbox.mjs +26 -42
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +22 -40
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1994,33 +1994,11 @@ class IncomingCallComponent {
|
|
|
1994
1994
|
this.extensionService.getRemoveParticipants(this.incomingCallData.participantId, this.incomingCallData.conferenceId).toPromise();
|
|
1995
1995
|
}
|
|
1996
1996
|
async add() {
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
}).toPromise();
|
|
2003
|
-
console.log('Conference token received:', tokenResponse);
|
|
2004
|
-
// Step 2: Create a new device with conference token
|
|
2005
|
-
const conferenceDevice = new Device(tokenResponse.token.value, {
|
|
2006
|
-
codecPreferences: ['opus', 'pcmu'],
|
|
2007
|
-
closeProtection: true
|
|
2008
|
-
});
|
|
2009
|
-
// Step 3: Connect to the conference
|
|
2010
|
-
const call = await conferenceDevice.connect({
|
|
2011
|
-
params: {
|
|
2012
|
-
conferenceName: this.twilioService.conferenceName
|
|
2013
|
-
}
|
|
2014
|
-
});
|
|
2015
|
-
console.log('Conference call connected:', call);
|
|
2016
|
-
this.twilioCallData = call;
|
|
2017
|
-
// Step 4: Emit to parent component
|
|
2018
|
-
this.closeIncomingCallDiv.emit({ show: 1, call: call });
|
|
2019
|
-
}
|
|
2020
|
-
catch (error) {
|
|
2021
|
-
console.error('Error connecting to conference:', error);
|
|
2022
|
-
swal("Error", "Failed to join the conference. Please try again.", "error");
|
|
2023
|
-
}
|
|
1997
|
+
let device = await this.twilioService.connect('');
|
|
1998
|
+
console.log(device, 'callConnect');
|
|
1999
|
+
// this.device = new Device();/
|
|
2000
|
+
// Device.connect({ conferenceName: 'my-conference-room' });
|
|
2001
|
+
// this.device = new Device({ conferenceName: 'my-conference-room' });
|
|
2024
2002
|
}
|
|
2025
2003
|
}
|
|
2026
2004
|
IncomingCallComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IncomingCallComponent, deps: [{ token: ExtensionService }, { token: TwilioService }, { token: NotificationService }], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -2512,18 +2490,7 @@ class CallProgressComponent {
|
|
|
2512
2490
|
const contactName = [contact?.firstName, contact?.middleName, contact?.lastName]
|
|
2513
2491
|
.filter(Boolean)
|
|
2514
2492
|
.join(' ');
|
|
2515
|
-
this.callData = {
|
|
2516
|
-
// ...this.callData,
|
|
2517
|
-
phone: phoneNumber,
|
|
2518
|
-
displayNum: phoneNumber,
|
|
2519
|
-
name: contactName || phoneNumber,
|
|
2520
|
-
img: contact?.img || 'assets/images/user.jpg',
|
|
2521
|
-
participantId: '',
|
|
2522
|
-
from: this.selectedCallerId?.number,
|
|
2523
|
-
isIncomingCall: false,
|
|
2524
|
-
};
|
|
2525
2493
|
// this.call['callInfo'] = JSON.parse(JSON.stringify(this.callData));
|
|
2526
|
-
this.cdr.detectChanges();
|
|
2527
2494
|
// Get the conference ID from the current call or use the stored one
|
|
2528
2495
|
const conferenceId = this.conferenceId;
|
|
2529
2496
|
if (!conferenceId) {
|
|
@@ -2539,10 +2506,21 @@ class CallProgressComponent {
|
|
|
2539
2506
|
participantNumber: phoneNumber,
|
|
2540
2507
|
conferenceId: conferenceId
|
|
2541
2508
|
});
|
|
2509
|
+
// this.callData = {
|
|
2510
|
+
// ...this.callData,
|
|
2511
|
+
// participantId: ,
|
|
2512
|
+
// }
|
|
2542
2513
|
this.callData = {
|
|
2543
|
-
...this.callData,
|
|
2514
|
+
// ...this.callData,
|
|
2515
|
+
phone: phoneNumber,
|
|
2516
|
+
displayNum: phoneNumber,
|
|
2517
|
+
name: contactName || phoneNumber,
|
|
2518
|
+
img: contact?.img || 'assets/images/user.jpg',
|
|
2544
2519
|
participantId: data?.participantId,
|
|
2520
|
+
from: this.selectedCallerId?.number,
|
|
2521
|
+
isIncomingCall: false,
|
|
2545
2522
|
};
|
|
2523
|
+
this.cdr.detectChanges();
|
|
2546
2524
|
console.log(this.callData, 'this.callData');
|
|
2547
2525
|
console.log('test111111');
|
|
2548
2526
|
this.currentCallList.push(this.callData);
|
|
@@ -3143,7 +3121,11 @@ class DialboxComponent {
|
|
|
3143
3121
|
console.log("WS Event Received:", incomingCallData);
|
|
3144
3122
|
console.log("WS Event Received:", incomingCallData.data);
|
|
3145
3123
|
this.twilioService.conferenceName = incomingCallData.conferenceName;
|
|
3146
|
-
let participants =
|
|
3124
|
+
let participants = [];
|
|
3125
|
+
if (!!incomingCallData.participants) {
|
|
3126
|
+
participants = incomingCallData.participants.length > 0 ? incomingCallData.participants.filter((item) => !item.isLeft) : [];
|
|
3127
|
+
}
|
|
3128
|
+
// incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
|
|
3147
3129
|
if (participants.length > 0) {
|
|
3148
3130
|
// this.showIncomingCallPopup(incoming, data/
|
|
3149
3131
|
this.isCallInProgress = true;
|