@vgroup/dialbox 0.3.12 → 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/incoming-call/incoming-call.component.mjs +6 -29
- package/esm2020/lib/dialbox.component.mjs +3 -3
- package/fesm2015/vgroup-dialbox.mjs +7 -29
- package/fesm2015/vgroup-dialbox.mjs.map +1 -1
- package/fesm2020/vgroup-dialbox.mjs +7 -29
- package/fesm2020/vgroup-dialbox.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1997,33 +1997,11 @@ class IncomingCallComponent {
|
|
|
1997
1997
|
}
|
|
1998
1998
|
add() {
|
|
1999
1999
|
return __awaiter(this, void 0, void 0, function* () {
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
}).toPromise();
|
|
2006
|
-
console.log('Conference token received:', tokenResponse);
|
|
2007
|
-
// Step 2: Create a new device with conference token
|
|
2008
|
-
const conferenceDevice = new Device(tokenResponse.token.value, {
|
|
2009
|
-
codecPreferences: ['opus', 'pcmu'],
|
|
2010
|
-
closeProtection: true
|
|
2011
|
-
});
|
|
2012
|
-
// Step 3: Connect to the conference
|
|
2013
|
-
const call = yield conferenceDevice.connect({
|
|
2014
|
-
params: {
|
|
2015
|
-
conferenceName: this.twilioService.conferenceName
|
|
2016
|
-
}
|
|
2017
|
-
});
|
|
2018
|
-
console.log('Conference call connected:', call);
|
|
2019
|
-
this.twilioCallData = call;
|
|
2020
|
-
// Step 4: Emit to parent component
|
|
2021
|
-
this.closeIncomingCallDiv.emit({ show: 1, call: call });
|
|
2022
|
-
}
|
|
2023
|
-
catch (error) {
|
|
2024
|
-
console.error('Error connecting to conference:', error);
|
|
2025
|
-
swal("Error", "Failed to join the conference. Please try again.", "error");
|
|
2026
|
-
}
|
|
2000
|
+
let device = yield this.twilioService.connect('');
|
|
2001
|
+
console.log(device, 'callConnect');
|
|
2002
|
+
// this.device = new Device();/
|
|
2003
|
+
// Device.connect({ conferenceName: 'my-conference-room' });
|
|
2004
|
+
// this.device = new Device({ conferenceName: 'my-conference-room' });
|
|
2027
2005
|
});
|
|
2028
2006
|
}
|
|
2029
2007
|
}
|
|
@@ -3183,8 +3161,8 @@ class DialboxComponent {
|
|
|
3183
3161
|
console.log("WS Event Received:", incomingCallData.data);
|
|
3184
3162
|
this.twilioService.conferenceName = incomingCallData.conferenceName;
|
|
3185
3163
|
let participants = [];
|
|
3186
|
-
if (incomingCallData.participants
|
|
3187
|
-
participants = incomingCallData.participants.filter((item) => !item.isLeft);
|
|
3164
|
+
if (!!incomingCallData.participants) {
|
|
3165
|
+
participants = incomingCallData.participants.length > 0 ? incomingCallData.participants.filter((item) => !item.isLeft) : [];
|
|
3188
3166
|
}
|
|
3189
3167
|
// incomingCallData.participants.length ? incomingCallData.participants.filter((item: any) => !item.isLeft) : [];
|
|
3190
3168
|
if (participants.length > 0) {
|