@exotel-npm-dev/webrtc-client-sdk 2.0.3 → 2.0.5
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/Changelog +3 -0
- package/Makefile +1 -1
- package/dist/exotelsdk.js +73 -50
- package/dist/exotelsdk.js.map +1 -1
- package/package.json +2 -2
- package/src/listeners/ExWebClient.js +21 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exotel-npm-dev/webrtc-client-sdk",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "client sdk for webrtc based on webrtc core sdk",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"webpack-cli": "^4.10.0"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@exotel-npm-dev/webrtc-core-sdk": "^1.0.
|
|
32
|
+
"@exotel-npm-dev/webrtc-core-sdk": "^1.0.24"
|
|
33
33
|
}
|
|
34
34
|
}
|
|
@@ -88,6 +88,8 @@ export function ExDelegationHandler(exClient_) {
|
|
|
88
88
|
|
|
89
89
|
this.onStatPeerConnectionIceGatheringStateChange = function (iceGatheringState) {
|
|
90
90
|
logger.log("delegationHandler: onStatPeerConnectionIceGatheringStateChange\n");
|
|
91
|
+
sessionCallback.initializeSession(`ice_gathering_state_${iceGatheringState}`, exClient.callFromNumber);
|
|
92
|
+
sessionCallback.triggerSessionCallback();
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
this.onCallStatIceCandidate = function (ev, icestate) {
|
|
@@ -102,8 +104,10 @@ export function ExDelegationHandler(exClient_) {
|
|
|
102
104
|
logger.log("delegationHandler: onCallStatSignalingStateChange\n");
|
|
103
105
|
}
|
|
104
106
|
|
|
105
|
-
this.onStatPeerConnectionIceConnectionStateChange = function () {
|
|
107
|
+
this.onStatPeerConnectionIceConnectionStateChange = function (iceConnectionState) {
|
|
106
108
|
logger.log("delegationHandler: onStatPeerConnectionIceConnectionStateChange\n");
|
|
109
|
+
sessionCallback.initializeSession(`ice_connection_state_${iceConnectionState}`, exClient.callFromNumber);
|
|
110
|
+
sessionCallback.triggerSessionCallback();
|
|
107
111
|
}
|
|
108
112
|
|
|
109
113
|
this.onStatPeerConnectionConnectionStateChange = function () {
|
|
@@ -116,6 +120,9 @@ export function ExDelegationHandler(exClient_) {
|
|
|
116
120
|
|
|
117
121
|
this.onGetUserMediaErrorCallstatCallback = function () {
|
|
118
122
|
logger.log("delegationHandler: onGetUserMediaErrorCallstatCallback\n");
|
|
123
|
+
sessionCallback.initializeSession(`media_permission_denied`, exClient.callFromNumber);
|
|
124
|
+
sessionCallback.triggerSessionCallback();
|
|
125
|
+
|
|
119
126
|
}
|
|
120
127
|
|
|
121
128
|
this.onCallStatAddStream = function () {
|
|
@@ -231,11 +238,13 @@ export class ExotelWebClient {
|
|
|
231
238
|
/*
|
|
232
239
|
Register the logger callback and emit the onLog event
|
|
233
240
|
*/
|
|
241
|
+
|
|
242
|
+
let exwebClientOb = this;
|
|
234
243
|
logger.registerLoggerCallback(function (type, message, args) {
|
|
235
244
|
|
|
236
245
|
LogManager.onLog(type, message, args);
|
|
237
|
-
if (
|
|
238
|
-
|
|
246
|
+
if (exwebClientOb.clientSDKLoggerCallback)
|
|
247
|
+
exwebClientOb.clientSDKLoggerCallback("log", message, args);
|
|
239
248
|
|
|
240
249
|
});
|
|
241
250
|
}
|
|
@@ -407,7 +416,7 @@ export class ExotelWebClient {
|
|
|
407
416
|
this.callListener.onCallEstablished(param, phone);
|
|
408
417
|
} else if (event === "terminated") {
|
|
409
418
|
this.callListener.onCallEnded(param, phone);
|
|
410
|
-
}
|
|
419
|
+
}
|
|
411
420
|
};
|
|
412
421
|
|
|
413
422
|
/**
|
|
@@ -606,6 +615,14 @@ export class ExotelWebClient {
|
|
|
606
615
|
registerAudioDeviceChangeCallback(audioInputDeviceChangeCallback, audioOutputDeviceChangeCallback, onDeviceChangeCallback) {
|
|
607
616
|
webrtcSIPPhone.registerAudioDeviceChangeCallback(audioInputDeviceChangeCallback, audioOutputDeviceChangeCallback, onDeviceChangeCallback);
|
|
608
617
|
}
|
|
618
|
+
|
|
619
|
+
setEnableConsoleLogging(enable) {
|
|
620
|
+
if (enable) {
|
|
621
|
+
logger.log(`ExWebClient: setEnableConsoleLogging: ${enable}`);
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
logger.setEnableConsoleLogging(enable);
|
|
625
|
+
}
|
|
609
626
|
}
|
|
610
627
|
|
|
611
628
|
export default ExotelWebClient;
|