@exotel-npm-dev/webrtc-client-sdk 3.0.0 → 3.0.2
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/dist/exotelsdk.js +369 -324
- package/dist/exotelsdk.js.map +1 -1
- package/package.json +2 -2
- package/src/listeners/ExWebClient.js +28 -10
package/dist/exotelsdk.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
*
|
|
3
|
-
* WebRTC CLient SIP version 3.0.
|
|
3
|
+
* WebRTC CLient SIP version 3.0.2
|
|
4
4
|
*
|
|
5
5
|
*/
|
|
6
6
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
@@ -56,7 +56,7 @@ const audioDeviceManager = {
|
|
|
56
56
|
currentAudioInputDeviceId: "default",
|
|
57
57
|
currentAudioOutputDeviceId: "default",
|
|
58
58
|
mediaDevices: [],
|
|
59
|
-
|
|
59
|
+
enableAutoAudioDeviceChangeHandling: false,
|
|
60
60
|
// Method to set the resetInputDevice flag
|
|
61
61
|
setResetInputDeviceFlag(value) {
|
|
62
62
|
this.resetInputDevice = value;
|
|
@@ -67,21 +67,23 @@ const audioDeviceManager = {
|
|
|
67
67
|
this.resetOutputDevice = value;
|
|
68
68
|
},
|
|
69
69
|
|
|
70
|
-
async changeAudioInputDevice(deviceId, onSuccess, onError) {
|
|
70
|
+
async changeAudioInputDevice(deviceId, onSuccess, onError, forceDeviceChange) {
|
|
71
71
|
logger.log(`SIPJSPhone:changeAudioInputDevice entry`);
|
|
72
72
|
try {
|
|
73
|
-
if (
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
73
|
+
if (this.enableAutoAudioDeviceChangeHandling && !forceDeviceChange) {
|
|
74
|
+
if (deviceId == audioDeviceManager.currentAudioInputDeviceId) {
|
|
75
|
+
logger.log(`SIPJSPhone:changeAudioInputDevice current input device is same as ${deviceId} hence not changing`);
|
|
76
|
+
if (onError) onError("current input device is same as " + deviceId + " hence not changing");
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const inputDevice = audioDeviceManager.mediaDevices.find(device => device.deviceId === deviceId && device.kind === 'audioinput');
|
|
80
|
+
if (!inputDevice) {
|
|
81
|
+
logger.error("input device id " + deviceId + "not found");
|
|
82
|
+
if (onError) onError("deviceIdNotFound");
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
logger.log(`SIPJSPhone:changeAudioInputDevice acquiring input device ${deviceId} : ${inputDevice.label}`);
|
|
83
86
|
}
|
|
84
|
-
logger.log(`SIPJSPhone:changeAudioInputDevice acquiring input device ${deviceId} : ${inputDevice.label}`);
|
|
85
87
|
const stream = await navigator.mediaDevices.getUserMedia({
|
|
86
88
|
audio: { deviceId: { exact: deviceId } }
|
|
87
89
|
});
|
|
@@ -92,36 +94,36 @@ const audioDeviceManager = {
|
|
|
92
94
|
}
|
|
93
95
|
},
|
|
94
96
|
|
|
95
|
-
async changeAudioOutputDevice(audioRemote, deviceId, onSuccess, onError) {
|
|
97
|
+
async changeAudioOutputDevice(audioRemote, deviceId, onSuccess, onError, forceDeviceChange) {
|
|
96
98
|
logger.log(`audioDeviceManager:changeAudioOutputDevice : entry`);
|
|
97
|
-
if (deviceId == audioDeviceManager.currentAudioOutputDeviceId) {
|
|
98
|
-
logger.log(`SIPJSPhone:changeAudioOutputDevice current output device is same as ${deviceId}`);
|
|
99
|
-
if (onError) onError("current output device is same as " + deviceId);
|
|
100
|
-
return;
|
|
101
|
-
}
|
|
102
99
|
const audioElement = audioRemote;
|
|
103
100
|
if (typeof audioElement.sinkId !== 'undefined') {
|
|
104
101
|
try {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
102
|
+
if (this.enableAutoAudioDeviceChangeHandling && !forceDeviceChange) {
|
|
103
|
+
if (deviceId == audioDeviceManager.currentAudioOutputDeviceId) {
|
|
104
|
+
logger.log(`SIPJSPhone:changeAudioOutputDevice current output device is same as ${deviceId}`);
|
|
105
|
+
if (onError) onError("current output device is same as " + deviceId);
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (!audioDeviceManager.mediaDevices || audioDeviceManager.mediaDevices.length == 0) {
|
|
109
|
+
logger.error("audioDeviceManager:changeAudioOutputDevice mediaDeviceList is empty ");
|
|
110
|
+
if (onError) onError(deviceId + "not found in mediaDeviceList in audioManager");
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
const outputDevice = audioDeviceManager.mediaDevices.find(device => device.deviceId === deviceId && device.kind === 'audiooutput');
|
|
114
|
+
if (!outputDevice) {
|
|
115
|
+
logger.error("audioDeviceManager:changeAudioOutputDevice output device id " + deviceId + "not found");
|
|
116
|
+
if (onError) onError("deviceIdNotFound");
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
logger.log(`audioDeviceManager:changeAudioOutputDevice acquiring output device ${deviceId} : ${outputDevice.label}`);
|
|
120
|
+
// audioElement.load();
|
|
116
121
|
}
|
|
117
|
-
logger.log(`audioDeviceManager:changeAudioOutputDevice acquiring output device ${deviceId} : ${outputDevice.label}`);
|
|
118
|
-
// audioElement.load();
|
|
119
122
|
await audioElement.setSinkId(deviceId);
|
|
120
123
|
audioDeviceManager.currentAudioOutputDeviceId = deviceId;
|
|
121
124
|
logger.log(`audioDeviceManager:changeAudioOutputDevice Output device changed to: ${deviceId}`);
|
|
122
125
|
if (onSuccess) onSuccess();
|
|
123
126
|
|
|
124
|
-
|
|
125
127
|
} catch (error) {
|
|
126
128
|
logger.error('audioDeviceManager:changeAudioOutputDevice Error changing output device:', error);
|
|
127
129
|
if (onError) onError(error);
|
|
@@ -133,6 +135,10 @@ const audioDeviceManager = {
|
|
|
133
135
|
}
|
|
134
136
|
},
|
|
135
137
|
|
|
138
|
+
setEnableAutoAudioDeviceChangeHandling(flag) {
|
|
139
|
+
this.enableAutoAudioDeviceChangeHandling = flag;
|
|
140
|
+
},
|
|
141
|
+
|
|
136
142
|
async resetAudioDevice(audioRemote, onInputDeviceChangeCallback, onOutputDeviceChangeCallback) {
|
|
137
143
|
audioDeviceManager._resetAudioDevice(audioRemote, onInputDeviceChangeCallback, onOutputDeviceChangeCallback, audioDeviceManager.resetOutputDevice, audioDeviceManager.resetInputDevice);
|
|
138
144
|
},
|
|
@@ -182,7 +188,6 @@ const audioDeviceManager = {
|
|
|
182
188
|
|
|
183
189
|
};
|
|
184
190
|
|
|
185
|
-
audioDeviceManager.enumerateDevices();
|
|
186
191
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (audioDeviceManager);
|
|
187
192
|
|
|
188
193
|
/***/ }),
|
|
@@ -201,43 +206,56 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
201
206
|
|
|
202
207
|
const coreSDKLogger = {
|
|
203
208
|
|
|
209
|
+
loggingEnabled: true,
|
|
204
210
|
loggerCallback: null,
|
|
205
211
|
|
|
212
|
+
setEnableConsoleLogging(enable) {
|
|
213
|
+
coreSDKLogger.loggingEnabled = enable;
|
|
214
|
+
},
|
|
215
|
+
|
|
206
216
|
registerLoggerCallback(callback) {
|
|
207
217
|
coreSDKLogger.loggerCallback = callback;
|
|
208
218
|
},
|
|
209
219
|
log: (arg1, ...args) => {
|
|
210
|
-
if (
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
220
|
+
if (coreSDKLogger.loggingEnabled) {
|
|
221
|
+
if (args.length == 0)
|
|
222
|
+
console.log(arg1);
|
|
223
|
+
else
|
|
224
|
+
console.log(arg1, args);
|
|
225
|
+
}
|
|
214
226
|
if (coreSDKLogger.loggerCallback)
|
|
215
227
|
coreSDKLogger.loggerCallback("log", arg1, args);
|
|
216
228
|
},
|
|
217
229
|
|
|
218
230
|
info: (arg1, ...args) => {
|
|
219
|
-
if (
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
231
|
+
if (coreSDKLogger.loggingEnabled) {
|
|
232
|
+
if (args.length == 0)
|
|
233
|
+
console.info(arg1);
|
|
234
|
+
else
|
|
235
|
+
console.info(arg1, args);
|
|
236
|
+
}
|
|
223
237
|
if (coreSDKLogger.loggerCallback)
|
|
224
238
|
coreSDKLogger.loggerCallback("info", arg1, args);
|
|
225
239
|
},
|
|
226
240
|
|
|
227
241
|
warn: (arg1, ...args) => {
|
|
228
|
-
if (
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
242
|
+
if (coreSDKLogger.loggingEnabled) {
|
|
243
|
+
if (args.length == 0)
|
|
244
|
+
console.warn(arg1);
|
|
245
|
+
else
|
|
246
|
+
console.warn(arg1, args);
|
|
247
|
+
}
|
|
232
248
|
if (coreSDKLogger.loggerCallback)
|
|
233
249
|
coreSDKLogger.loggerCallback("warn", arg1, args);
|
|
234
250
|
},
|
|
235
251
|
|
|
236
252
|
error: (arg1, ...args) => {
|
|
237
|
-
if (
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
253
|
+
if (coreSDKLogger.loggingEnabled) {
|
|
254
|
+
if (args.length == 0)
|
|
255
|
+
console.error(arg1);
|
|
256
|
+
else
|
|
257
|
+
console.error(arg1, args);
|
|
258
|
+
}
|
|
241
259
|
if (coreSDKLogger.loggerCallback)
|
|
242
260
|
coreSDKLogger.loggerCallback("error", arg1, args);
|
|
243
261
|
}
|
|
@@ -297,7 +315,8 @@ const coreSDKLogger = {
|
|
|
297
315
|
(function webpackUniversalModuleDefinition(root, factory) {
|
|
298
316
|
if(true)
|
|
299
317
|
module.exports = factory();
|
|
300
|
-
else
|
|
318
|
+
else // removed by dead control flow
|
|
319
|
+
{}
|
|
301
320
|
})(this, function() {
|
|
302
321
|
return /******/ (() => { // webpackBootstrap
|
|
303
322
|
/******/ "use strict";
|
|
@@ -12606,7 +12625,8 @@ class UserAgentCore {
|
|
|
12606
12625
|
break;
|
|
12607
12626
|
case _messages__WEBPACK_IMPORTED_MODULE_7__.C.CANCEL:
|
|
12608
12627
|
throw new Error(`Unexpected out of dialog request method ${message.method}.`);
|
|
12609
|
-
|
|
12628
|
+
// removed by dead control flow
|
|
12629
|
+
|
|
12610
12630
|
case _messages__WEBPACK_IMPORTED_MODULE_7__.C.INFO:
|
|
12611
12631
|
// Use of the INFO method does not constitute a separate dialog usage.
|
|
12612
12632
|
// INFO messages are always part of, and share the fate of, an invite
|
|
@@ -20842,7 +20862,6 @@ var SIP = __webpack_require__(/*! ./sip-0.20.0.js */ "./node_modules/@exotel-npm
|
|
|
20842
20862
|
|
|
20843
20863
|
|
|
20844
20864
|
let logger = _coreSDKLogger_js__WEBPACK_IMPORTED_MODULE_1__["default"];
|
|
20845
|
-
logger.log(SIP);
|
|
20846
20865
|
|
|
20847
20866
|
var beeptone = document.createElement("audio");
|
|
20848
20867
|
beeptone.src = __webpack_require__(/*! ./static/beep.wav */ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/beep.wav");
|
|
@@ -20958,6 +20977,7 @@ class SIPJSPhone {
|
|
|
20958
20977
|
this.bMicEnable = true;
|
|
20959
20978
|
this.bHoldEnable = false;
|
|
20960
20979
|
this.register_flag = false;
|
|
20980
|
+
this.enableAutoAudioDeviceChangeHandling = false;
|
|
20961
20981
|
|
|
20962
20982
|
this.ringtone = ringtone;
|
|
20963
20983
|
this.beeptone = beeptone;
|
|
@@ -20967,8 +20987,6 @@ class SIPJSPhone {
|
|
|
20967
20987
|
this.audioRemote.style.display = 'none';
|
|
20968
20988
|
document.body.appendChild(this.audioRemote);
|
|
20969
20989
|
|
|
20970
|
-
navigator.mediaDevices.addEventListener('devicechange', this._onDeviceChange.bind(this));
|
|
20971
|
-
|
|
20972
20990
|
this.addPreferredCodec = this.addPreferredCodec.bind(this);
|
|
20973
20991
|
|
|
20974
20992
|
// In the constructor, after initializing audio elements:
|
|
@@ -20978,6 +20996,17 @@ class SIPJSPhone {
|
|
|
20978
20996
|
});
|
|
20979
20997
|
}
|
|
20980
20998
|
|
|
20999
|
+
attachGlobalDeviceChangeListener() {
|
|
21000
|
+
logger.log("SIPJSPhone: Attaching global devicechange event listener enableAutoAudioDeviceChangeHandling = ", this.enableAutoAudioDeviceChangeHandling);
|
|
21001
|
+
navigator.mediaDevices.addEventListener('devicechange', this._onDeviceChange.bind(this));
|
|
21002
|
+
}
|
|
21003
|
+
|
|
21004
|
+
setEnableAutoAudioDeviceChangeHandling(flag) {
|
|
21005
|
+
logger.log("sipjsphone: setEnableAutoAudioDeviceChangeHandling: entry, enableAutoAudioDeviceChangeHandling = ",flag);
|
|
21006
|
+
this.enableAutoAudioDeviceChangeHandling = flag;
|
|
21007
|
+
_audioDeviceManager_js__WEBPACK_IMPORTED_MODULE_0__.audioDeviceManager.setEnableAutoAudioDeviceChangeHandling(flag);
|
|
21008
|
+
}
|
|
21009
|
+
|
|
20981
21010
|
init(onInitDoneCallback) {
|
|
20982
21011
|
|
|
20983
21012
|
const preInit = () => {
|
|
@@ -21450,7 +21479,7 @@ class SIPJSPhone {
|
|
|
21450
21479
|
traceSip: true,
|
|
21451
21480
|
reconnectionAttempts: 0
|
|
21452
21481
|
},
|
|
21453
|
-
logBuiltinEnabled:
|
|
21482
|
+
logBuiltinEnabled: false,
|
|
21454
21483
|
logConfiguration: true,
|
|
21455
21484
|
authorizationUsername: this.txtPrivateIdentity,
|
|
21456
21485
|
authorizationPassword: this.txtPassword,
|
|
@@ -21751,8 +21780,8 @@ destroySocketConnection() {
|
|
|
21751
21780
|
switch (direction) {
|
|
21752
21781
|
case "sent":
|
|
21753
21782
|
|
|
21754
|
-
if (sipMessage.method == "
|
|
21755
|
-
this.webrtcSIPPhoneEventDelegate.sendWebRTCEventsToFSM("sent_request",
|
|
21783
|
+
if (sipMessage.method == "REGISTER")
|
|
21784
|
+
this.webrtcSIPPhoneEventDelegate.sendWebRTCEventsToFSM("sent_request", "CONNECTION");
|
|
21756
21785
|
|
|
21757
21786
|
this.webrtcSIPPhoneEventDelegate.onCallStatSipSendCallback(newtext, "sipjs");
|
|
21758
21787
|
|
|
@@ -22190,8 +22219,8 @@ destroySocketConnection() {
|
|
|
22190
22219
|
return this.lastRegistererState;
|
|
22191
22220
|
}
|
|
22192
22221
|
|
|
22193
|
-
changeAudioInputDevice(deviceId, onSuccess, onError) {
|
|
22194
|
-
logger.log("sipjsphone: changeAudioInputDevice : ", deviceId, onSuccess, onError);
|
|
22222
|
+
changeAudioInputDevice(deviceId, onSuccess, onError, forceDeviceChange) {
|
|
22223
|
+
logger.log("sipjsphone: changeAudioInputDevice : ", deviceId, onSuccess, onError, "forceDeviceChange = ", forceDeviceChange, "enableAutoAudioDeviceChangeHandling = ", this.enableAutoAudioDeviceChangeHandling);
|
|
22195
22224
|
_audioDeviceManager_js__WEBPACK_IMPORTED_MODULE_0__.audioDeviceManager.changeAudioInputDevice(deviceId, (stream) => {
|
|
22196
22225
|
const trackChanged = this.replaceSenderTrack(stream, deviceId);
|
|
22197
22226
|
if (trackChanged) {
|
|
@@ -22205,10 +22234,12 @@ destroySocketConnection() {
|
|
|
22205
22234
|
}, (err) => {
|
|
22206
22235
|
logger.error("sipjsphone: changeAudioInputDevice error:", err);
|
|
22207
22236
|
if (onError) onError(err);
|
|
22208
|
-
}
|
|
22237
|
+
},
|
|
22238
|
+
forceDeviceChange);
|
|
22209
22239
|
}
|
|
22210
22240
|
|
|
22211
|
-
async changeAudioOutputDevice(deviceId, onSuccess, onError) {
|
|
22241
|
+
async changeAudioOutputDevice(deviceId, onSuccess, onError, forceDeviceChange) {
|
|
22242
|
+
logger.log("sipjsphone: changeAudioOutputDevice : ", deviceId, onSuccess, onError, "forceDeviceChange = ", forceDeviceChange, "enableAutoAudioDeviceChangeHandling = ", this.enableAutoAudioDeviceChangeHandling);
|
|
22212
22243
|
try {
|
|
22213
22244
|
// Ensure device list is up-to-date
|
|
22214
22245
|
await _audioDeviceManager_js__WEBPACK_IMPORTED_MODULE_0__.audioDeviceManager.enumerateDevices();
|
|
@@ -22230,7 +22261,8 @@ destroySocketConnection() {
|
|
|
22230
22261
|
}, (err) => {
|
|
22231
22262
|
logger.error('SIPJSPhone:changeAudioOutputDevice error:', err);
|
|
22232
22263
|
if (onError) onError(err);
|
|
22233
|
-
}
|
|
22264
|
+
},
|
|
22265
|
+
forceDeviceChange);
|
|
22234
22266
|
} catch (e) {
|
|
22235
22267
|
logger.error('SIPJSPhone:changeAudioOutputDevice unexpected error:', e);
|
|
22236
22268
|
if (onError) onError(e);
|
|
@@ -22483,6 +22515,50 @@ destroySocketConnection() {
|
|
|
22483
22515
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (SIPJSPhone);
|
|
22484
22516
|
|
|
22485
22517
|
|
|
22518
|
+
/***/ }),
|
|
22519
|
+
|
|
22520
|
+
/***/ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/beep.wav":
|
|
22521
|
+
/*!**************************************************************************!*\
|
|
22522
|
+
!*** ./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/beep.wav ***!
|
|
22523
|
+
\**************************************************************************/
|
|
22524
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
22525
|
+
|
|
22526
|
+
"use strict";
|
|
22527
|
+
module.exports = __webpack_require__.p + "beep.wav";
|
|
22528
|
+
|
|
22529
|
+
/***/ }),
|
|
22530
|
+
|
|
22531
|
+
/***/ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/dtmf.wav":
|
|
22532
|
+
/*!**************************************************************************!*\
|
|
22533
|
+
!*** ./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/dtmf.wav ***!
|
|
22534
|
+
\**************************************************************************/
|
|
22535
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
22536
|
+
|
|
22537
|
+
"use strict";
|
|
22538
|
+
module.exports = __webpack_require__.p + "dtmf.wav";
|
|
22539
|
+
|
|
22540
|
+
/***/ }),
|
|
22541
|
+
|
|
22542
|
+
/***/ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/ringbacktone.wav":
|
|
22543
|
+
/*!**********************************************************************************!*\
|
|
22544
|
+
!*** ./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/ringbacktone.wav ***!
|
|
22545
|
+
\**********************************************************************************/
|
|
22546
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
22547
|
+
|
|
22548
|
+
"use strict";
|
|
22549
|
+
module.exports = __webpack_require__.p + "ringbacktone.wav";
|
|
22550
|
+
|
|
22551
|
+
/***/ }),
|
|
22552
|
+
|
|
22553
|
+
/***/ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/ringtone.wav":
|
|
22554
|
+
/*!******************************************************************************!*\
|
|
22555
|
+
!*** ./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/ringtone.wav ***!
|
|
22556
|
+
\******************************************************************************/
|
|
22557
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
22558
|
+
|
|
22559
|
+
"use strict";
|
|
22560
|
+
module.exports = __webpack_require__.p + "ringtone.wav";
|
|
22561
|
+
|
|
22486
22562
|
/***/ }),
|
|
22487
22563
|
|
|
22488
22564
|
/***/ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/webrtcSIPPhone.js":
|
|
@@ -22532,8 +22608,8 @@ class WebrtcSIPPhone {
|
|
|
22532
22608
|
return _coreSDKLogger__WEBPACK_IMPORTED_MODULE_0__["default"];
|
|
22533
22609
|
}
|
|
22534
22610
|
|
|
22535
|
-
registerPhone(engine, delegate) {
|
|
22536
|
-
logger.log("webrtcSIPPhone: registerPhone : ", engine);
|
|
22611
|
+
registerPhone(engine, delegate, enableAutoAudioDeviceChangeHandling = false) {
|
|
22612
|
+
logger.log("webrtcSIPPhone: registerPhone : ", engine, "enableAutoAudioDeviceChangeHandling:", enableAutoAudioDeviceChangeHandling);
|
|
22537
22613
|
this.webrtcSIPEngine = engine;
|
|
22538
22614
|
|
|
22539
22615
|
if (!this.webrtcSIPPhoneEventDelegate) {
|
|
@@ -22555,6 +22631,10 @@ class WebrtcSIPPhone {
|
|
|
22555
22631
|
}
|
|
22556
22632
|
|
|
22557
22633
|
this.webrtcSIPPhoneEventDelegate.onRegisterWebRTCSIPEngine(engine);
|
|
22634
|
+
this.phone.setEnableAutoAudioDeviceChangeHandling(enableAutoAudioDeviceChangeHandling);
|
|
22635
|
+
if(enableAutoAudioDeviceChangeHandling) {
|
|
22636
|
+
this.phone.attachGlobalDeviceChangeListener();
|
|
22637
|
+
}
|
|
22558
22638
|
}
|
|
22559
22639
|
|
|
22560
22640
|
getWebRTCStatus() {
|
|
@@ -22742,14 +22822,14 @@ class WebrtcSIPPhone {
|
|
|
22742
22822
|
}
|
|
22743
22823
|
}
|
|
22744
22824
|
|
|
22745
|
-
changeAudioInputDevice(deviceId, onSuccess, onError) {
|
|
22746
|
-
logger.log("webrtcSIPPhone: changeAudioInputDevice : ", deviceId, onSuccess, onError);
|
|
22747
|
-
this.phone.changeAudioInputDevice(deviceId, onSuccess, onError);
|
|
22825
|
+
changeAudioInputDevice(deviceId, onSuccess, onError, forceDeviceChange = false) {
|
|
22826
|
+
logger.log("webrtcSIPPhone: changeAudioInputDevice : ", deviceId, onSuccess, onError, "forceDeviceChange = ", forceDeviceChange);
|
|
22827
|
+
this.phone.changeAudioInputDevice(deviceId, onSuccess, onError, forceDeviceChange);
|
|
22748
22828
|
}
|
|
22749
22829
|
|
|
22750
|
-
changeAudioOutputDevice(deviceId, onSuccess, onError) {
|
|
22751
|
-
logger.log("webrtcSIPPhone: changeAudioOutputDevice : ", deviceId, onSuccess, onError);
|
|
22752
|
-
this.phone.changeAudioOutputDevice(deviceId, onSuccess, onError);
|
|
22830
|
+
changeAudioOutputDevice(deviceId, onSuccess, onError, forceDeviceChange = false) {
|
|
22831
|
+
logger.log("webrtcSIPPhone: changeAudioOutputDevice : ", deviceId, onSuccess, onError, "forceDeviceChange = ", forceDeviceChange);
|
|
22832
|
+
this.phone.changeAudioOutputDevice(deviceId, onSuccess, onError, forceDeviceChange);
|
|
22753
22833
|
}
|
|
22754
22834
|
|
|
22755
22835
|
setPreferredCodec(codecName) {
|
|
@@ -22891,10 +22971,10 @@ class WebrtcSIPPhoneEventDelegate {
|
|
|
22891
22971
|
});
|
|
22892
22972
|
}
|
|
22893
22973
|
|
|
22894
|
-
onStatPeerConnectionIceConnectionStateChange() {
|
|
22974
|
+
onStatPeerConnectionIceConnectionStateChange(iceConnectionState) {
|
|
22895
22975
|
this.delegates.forEach(delegate => {
|
|
22896
22976
|
if (delegate && typeof delegate.onStatPeerConnectionIceConnectionStateChange === 'function') {
|
|
22897
|
-
delegate.onStatPeerConnectionIceConnectionStateChange();
|
|
22977
|
+
delegate.onStatPeerConnectionIceConnectionStateChange(iceConnectionState);
|
|
22898
22978
|
}
|
|
22899
22979
|
});
|
|
22900
22980
|
}
|
|
@@ -23032,6 +23112,188 @@ class WebrtcSIPPhoneEventDelegate {
|
|
|
23032
23112
|
|
|
23033
23113
|
/***/ }),
|
|
23034
23114
|
|
|
23115
|
+
/***/ "./node_modules/uuid/dist/esm-browser/native.js":
|
|
23116
|
+
/*!******************************************************!*\
|
|
23117
|
+
!*** ./node_modules/uuid/dist/esm-browser/native.js ***!
|
|
23118
|
+
\******************************************************/
|
|
23119
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23120
|
+
|
|
23121
|
+
"use strict";
|
|
23122
|
+
__webpack_require__.r(__webpack_exports__);
|
|
23123
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23124
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23125
|
+
/* harmony export */ });
|
|
23126
|
+
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
23127
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
23128
|
+
randomUUID
|
|
23129
|
+
});
|
|
23130
|
+
|
|
23131
|
+
/***/ }),
|
|
23132
|
+
|
|
23133
|
+
/***/ "./node_modules/uuid/dist/esm-browser/regex.js":
|
|
23134
|
+
/*!*****************************************************!*\
|
|
23135
|
+
!*** ./node_modules/uuid/dist/esm-browser/regex.js ***!
|
|
23136
|
+
\*****************************************************/
|
|
23137
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23138
|
+
|
|
23139
|
+
"use strict";
|
|
23140
|
+
__webpack_require__.r(__webpack_exports__);
|
|
23141
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23142
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23143
|
+
/* harmony export */ });
|
|
23144
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);
|
|
23145
|
+
|
|
23146
|
+
/***/ }),
|
|
23147
|
+
|
|
23148
|
+
/***/ "./node_modules/uuid/dist/esm-browser/rng.js":
|
|
23149
|
+
/*!***************************************************!*\
|
|
23150
|
+
!*** ./node_modules/uuid/dist/esm-browser/rng.js ***!
|
|
23151
|
+
\***************************************************/
|
|
23152
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23153
|
+
|
|
23154
|
+
"use strict";
|
|
23155
|
+
__webpack_require__.r(__webpack_exports__);
|
|
23156
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23157
|
+
/* harmony export */ "default": () => (/* binding */ rng)
|
|
23158
|
+
/* harmony export */ });
|
|
23159
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
23160
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
23161
|
+
// generators (like Math.random()).
|
|
23162
|
+
let getRandomValues;
|
|
23163
|
+
const rnds8 = new Uint8Array(16);
|
|
23164
|
+
function rng() {
|
|
23165
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
23166
|
+
if (!getRandomValues) {
|
|
23167
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
23168
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
23169
|
+
|
|
23170
|
+
if (!getRandomValues) {
|
|
23171
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
23172
|
+
}
|
|
23173
|
+
}
|
|
23174
|
+
|
|
23175
|
+
return getRandomValues(rnds8);
|
|
23176
|
+
}
|
|
23177
|
+
|
|
23178
|
+
/***/ }),
|
|
23179
|
+
|
|
23180
|
+
/***/ "./node_modules/uuid/dist/esm-browser/stringify.js":
|
|
23181
|
+
/*!*********************************************************!*\
|
|
23182
|
+
!*** ./node_modules/uuid/dist/esm-browser/stringify.js ***!
|
|
23183
|
+
\*********************************************************/
|
|
23184
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23185
|
+
|
|
23186
|
+
"use strict";
|
|
23187
|
+
__webpack_require__.r(__webpack_exports__);
|
|
23188
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23189
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
23190
|
+
/* harmony export */ unsafeStringify: () => (/* binding */ unsafeStringify)
|
|
23191
|
+
/* harmony export */ });
|
|
23192
|
+
/* harmony import */ var _validate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validate.js */ "./node_modules/uuid/dist/esm-browser/validate.js");
|
|
23193
|
+
|
|
23194
|
+
/**
|
|
23195
|
+
* Convert array of 16 byte values to UUID string format of the form:
|
|
23196
|
+
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
23197
|
+
*/
|
|
23198
|
+
|
|
23199
|
+
const byteToHex = [];
|
|
23200
|
+
|
|
23201
|
+
for (let i = 0; i < 256; ++i) {
|
|
23202
|
+
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
23203
|
+
}
|
|
23204
|
+
|
|
23205
|
+
function unsafeStringify(arr, offset = 0) {
|
|
23206
|
+
// Note: Be careful editing this code! It's been tuned for performance
|
|
23207
|
+
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
23208
|
+
return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];
|
|
23209
|
+
}
|
|
23210
|
+
|
|
23211
|
+
function stringify(arr, offset = 0) {
|
|
23212
|
+
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
23213
|
+
// of the following:
|
|
23214
|
+
// - One or more input array values don't map to a hex octet (leading to
|
|
23215
|
+
// "undefined" in the uuid)
|
|
23216
|
+
// - Invalid input values for the RFC `version` or `variant` fields
|
|
23217
|
+
|
|
23218
|
+
if (!(0,_validate_js__WEBPACK_IMPORTED_MODULE_0__["default"])(uuid)) {
|
|
23219
|
+
throw TypeError('Stringified UUID is invalid');
|
|
23220
|
+
}
|
|
23221
|
+
|
|
23222
|
+
return uuid;
|
|
23223
|
+
}
|
|
23224
|
+
|
|
23225
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stringify);
|
|
23226
|
+
|
|
23227
|
+
/***/ }),
|
|
23228
|
+
|
|
23229
|
+
/***/ "./node_modules/uuid/dist/esm-browser/v4.js":
|
|
23230
|
+
/*!**************************************************!*\
|
|
23231
|
+
!*** ./node_modules/uuid/dist/esm-browser/v4.js ***!
|
|
23232
|
+
\**************************************************/
|
|
23233
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23234
|
+
|
|
23235
|
+
"use strict";
|
|
23236
|
+
__webpack_require__.r(__webpack_exports__);
|
|
23237
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23238
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23239
|
+
/* harmony export */ });
|
|
23240
|
+
/* harmony import */ var _native_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./native.js */ "./node_modules/uuid/dist/esm-browser/native.js");
|
|
23241
|
+
/* harmony import */ var _rng_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rng.js */ "./node_modules/uuid/dist/esm-browser/rng.js");
|
|
23242
|
+
/* harmony import */ var _stringify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stringify.js */ "./node_modules/uuid/dist/esm-browser/stringify.js");
|
|
23243
|
+
|
|
23244
|
+
|
|
23245
|
+
|
|
23246
|
+
|
|
23247
|
+
function v4(options, buf, offset) {
|
|
23248
|
+
if (_native_js__WEBPACK_IMPORTED_MODULE_0__["default"].randomUUID && !buf && !options) {
|
|
23249
|
+
return _native_js__WEBPACK_IMPORTED_MODULE_0__["default"].randomUUID();
|
|
23250
|
+
}
|
|
23251
|
+
|
|
23252
|
+
options = options || {};
|
|
23253
|
+
const rnds = options.random || (options.rng || _rng_js__WEBPACK_IMPORTED_MODULE_1__["default"])(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
23254
|
+
|
|
23255
|
+
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
23256
|
+
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
23257
|
+
|
|
23258
|
+
if (buf) {
|
|
23259
|
+
offset = offset || 0;
|
|
23260
|
+
|
|
23261
|
+
for (let i = 0; i < 16; ++i) {
|
|
23262
|
+
buf[offset + i] = rnds[i];
|
|
23263
|
+
}
|
|
23264
|
+
|
|
23265
|
+
return buf;
|
|
23266
|
+
}
|
|
23267
|
+
|
|
23268
|
+
return (0,_stringify_js__WEBPACK_IMPORTED_MODULE_2__.unsafeStringify)(rnds);
|
|
23269
|
+
}
|
|
23270
|
+
|
|
23271
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (v4);
|
|
23272
|
+
|
|
23273
|
+
/***/ }),
|
|
23274
|
+
|
|
23275
|
+
/***/ "./node_modules/uuid/dist/esm-browser/validate.js":
|
|
23276
|
+
/*!********************************************************!*\
|
|
23277
|
+
!*** ./node_modules/uuid/dist/esm-browser/validate.js ***!
|
|
23278
|
+
\********************************************************/
|
|
23279
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23280
|
+
|
|
23281
|
+
"use strict";
|
|
23282
|
+
__webpack_require__.r(__webpack_exports__);
|
|
23283
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
23284
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
23285
|
+
/* harmony export */ });
|
|
23286
|
+
/* harmony import */ var _regex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./regex.js */ "./node_modules/uuid/dist/esm-browser/regex.js");
|
|
23287
|
+
|
|
23288
|
+
|
|
23289
|
+
function validate(uuid) {
|
|
23290
|
+
return typeof uuid === 'string' && _regex_js__WEBPACK_IMPORTED_MODULE_0__["default"].test(uuid);
|
|
23291
|
+
}
|
|
23292
|
+
|
|
23293
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (validate);
|
|
23294
|
+
|
|
23295
|
+
/***/ }),
|
|
23296
|
+
|
|
23035
23297
|
/***/ "./src/api/LogManager.js":
|
|
23036
23298
|
/*!*******************************!*\
|
|
23037
23299
|
!*** ./src/api/LogManager.js ***!
|
|
@@ -23054,7 +23316,6 @@ const LogManager = {
|
|
|
23054
23316
|
if (logs.length > MAX_LOG_LINES) {
|
|
23055
23317
|
logs = logs.slice(-MAX_LOG_LINES); // rotate
|
|
23056
23318
|
}
|
|
23057
|
-
|
|
23058
23319
|
localStorage.setItem(LOG_STORAGE_KEY, JSON.stringify(logs));
|
|
23059
23320
|
},
|
|
23060
23321
|
getLogs() {
|
|
@@ -23367,7 +23628,6 @@ var ameyoWebRTCTroubleshooter = {
|
|
|
23367
23628
|
_listeners_Callback__WEBPACK_IMPORTED_MODULE_1__.diagnosticsCallback.triggerDiagnosticsSaveCallback('troubleShootReport', msg);
|
|
23368
23629
|
//}
|
|
23369
23630
|
},
|
|
23370
|
-
|
|
23371
23631
|
getBrowserData: function () {
|
|
23372
23632
|
var agent = navigator.userAgent;
|
|
23373
23633
|
var browserName = navigator.appName;
|
|
@@ -23496,7 +23756,6 @@ var ameyoWebRTCTroubleshooter = {
|
|
|
23496
23756
|
}
|
|
23497
23757
|
//Enable this for tone loop - End
|
|
23498
23758
|
},
|
|
23499
|
-
|
|
23500
23759
|
stopSpeakerTest: function (webrtcSIPPhone) {
|
|
23501
23760
|
var parent = this;
|
|
23502
23761
|
if (!webrtcSIPPhone) {
|
|
@@ -23518,7 +23777,6 @@ var ameyoWebRTCTroubleshooter = {
|
|
|
23518
23777
|
}
|
|
23519
23778
|
//Enable this for tone loop - End
|
|
23520
23779
|
},
|
|
23521
|
-
|
|
23522
23780
|
startMicTest: function () {
|
|
23523
23781
|
this.closeAudioTrack();
|
|
23524
23782
|
this.addToTrobuleshootReport("INFO", "Microphone device testing is inprogress");
|
|
@@ -24400,6 +24658,7 @@ function fetchPublicIP(sipAccountInfo) {
|
|
|
24400
24658
|
class ExDelegationHandler {
|
|
24401
24659
|
constructor(exClient) {
|
|
24402
24660
|
this.exClient = exClient;
|
|
24661
|
+
this.sessionCallback = exClient.sessionCallback;
|
|
24403
24662
|
}
|
|
24404
24663
|
setTestingMode(mode) {
|
|
24405
24664
|
logger.log("delegationHandler: setTestingMode\n");
|
|
@@ -24422,6 +24681,8 @@ class ExDelegationHandler {
|
|
|
24422
24681
|
}
|
|
24423
24682
|
onStatPeerConnectionIceGatheringStateChange(iceGatheringState) {
|
|
24424
24683
|
logger.log("delegationHandler: onStatPeerConnectionIceGatheringStateChange\n");
|
|
24684
|
+
this.sessionCallback.initializeSession(`ice_gathering_state_${iceGatheringState}`, this.exClient.callFromNumber);
|
|
24685
|
+
this.sessionCallback.triggerSessionCallback();
|
|
24425
24686
|
}
|
|
24426
24687
|
onCallStatIceCandidate(ev, icestate) {
|
|
24427
24688
|
logger.log("delegationHandler: onCallStatIceCandidate\n");
|
|
@@ -24432,8 +24693,10 @@ class ExDelegationHandler {
|
|
|
24432
24693
|
onCallStatSignalingStateChange(cstate) {
|
|
24433
24694
|
logger.log("delegationHandler: onCallStatSignalingStateChange\n");
|
|
24434
24695
|
}
|
|
24435
|
-
onStatPeerConnectionIceConnectionStateChange() {
|
|
24696
|
+
onStatPeerConnectionIceConnectionStateChange(iceConnectionState) {
|
|
24436
24697
|
logger.log("delegationHandler: onStatPeerConnectionIceConnectionStateChange\n");
|
|
24698
|
+
this.sessionCallback.initializeSession(`ice_connection_state_${iceConnectionState}`, this.exClient.callFromNumber);
|
|
24699
|
+
this.sessionCallback.triggerSessionCallback();
|
|
24437
24700
|
}
|
|
24438
24701
|
onStatPeerConnectionConnectionStateChange() {
|
|
24439
24702
|
logger.log("delegationHandler: onStatPeerConnectionConnectionStateChange\n");
|
|
@@ -24443,6 +24706,8 @@ class ExDelegationHandler {
|
|
|
24443
24706
|
}
|
|
24444
24707
|
onGetUserMediaErrorCallstatCallback() {
|
|
24445
24708
|
logger.log("delegationHandler: onGetUserMediaErrorCallstatCallback\n");
|
|
24709
|
+
this.sessionCallback.initializeSession(`media_permission_denied`, this.exClient.callFromNumber);
|
|
24710
|
+
this.sessionCallback.triggerSessionCallback();
|
|
24446
24711
|
}
|
|
24447
24712
|
onCallStatAddStream() {
|
|
24448
24713
|
logger.log("delegationHandler: onCallStatAddStream\n");
|
|
@@ -24558,14 +24823,15 @@ class ExotelWebClient {
|
|
|
24558
24823
|
this.logger = (0,_exotel_npm_dev_webrtc_core_sdk__WEBPACK_IMPORTED_MODULE_8__.getLogger)();
|
|
24559
24824
|
|
|
24560
24825
|
// Register logger callback
|
|
24826
|
+
let exwebClientOb = this;
|
|
24561
24827
|
this.logger.registerLoggerCallback((type, message, args) => {
|
|
24562
24828
|
_api_LogManager_js__WEBPACK_IMPORTED_MODULE_10__["default"].onLog(type, message, args);
|
|
24563
|
-
if (
|
|
24564
|
-
|
|
24829
|
+
if (exwebClientOb.clientSDKLoggerCallback) {
|
|
24830
|
+
exwebClientOb.clientSDKLoggerCallback("log", message, args);
|
|
24565
24831
|
}
|
|
24566
24832
|
});
|
|
24567
24833
|
}
|
|
24568
|
-
initWebrtc = async (sipAccountInfo_, RegisterEventCallBack, CallListenerCallback, SessionCallback) => {
|
|
24834
|
+
initWebrtc = async (sipAccountInfo_, RegisterEventCallBack, CallListenerCallback, SessionCallback, enableAutoAudioDeviceChangeHandling = false) => {
|
|
24569
24835
|
const userName = sipAccountInfo_?.userName;
|
|
24570
24836
|
if (!userName) return false;
|
|
24571
24837
|
|
|
@@ -24590,6 +24856,7 @@ class ExotelWebClient {
|
|
|
24590
24856
|
if (!this.ctrlr) {
|
|
24591
24857
|
this.ctrlr = new _CallCtrlerDummy__WEBPACK_IMPORTED_MODULE_5__.CallController();
|
|
24592
24858
|
}
|
|
24859
|
+
sipAccountInfo_.enableAutoAudioDeviceChangeHandling = enableAutoAudioDeviceChangeHandling;
|
|
24593
24860
|
logger.log("ExWebClient: initWebrtc: Exotel Client Initialised with " + JSON.stringify(sipAccountInfo_));
|
|
24594
24861
|
this.sipAccountInfo = sipAccountInfo_;
|
|
24595
24862
|
if (!this.sipAccountInfo["userName"] || !this.sipAccountInfo["sipdomain"] || !this.sipAccountInfo["port"]) {
|
|
@@ -24620,7 +24887,7 @@ class ExotelWebClient {
|
|
|
24620
24887
|
}
|
|
24621
24888
|
|
|
24622
24889
|
// Initialize the phone with SIP engine
|
|
24623
|
-
this.webrtcSIPPhone.registerPhone("sipjs", new ExDelegationHandler(this));
|
|
24890
|
+
this.webrtcSIPPhone.registerPhone("sipjs", new ExDelegationHandler(this), this.sipAccountInfo.enableAutoAudioDeviceChangeHandling);
|
|
24624
24891
|
|
|
24625
24892
|
// Create call instance after phone is initialized
|
|
24626
24893
|
if (!this.call) {
|
|
@@ -24714,7 +24981,6 @@ class ExotelWebClient {
|
|
|
24714
24981
|
if (!this.call) {
|
|
24715
24982
|
this.call = new _api_callAPI_Call__WEBPACK_IMPORTED_MODULE_0__.Call(param); // param is the session
|
|
24716
24983
|
}
|
|
24717
|
-
|
|
24718
24984
|
this.callListener.onIncomingCall(param, phone);
|
|
24719
24985
|
} else if (event === "ringing" || event === "accept_reject") {
|
|
24720
24986
|
this.callListener.onRinging(param, phone);
|
|
@@ -24812,7 +25078,7 @@ class ExotelWebClient {
|
|
|
24812
25078
|
var synchronousHandler = new ExSynchronousHandler();
|
|
24813
25079
|
var delegationHandler = new ExDelegationHandler(this);
|
|
24814
25080
|
var userName = this.userName;
|
|
24815
|
-
this.webrtcSIPPhone.registerPhone("sipjs", delegationHandler);
|
|
25081
|
+
this.webrtcSIPPhone.registerPhone("sipjs", delegationHandler, this.sipAccountInfo.enableAutoAudioDeviceChangeHandling);
|
|
24816
25082
|
this.webrtcSIPPhone.registerWebRTCClient(this.sipAccntInfo, synchronousHandler);
|
|
24817
25083
|
phonePool[this.userName] = this.webrtcSIPPhone;
|
|
24818
25084
|
intervalIDMap.set(userName, intervalId);
|
|
@@ -24856,13 +25122,13 @@ class ExotelWebClient {
|
|
|
24856
25122
|
callback("media_permission_denied");
|
|
24857
25123
|
});
|
|
24858
25124
|
};
|
|
24859
|
-
changeAudioInputDevice(deviceId, onSuccess, onError) {
|
|
25125
|
+
changeAudioInputDevice(deviceId, onSuccess, onError, forceDeviceChange = false) {
|
|
24860
25126
|
logger.log(`ExWebClient: changeAudioInputDevice: Entry`);
|
|
24861
|
-
this.webrtcSIPPhone.changeAudioInputDevice(deviceId, onSuccess, onError);
|
|
25127
|
+
this.webrtcSIPPhone.changeAudioInputDevice(deviceId, onSuccess, onError, forceDeviceChange);
|
|
24862
25128
|
}
|
|
24863
|
-
changeAudioOutputDevice(deviceId, onSuccess, onError) {
|
|
25129
|
+
changeAudioOutputDevice(deviceId, onSuccess, onError, forceDeviceChange = false) {
|
|
24864
25130
|
logger.log(`ExWebClient: changeAudioOutputDevice: Entry`);
|
|
24865
|
-
this.webrtcSIPPhone.changeAudioOutputDevice(deviceId, onSuccess, onError);
|
|
25131
|
+
this.webrtcSIPPhone.changeAudioOutputDevice(deviceId, onSuccess, onError, forceDeviceChange);
|
|
24866
25132
|
}
|
|
24867
25133
|
downloadLogs() {
|
|
24868
25134
|
logger.log(`ExWebClient: downloadLogs: Entry`);
|
|
@@ -24887,6 +25153,12 @@ class ExotelWebClient {
|
|
|
24887
25153
|
}
|
|
24888
25154
|
this.webrtcSIPPhone.registerAudioDeviceChangeCallback(audioInputDeviceChangeCallback, audioOutputDeviceChangeCallback, onDeviceChangeCallback);
|
|
24889
25155
|
}
|
|
25156
|
+
setEnableConsoleLogging(enable) {
|
|
25157
|
+
if (enable) {
|
|
25158
|
+
logger.log(`ExWebClient: setEnableConsoleLogging: ${enable}`);
|
|
25159
|
+
}
|
|
25160
|
+
logger.setEnableConsoleLogging(enable);
|
|
25161
|
+
}
|
|
24890
25162
|
}
|
|
24891
25163
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (ExotelWebClient);
|
|
24892
25164
|
|
|
@@ -24967,11 +25239,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
24967
25239
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
24968
25240
|
/* harmony export */ SessionListener: () => (/* binding */ SessionListener)
|
|
24969
25241
|
/* harmony export */ });
|
|
24970
|
-
/* harmony import */ var
|
|
24971
|
-
/* harmony import */ var
|
|
25242
|
+
/* harmony import */ var uuid__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! uuid */ "./node_modules/uuid/dist/esm-browser/v4.js");
|
|
25243
|
+
/* harmony import */ var _exotel_npm_dev_webrtc_core_sdk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @exotel-npm-dev/webrtc-core-sdk */ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/index.js");
|
|
24972
25244
|
|
|
24973
25245
|
|
|
24974
|
-
const logger = (0,
|
|
25246
|
+
const logger = (0,_exotel_npm_dev_webrtc_core_sdk__WEBPACK_IMPORTED_MODULE_1__.getLogger)();
|
|
24975
25247
|
/**
|
|
24976
25248
|
* Session listeners is invoked when user opens two tabs, the data in tab 1 is
|
|
24977
25249
|
* copied into tab 2
|
|
@@ -25037,7 +25309,6 @@ class SessionListener {
|
|
|
25037
25309
|
*/
|
|
25038
25310
|
//sessionCallback.triggerSessionCallback();
|
|
25039
25311
|
}
|
|
25040
|
-
|
|
25041
25312
|
if (event.key === 'CREDENTIALS_SHARING' && credentials !== null) {
|
|
25042
25313
|
const newData = JSON.parse(event.newValue);
|
|
25043
25314
|
if (event.newValue !== null) {
|
|
@@ -25048,7 +25319,7 @@ class SessionListener {
|
|
|
25048
25319
|
* Fetch the array of tabs and add the tab, put it on session also
|
|
25049
25320
|
*/
|
|
25050
25321
|
const currentTab = {
|
|
25051
|
-
tabID: (0,
|
|
25322
|
+
tabID: (0,uuid__WEBPACK_IMPORTED_MODULE_0__["default"])(),
|
|
25052
25323
|
tabType: 'child',
|
|
25053
25324
|
tabStatus: 'active'
|
|
25054
25325
|
};
|
|
@@ -25100,232 +25371,6 @@ class SessionListener {
|
|
|
25100
25371
|
}
|
|
25101
25372
|
}
|
|
25102
25373
|
|
|
25103
|
-
/***/ }),
|
|
25104
|
-
|
|
25105
|
-
/***/ "./node_modules/uuid/dist/esm-browser/native.js":
|
|
25106
|
-
/*!******************************************************!*\
|
|
25107
|
-
!*** ./node_modules/uuid/dist/esm-browser/native.js ***!
|
|
25108
|
-
\******************************************************/
|
|
25109
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25110
|
-
|
|
25111
|
-
"use strict";
|
|
25112
|
-
__webpack_require__.r(__webpack_exports__);
|
|
25113
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25114
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
25115
|
-
/* harmony export */ });
|
|
25116
|
-
const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
25117
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
25118
|
-
randomUUID
|
|
25119
|
-
});
|
|
25120
|
-
|
|
25121
|
-
/***/ }),
|
|
25122
|
-
|
|
25123
|
-
/***/ "./node_modules/uuid/dist/esm-browser/regex.js":
|
|
25124
|
-
/*!*****************************************************!*\
|
|
25125
|
-
!*** ./node_modules/uuid/dist/esm-browser/regex.js ***!
|
|
25126
|
-
\*****************************************************/
|
|
25127
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25128
|
-
|
|
25129
|
-
"use strict";
|
|
25130
|
-
__webpack_require__.r(__webpack_exports__);
|
|
25131
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25132
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
25133
|
-
/* harmony export */ });
|
|
25134
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);
|
|
25135
|
-
|
|
25136
|
-
/***/ }),
|
|
25137
|
-
|
|
25138
|
-
/***/ "./node_modules/uuid/dist/esm-browser/rng.js":
|
|
25139
|
-
/*!***************************************************!*\
|
|
25140
|
-
!*** ./node_modules/uuid/dist/esm-browser/rng.js ***!
|
|
25141
|
-
\***************************************************/
|
|
25142
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25143
|
-
|
|
25144
|
-
"use strict";
|
|
25145
|
-
__webpack_require__.r(__webpack_exports__);
|
|
25146
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25147
|
-
/* harmony export */ "default": () => (/* binding */ rng)
|
|
25148
|
-
/* harmony export */ });
|
|
25149
|
-
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
25150
|
-
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
25151
|
-
// generators (like Math.random()).
|
|
25152
|
-
let getRandomValues;
|
|
25153
|
-
const rnds8 = new Uint8Array(16);
|
|
25154
|
-
function rng() {
|
|
25155
|
-
// lazy load so that environments that need to polyfill have a chance to do so
|
|
25156
|
-
if (!getRandomValues) {
|
|
25157
|
-
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
25158
|
-
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
25159
|
-
|
|
25160
|
-
if (!getRandomValues) {
|
|
25161
|
-
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
25162
|
-
}
|
|
25163
|
-
}
|
|
25164
|
-
|
|
25165
|
-
return getRandomValues(rnds8);
|
|
25166
|
-
}
|
|
25167
|
-
|
|
25168
|
-
/***/ }),
|
|
25169
|
-
|
|
25170
|
-
/***/ "./node_modules/uuid/dist/esm-browser/stringify.js":
|
|
25171
|
-
/*!*********************************************************!*\
|
|
25172
|
-
!*** ./node_modules/uuid/dist/esm-browser/stringify.js ***!
|
|
25173
|
-
\*********************************************************/
|
|
25174
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25175
|
-
|
|
25176
|
-
"use strict";
|
|
25177
|
-
__webpack_require__.r(__webpack_exports__);
|
|
25178
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25179
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
|
|
25180
|
-
/* harmony export */ unsafeStringify: () => (/* binding */ unsafeStringify)
|
|
25181
|
-
/* harmony export */ });
|
|
25182
|
-
/* harmony import */ var _validate_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./validate.js */ "./node_modules/uuid/dist/esm-browser/validate.js");
|
|
25183
|
-
|
|
25184
|
-
/**
|
|
25185
|
-
* Convert array of 16 byte values to UUID string format of the form:
|
|
25186
|
-
* XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
|
|
25187
|
-
*/
|
|
25188
|
-
|
|
25189
|
-
const byteToHex = [];
|
|
25190
|
-
|
|
25191
|
-
for (let i = 0; i < 256; ++i) {
|
|
25192
|
-
byteToHex.push((i + 0x100).toString(16).slice(1));
|
|
25193
|
-
}
|
|
25194
|
-
|
|
25195
|
-
function unsafeStringify(arr, offset = 0) {
|
|
25196
|
-
// Note: Be careful editing this code! It's been tuned for performance
|
|
25197
|
-
// and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
|
|
25198
|
-
return (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase();
|
|
25199
|
-
}
|
|
25200
|
-
|
|
25201
|
-
function stringify(arr, offset = 0) {
|
|
25202
|
-
const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one
|
|
25203
|
-
// of the following:
|
|
25204
|
-
// - One or more input array values don't map to a hex octet (leading to
|
|
25205
|
-
// "undefined" in the uuid)
|
|
25206
|
-
// - Invalid input values for the RFC `version` or `variant` fields
|
|
25207
|
-
|
|
25208
|
-
if (!(0,_validate_js__WEBPACK_IMPORTED_MODULE_0__["default"])(uuid)) {
|
|
25209
|
-
throw TypeError('Stringified UUID is invalid');
|
|
25210
|
-
}
|
|
25211
|
-
|
|
25212
|
-
return uuid;
|
|
25213
|
-
}
|
|
25214
|
-
|
|
25215
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (stringify);
|
|
25216
|
-
|
|
25217
|
-
/***/ }),
|
|
25218
|
-
|
|
25219
|
-
/***/ "./node_modules/uuid/dist/esm-browser/v4.js":
|
|
25220
|
-
/*!**************************************************!*\
|
|
25221
|
-
!*** ./node_modules/uuid/dist/esm-browser/v4.js ***!
|
|
25222
|
-
\**************************************************/
|
|
25223
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25224
|
-
|
|
25225
|
-
"use strict";
|
|
25226
|
-
__webpack_require__.r(__webpack_exports__);
|
|
25227
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25228
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
25229
|
-
/* harmony export */ });
|
|
25230
|
-
/* harmony import */ var _native_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./native.js */ "./node_modules/uuid/dist/esm-browser/native.js");
|
|
25231
|
-
/* harmony import */ var _rng_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./rng.js */ "./node_modules/uuid/dist/esm-browser/rng.js");
|
|
25232
|
-
/* harmony import */ var _stringify_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./stringify.js */ "./node_modules/uuid/dist/esm-browser/stringify.js");
|
|
25233
|
-
|
|
25234
|
-
|
|
25235
|
-
|
|
25236
|
-
|
|
25237
|
-
function v4(options, buf, offset) {
|
|
25238
|
-
if (_native_js__WEBPACK_IMPORTED_MODULE_0__["default"].randomUUID && !buf && !options) {
|
|
25239
|
-
return _native_js__WEBPACK_IMPORTED_MODULE_0__["default"].randomUUID();
|
|
25240
|
-
}
|
|
25241
|
-
|
|
25242
|
-
options = options || {};
|
|
25243
|
-
const rnds = options.random || (options.rng || _rng_js__WEBPACK_IMPORTED_MODULE_1__["default"])(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
|
|
25244
|
-
|
|
25245
|
-
rnds[6] = rnds[6] & 0x0f | 0x40;
|
|
25246
|
-
rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
|
|
25247
|
-
|
|
25248
|
-
if (buf) {
|
|
25249
|
-
offset = offset || 0;
|
|
25250
|
-
|
|
25251
|
-
for (let i = 0; i < 16; ++i) {
|
|
25252
|
-
buf[offset + i] = rnds[i];
|
|
25253
|
-
}
|
|
25254
|
-
|
|
25255
|
-
return buf;
|
|
25256
|
-
}
|
|
25257
|
-
|
|
25258
|
-
return (0,_stringify_js__WEBPACK_IMPORTED_MODULE_2__.unsafeStringify)(rnds);
|
|
25259
|
-
}
|
|
25260
|
-
|
|
25261
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (v4);
|
|
25262
|
-
|
|
25263
|
-
/***/ }),
|
|
25264
|
-
|
|
25265
|
-
/***/ "./node_modules/uuid/dist/esm-browser/validate.js":
|
|
25266
|
-
/*!********************************************************!*\
|
|
25267
|
-
!*** ./node_modules/uuid/dist/esm-browser/validate.js ***!
|
|
25268
|
-
\********************************************************/
|
|
25269
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
25270
|
-
|
|
25271
|
-
"use strict";
|
|
25272
|
-
__webpack_require__.r(__webpack_exports__);
|
|
25273
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
25274
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
25275
|
-
/* harmony export */ });
|
|
25276
|
-
/* harmony import */ var _regex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./regex.js */ "./node_modules/uuid/dist/esm-browser/regex.js");
|
|
25277
|
-
|
|
25278
|
-
|
|
25279
|
-
function validate(uuid) {
|
|
25280
|
-
return typeof uuid === 'string' && _regex_js__WEBPACK_IMPORTED_MODULE_0__["default"].test(uuid);
|
|
25281
|
-
}
|
|
25282
|
-
|
|
25283
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (validate);
|
|
25284
|
-
|
|
25285
|
-
/***/ }),
|
|
25286
|
-
|
|
25287
|
-
/***/ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/beep.wav":
|
|
25288
|
-
/*!**************************************************************************!*\
|
|
25289
|
-
!*** ./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/beep.wav ***!
|
|
25290
|
-
\**************************************************************************/
|
|
25291
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25292
|
-
|
|
25293
|
-
"use strict";
|
|
25294
|
-
module.exports = __webpack_require__.p + "beep.wav";
|
|
25295
|
-
|
|
25296
|
-
/***/ }),
|
|
25297
|
-
|
|
25298
|
-
/***/ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/dtmf.wav":
|
|
25299
|
-
/*!**************************************************************************!*\
|
|
25300
|
-
!*** ./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/dtmf.wav ***!
|
|
25301
|
-
\**************************************************************************/
|
|
25302
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25303
|
-
|
|
25304
|
-
"use strict";
|
|
25305
|
-
module.exports = __webpack_require__.p + "dtmf.wav";
|
|
25306
|
-
|
|
25307
|
-
/***/ }),
|
|
25308
|
-
|
|
25309
|
-
/***/ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/ringbacktone.wav":
|
|
25310
|
-
/*!**********************************************************************************!*\
|
|
25311
|
-
!*** ./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/ringbacktone.wav ***!
|
|
25312
|
-
\**********************************************************************************/
|
|
25313
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25314
|
-
|
|
25315
|
-
"use strict";
|
|
25316
|
-
module.exports = __webpack_require__.p + "ringbacktone.wav";
|
|
25317
|
-
|
|
25318
|
-
/***/ }),
|
|
25319
|
-
|
|
25320
|
-
/***/ "./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/ringtone.wav":
|
|
25321
|
-
/*!******************************************************************************!*\
|
|
25322
|
-
!*** ./node_modules/@exotel-npm-dev/webrtc-core-sdk/src/static/ringtone.wav ***!
|
|
25323
|
-
\******************************************************************************/
|
|
25324
|
-
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
25325
|
-
|
|
25326
|
-
"use strict";
|
|
25327
|
-
module.exports = __webpack_require__.p + "ringtone.wav";
|
|
25328
|
-
|
|
25329
25374
|
/***/ })
|
|
25330
25375
|
|
|
25331
25376
|
/******/ });
|
|
@@ -25401,26 +25446,26 @@ module.exports = __webpack_require__.p + "ringtone.wav";
|
|
|
25401
25446
|
/******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + "";
|
|
25402
25447
|
/******/ var document = __webpack_require__.g.document;
|
|
25403
25448
|
/******/ if (!scriptUrl && document) {
|
|
25404
|
-
/******/ if (document.currentScript)
|
|
25449
|
+
/******/ if (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')
|
|
25405
25450
|
/******/ scriptUrl = document.currentScript.src;
|
|
25406
25451
|
/******/ if (!scriptUrl) {
|
|
25407
25452
|
/******/ var scripts = document.getElementsByTagName("script");
|
|
25408
25453
|
/******/ if(scripts.length) {
|
|
25409
25454
|
/******/ var i = scripts.length - 1;
|
|
25410
|
-
/******/ while (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src;
|
|
25455
|
+
/******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
|
|
25411
25456
|
/******/ }
|
|
25412
25457
|
/******/ }
|
|
25413
25458
|
/******/ }
|
|
25414
25459
|
/******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
|
|
25415
25460
|
/******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
|
|
25416
25461
|
/******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
|
|
25417
|
-
/******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
25462
|
+
/******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
|
|
25418
25463
|
/******/ __webpack_require__.p = scriptUrl;
|
|
25419
25464
|
/******/ })();
|
|
25420
25465
|
/******/
|
|
25421
25466
|
/************************************************************************/
|
|
25422
25467
|
var __webpack_exports__ = {};
|
|
25423
|
-
// This entry
|
|
25468
|
+
// This entry needs to be wrapped in an IIFE because it needs to be in strict mode.
|
|
25424
25469
|
(() => {
|
|
25425
25470
|
"use strict";
|
|
25426
25471
|
/*!******************!*\
|