@wazo/sdk 0.38.12 → 0.38.15
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/dist/wazo-sdk.js +2 -2
- package/esm/__tests__/web-rtc-client.test.js +7 -0
- package/esm/checker/Checker.js +7 -0
- package/esm/checker/checks/index.js +7 -0
- package/esm/checker/checks/webrtc-transport.js +7 -0
- package/esm/checker/checks/webrtc.js +7 -0
- package/esm/domain/Features.js +5 -1
- package/esm/domain/Phone/CTIPhone.js +2 -0
- package/esm/index.js +22 -4
- package/esm/simple/Auth.js +22 -4
- package/esm/simple/Configuration.js +22 -4
- package/esm/simple/Phone.js +22 -4
- package/esm/simple/index.js +22 -4
- package/esm/simple/room/LocalParticipant.js +5525 -5507
- package/esm/simple/room/Participant.js +5529 -5511
- package/esm/simple/room/RemoteParticipant.js +22 -4
- package/esm/simple/room/Room.js +22 -4
- package/esm/simple/room/SipRoom.js +22 -4
- package/esm/simple/room/Stream.js +22 -4
- package/esm/simple/room/__tests__/Participant.test.js +22 -4
- package/esm/simple/room/__tests__/RemoteParticipant.test.js +22 -4
- package/esm/simple/utils.js +22 -4
- package/esm/web-rtc-client.js +7 -0
- package/lib/__tests__/web-rtc-client.test.js +7 -0
- package/lib/checker/Checker.js +7 -0
- package/lib/checker/checks/index.js +7 -0
- package/lib/checker/checks/webrtc-transport.js +7 -0
- package/lib/checker/checks/webrtc.js +7 -0
- package/lib/domain/Features.js +5 -1
- package/lib/domain/Phone/CTIPhone.js +2 -0
- package/lib/index.js +22 -4
- package/lib/simple/Auth.js +22 -4
- package/lib/simple/Configuration.js +22 -4
- package/lib/simple/Phone.js +22 -4
- package/lib/simple/index.js +22 -4
- package/lib/simple/room/LocalParticipant.js +6451 -6433
- package/lib/simple/room/Participant.js +7352 -7334
- package/lib/simple/room/RemoteParticipant.js +22 -4
- package/lib/simple/room/Room.js +22 -4
- package/lib/simple/room/SipRoom.js +22 -4
- package/lib/simple/room/Stream.js +22 -4
- package/lib/simple/room/__tests__/Participant.test.js +22 -4
- package/lib/simple/room/__tests__/RemoteParticipant.test.js +22 -4
- package/lib/simple/utils.js +22 -4
- package/lib/web-rtc-client.js +7 -0
- package/package.json +1 -1
- package/src/domain/Features.js +5 -1
- package/src/domain/Phone/CTIPhone.js +2 -0
- package/src/domain/Phone/Phone.js +2 -0
- package/src/simple/room/Participant.js +7 -1
- package/src/simple/room/Room.js +2 -2
- package/src/web-rtc-client.js +7 -0
|
@@ -5783,6 +5783,12 @@ class WebRTCClient extends Emitter {
|
|
|
5783
5783
|
};
|
|
5784
5784
|
|
|
5785
5785
|
const ua = new UserAgent(webRTCConfiguration);
|
|
5786
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
5787
|
+
ua.transport.connectPromise.catch((e => {
|
|
5788
|
+
logger.warn('Transport connect error', e);
|
|
5789
|
+
}));
|
|
5790
|
+
}
|
|
5791
|
+
|
|
5786
5792
|
ua.transport.onMessage = (rawMessage ) => {
|
|
5787
5793
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
5788
5794
|
|
|
@@ -6004,6 +6010,7 @@ class WebRTCClient extends Emitter {
|
|
|
6004
6010
|
conference,
|
|
6005
6011
|
audioOnly,
|
|
6006
6012
|
},
|
|
6013
|
+
earlyMedia: true,
|
|
6007
6014
|
};
|
|
6008
6015
|
|
|
6009
6016
|
if (audioOnly) {
|
package/esm/checker/Checker.js
CHANGED
|
@@ -6370,6 +6370,12 @@ class WebRTCClient extends Emitter {
|
|
|
6370
6370
|
};
|
|
6371
6371
|
|
|
6372
6372
|
const ua = new UserAgent(webRTCConfiguration);
|
|
6373
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6374
|
+
ua.transport.connectPromise.catch((e => {
|
|
6375
|
+
logger$1.warn('Transport connect error', e);
|
|
6376
|
+
}));
|
|
6377
|
+
}
|
|
6378
|
+
|
|
6373
6379
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6374
6380
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6375
6381
|
|
|
@@ -6591,6 +6597,7 @@ class WebRTCClient extends Emitter {
|
|
|
6591
6597
|
conference,
|
|
6592
6598
|
audioOnly,
|
|
6593
6599
|
},
|
|
6600
|
+
earlyMedia: true,
|
|
6594
6601
|
};
|
|
6595
6602
|
|
|
6596
6603
|
if (audioOnly) {
|
|
@@ -6370,6 +6370,12 @@ class WebRTCClient extends Emitter {
|
|
|
6370
6370
|
};
|
|
6371
6371
|
|
|
6372
6372
|
const ua = new UserAgent(webRTCConfiguration);
|
|
6373
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6374
|
+
ua.transport.connectPromise.catch((e => {
|
|
6375
|
+
logger.warn('Transport connect error', e);
|
|
6376
|
+
}));
|
|
6377
|
+
}
|
|
6378
|
+
|
|
6373
6379
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6374
6380
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6375
6381
|
|
|
@@ -6591,6 +6597,7 @@ class WebRTCClient extends Emitter {
|
|
|
6591
6597
|
conference,
|
|
6592
6598
|
audioOnly,
|
|
6593
6599
|
},
|
|
6600
|
+
earlyMedia: true,
|
|
6594
6601
|
};
|
|
6595
6602
|
|
|
6596
6603
|
if (audioOnly) {
|
|
@@ -5783,6 +5783,12 @@ class WebRTCClient extends Emitter {
|
|
|
5783
5783
|
};
|
|
5784
5784
|
|
|
5785
5785
|
const ua = new UserAgent(webRTCConfiguration);
|
|
5786
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
5787
|
+
ua.transport.connectPromise.catch((e => {
|
|
5788
|
+
logger.warn('Transport connect error', e);
|
|
5789
|
+
}));
|
|
5790
|
+
}
|
|
5791
|
+
|
|
5786
5792
|
ua.transport.onMessage = (rawMessage ) => {
|
|
5787
5793
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
5788
5794
|
|
|
@@ -6004,6 +6010,7 @@ class WebRTCClient extends Emitter {
|
|
|
6004
6010
|
conference,
|
|
6005
6011
|
audioOnly,
|
|
6006
6012
|
},
|
|
6013
|
+
earlyMedia: true,
|
|
6007
6014
|
};
|
|
6008
6015
|
|
|
6009
6016
|
if (audioOnly) {
|
|
@@ -5783,6 +5783,12 @@ class WebRTCClient extends Emitter {
|
|
|
5783
5783
|
};
|
|
5784
5784
|
|
|
5785
5785
|
const ua = new UserAgent(webRTCConfiguration);
|
|
5786
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
5787
|
+
ua.transport.connectPromise.catch((e => {
|
|
5788
|
+
logger.warn('Transport connect error', e);
|
|
5789
|
+
}));
|
|
5790
|
+
}
|
|
5791
|
+
|
|
5786
5792
|
ua.transport.onMessage = (rawMessage ) => {
|
|
5787
5793
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
5788
5794
|
|
|
@@ -6004,6 +6010,7 @@ class WebRTCClient extends Emitter {
|
|
|
6004
6010
|
conference,
|
|
6005
6011
|
audioOnly,
|
|
6006
6012
|
},
|
|
6013
|
+
earlyMedia: true,
|
|
6007
6014
|
};
|
|
6008
6015
|
|
|
6009
6016
|
if (audioOnly) {
|
package/esm/domain/Features.js
CHANGED
|
@@ -4943,7 +4943,7 @@ var getApiClient = (forServer = null) => {
|
|
|
4943
4943
|
|
|
4944
4944
|
//
|
|
4945
4945
|
|
|
4946
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
4946
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
4947
4947
|
|
|
4948
4948
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
4949
4949
|
|
|
@@ -4957,6 +4957,7 @@ class Features {
|
|
|
4957
4957
|
|
|
4958
4958
|
|
|
4959
4959
|
|
|
4960
|
+
|
|
4960
4961
|
|
|
4961
4962
|
constructor() {
|
|
4962
4963
|
this._hasChat = true;
|
|
@@ -4965,6 +4966,7 @@ class Features {
|
|
|
4965
4966
|
this._hasFax = true;
|
|
4966
4967
|
this._hasMobileDoubleCall = true;
|
|
4967
4968
|
this._hasMobileGsm = true;
|
|
4969
|
+
this._hasMeeting = true;
|
|
4968
4970
|
}
|
|
4969
4971
|
|
|
4970
4972
|
async fetchAccess() {
|
|
@@ -4985,6 +4987,7 @@ class Features {
|
|
|
4985
4987
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
4986
4988
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
4987
4989
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
4990
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
4988
4991
|
}
|
|
4989
4992
|
|
|
4990
4993
|
hasChat() { return this._hasChat; }
|
|
@@ -4993,6 +4996,7 @@ class Features {
|
|
|
4993
4996
|
hasFax() { return this._hasFax; }
|
|
4994
4997
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
4995
4998
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
4999
|
+
hasMeeting() { return this._hasMeeting; }
|
|
4996
5000
|
|
|
4997
5001
|
_hasFeatures(scopes , featureName ) {
|
|
4998
5002
|
const scopeName = getScopeName(featureName);
|
package/esm/index.js
CHANGED
|
@@ -4719,6 +4719,8 @@ class CTIPhone extends Emitter {
|
|
|
4719
4719
|
}
|
|
4720
4720
|
|
|
4721
4721
|
useLocalVideoElement() {}
|
|
4722
|
+
|
|
4723
|
+
setMediaConstraints() {}
|
|
4722
4724
|
}
|
|
4723
4725
|
|
|
4724
4726
|
/* */
|
|
@@ -6687,6 +6689,12 @@ class WebRTCClient extends Emitter {
|
|
|
6687
6689
|
};
|
|
6688
6690
|
|
|
6689
6691
|
const ua = new UserAgent(webRTCConfiguration);
|
|
6692
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6693
|
+
ua.transport.connectPromise.catch((e => {
|
|
6694
|
+
logger$9.warn('Transport connect error', e);
|
|
6695
|
+
}));
|
|
6696
|
+
}
|
|
6697
|
+
|
|
6690
6698
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6691
6699
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6692
6700
|
|
|
@@ -6908,6 +6916,7 @@ class WebRTCClient extends Emitter {
|
|
|
6908
6916
|
conference,
|
|
6909
6917
|
audioOnly,
|
|
6910
6918
|
},
|
|
6919
|
+
earlyMedia: true,
|
|
6911
6920
|
};
|
|
6912
6921
|
|
|
6913
6922
|
if (audioOnly) {
|
|
@@ -9219,7 +9228,7 @@ var COUNTRIES = {
|
|
|
9219
9228
|
|
|
9220
9229
|
//
|
|
9221
9230
|
|
|
9222
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
9231
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
9223
9232
|
|
|
9224
9233
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
9225
9234
|
|
|
@@ -9233,6 +9242,7 @@ class Features {
|
|
|
9233
9242
|
|
|
9234
9243
|
|
|
9235
9244
|
|
|
9245
|
+
|
|
9236
9246
|
|
|
9237
9247
|
constructor() {
|
|
9238
9248
|
this._hasChat = true;
|
|
@@ -9241,6 +9251,7 @@ class Features {
|
|
|
9241
9251
|
this._hasFax = true;
|
|
9242
9252
|
this._hasMobileDoubleCall = true;
|
|
9243
9253
|
this._hasMobileGsm = true;
|
|
9254
|
+
this._hasMeeting = true;
|
|
9244
9255
|
}
|
|
9245
9256
|
|
|
9246
9257
|
async fetchAccess() {
|
|
@@ -9261,6 +9272,7 @@ class Features {
|
|
|
9261
9272
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
9262
9273
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
9263
9274
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
9275
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
9264
9276
|
}
|
|
9265
9277
|
|
|
9266
9278
|
hasChat() { return this._hasChat; }
|
|
@@ -9269,6 +9281,7 @@ class Features {
|
|
|
9269
9281
|
hasFax() { return this._hasFax; }
|
|
9270
9282
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
9271
9283
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
9284
|
+
hasMeeting() { return this._hasMeeting; }
|
|
9272
9285
|
|
|
9273
9286
|
_hasFeatures(scopes , featureName ) {
|
|
9274
9287
|
const scopeName = getScopeName(featureName);
|
|
@@ -13267,10 +13280,15 @@ class Participant extends Emitter {
|
|
|
13267
13280
|
}
|
|
13268
13281
|
}
|
|
13269
13282
|
|
|
13270
|
-
broadcastStatus(inboundStatus = null) {
|
|
13283
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
13271
13284
|
const status = inboundStatus || this.getStatus();
|
|
13272
13285
|
logger$2.info('broadcasting participant status', { callId: this.callId, status });
|
|
13273
13286
|
|
|
13287
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
13288
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
13289
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
13290
|
+
}
|
|
13291
|
+
|
|
13274
13292
|
this.room.sendSignal({
|
|
13275
13293
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
13276
13294
|
origin: this.callId,
|
|
@@ -13913,7 +13931,7 @@ class Room extends Emitter {
|
|
|
13913
13931
|
// callId is null, someone's requesting everyone's state;
|
|
13914
13932
|
// or callId is set and matches ours;
|
|
13915
13933
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
13916
|
-
this.localParticipant.broadcastStatus();
|
|
13934
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
13917
13935
|
}
|
|
13918
13936
|
|
|
13919
13937
|
// might as well update the requester's status
|
|
@@ -14015,7 +14033,7 @@ class Room extends Emitter {
|
|
|
14015
14033
|
|
|
14016
14034
|
this.connected = true;
|
|
14017
14035
|
|
|
14018
|
-
localParticipant.broadcastStatus();
|
|
14036
|
+
localParticipant.broadcastStatus(null, true);
|
|
14019
14037
|
|
|
14020
14038
|
// we're in the room, now let's request everyone's status
|
|
14021
14039
|
if (this.localParticipant) {
|
package/esm/simple/Auth.js
CHANGED
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -6865,6 +6867,12 @@ class WebRTCClient extends Emitter {
|
|
|
6865
6867
|
};
|
|
6866
6868
|
|
|
6867
6869
|
const ua = new UserAgent(webRTCConfiguration);
|
|
6870
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6871
|
+
ua.transport.connectPromise.catch((e => {
|
|
6872
|
+
logger$9.warn('Transport connect error', e);
|
|
6873
|
+
}));
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6868
6876
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6869
6877
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6870
6878
|
|
|
@@ -7086,6 +7094,7 @@ class WebRTCClient extends Emitter {
|
|
|
7086
7094
|
conference,
|
|
7087
7095
|
audioOnly,
|
|
7088
7096
|
},
|
|
7097
|
+
earlyMedia: true,
|
|
7089
7098
|
};
|
|
7090
7099
|
|
|
7091
7100
|
if (audioOnly) {
|
|
@@ -11961,10 +11970,15 @@ class Participant extends Emitter {
|
|
|
11961
11970
|
}
|
|
11962
11971
|
}
|
|
11963
11972
|
|
|
11964
|
-
broadcastStatus(inboundStatus = null) {
|
|
11973
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
11965
11974
|
const status = inboundStatus || this.getStatus();
|
|
11966
11975
|
logger$4.info('broadcasting participant status', { callId: this.callId, status });
|
|
11967
11976
|
|
|
11977
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
11978
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
11979
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
11980
|
+
}
|
|
11981
|
+
|
|
11968
11982
|
this.room.sendSignal({
|
|
11969
11983
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
11970
11984
|
origin: this.callId,
|
|
@@ -12607,7 +12621,7 @@ class Room$1 extends Emitter {
|
|
|
12607
12621
|
// callId is null, someone's requesting everyone's state;
|
|
12608
12622
|
// or callId is set and matches ours;
|
|
12609
12623
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12610
|
-
this.localParticipant.broadcastStatus();
|
|
12624
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12611
12625
|
}
|
|
12612
12626
|
|
|
12613
12627
|
// might as well update the requester's status
|
|
@@ -12709,7 +12723,7 @@ class Room$1 extends Emitter {
|
|
|
12709
12723
|
|
|
12710
12724
|
this.connected = true;
|
|
12711
12725
|
|
|
12712
|
-
localParticipant.broadcastStatus();
|
|
12726
|
+
localParticipant.broadcastStatus(null, true);
|
|
12713
12727
|
|
|
12714
12728
|
// we're in the room, now let's request everyone's status
|
|
12715
12729
|
if (this.localParticipant) {
|
|
@@ -13393,7 +13407,7 @@ SwitchboardCall.STATE = {
|
|
|
13393
13407
|
|
|
13394
13408
|
//
|
|
13395
13409
|
|
|
13396
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13410
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13397
13411
|
|
|
13398
13412
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13399
13413
|
|
|
@@ -13407,6 +13421,7 @@ class Features {
|
|
|
13407
13421
|
|
|
13408
13422
|
|
|
13409
13423
|
|
|
13424
|
+
|
|
13410
13425
|
|
|
13411
13426
|
constructor() {
|
|
13412
13427
|
this._hasChat = true;
|
|
@@ -13415,6 +13430,7 @@ class Features {
|
|
|
13415
13430
|
this._hasFax = true;
|
|
13416
13431
|
this._hasMobileDoubleCall = true;
|
|
13417
13432
|
this._hasMobileGsm = true;
|
|
13433
|
+
this._hasMeeting = true;
|
|
13418
13434
|
}
|
|
13419
13435
|
|
|
13420
13436
|
async fetchAccess() {
|
|
@@ -13435,6 +13451,7 @@ class Features {
|
|
|
13435
13451
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13436
13452
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13437
13453
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13454
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13438
13455
|
}
|
|
13439
13456
|
|
|
13440
13457
|
hasChat() { return this._hasChat; }
|
|
@@ -13443,6 +13460,7 @@ class Features {
|
|
|
13443
13460
|
hasFax() { return this._hasFax; }
|
|
13444
13461
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13445
13462
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13463
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13446
13464
|
|
|
13447
13465
|
_hasFeatures(scopes , featureName ) {
|
|
13448
13466
|
const scopeName = getScopeName(featureName);
|
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -6865,6 +6867,12 @@ class WebRTCClient extends Emitter {
|
|
|
6865
6867
|
};
|
|
6866
6868
|
|
|
6867
6869
|
const ua = new UserAgent(webRTCConfiguration);
|
|
6870
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6871
|
+
ua.transport.connectPromise.catch((e => {
|
|
6872
|
+
logger$9.warn('Transport connect error', e);
|
|
6873
|
+
}));
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6868
6876
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6869
6877
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6870
6878
|
|
|
@@ -7086,6 +7094,7 @@ class WebRTCClient extends Emitter {
|
|
|
7086
7094
|
conference,
|
|
7087
7095
|
audioOnly,
|
|
7088
7096
|
},
|
|
7097
|
+
earlyMedia: true,
|
|
7089
7098
|
};
|
|
7090
7099
|
|
|
7091
7100
|
if (audioOnly) {
|
|
@@ -11961,10 +11970,15 @@ class Participant extends Emitter {
|
|
|
11961
11970
|
}
|
|
11962
11971
|
}
|
|
11963
11972
|
|
|
11964
|
-
broadcastStatus(inboundStatus = null) {
|
|
11973
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
11965
11974
|
const status = inboundStatus || this.getStatus();
|
|
11966
11975
|
logger$4.info('broadcasting participant status', { callId: this.callId, status });
|
|
11967
11976
|
|
|
11977
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
11978
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
11979
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
11980
|
+
}
|
|
11981
|
+
|
|
11968
11982
|
this.room.sendSignal({
|
|
11969
11983
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
11970
11984
|
origin: this.callId,
|
|
@@ -12607,7 +12621,7 @@ class Room$1 extends Emitter {
|
|
|
12607
12621
|
// callId is null, someone's requesting everyone's state;
|
|
12608
12622
|
// or callId is set and matches ours;
|
|
12609
12623
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12610
|
-
this.localParticipant.broadcastStatus();
|
|
12624
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12611
12625
|
}
|
|
12612
12626
|
|
|
12613
12627
|
// might as well update the requester's status
|
|
@@ -12709,7 +12723,7 @@ class Room$1 extends Emitter {
|
|
|
12709
12723
|
|
|
12710
12724
|
this.connected = true;
|
|
12711
12725
|
|
|
12712
|
-
localParticipant.broadcastStatus();
|
|
12726
|
+
localParticipant.broadcastStatus(null, true);
|
|
12713
12727
|
|
|
12714
12728
|
// we're in the room, now let's request everyone's status
|
|
12715
12729
|
if (this.localParticipant) {
|
|
@@ -13376,7 +13390,7 @@ SwitchboardCall.STATE = {
|
|
|
13376
13390
|
|
|
13377
13391
|
//
|
|
13378
13392
|
|
|
13379
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13393
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13380
13394
|
|
|
13381
13395
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13382
13396
|
|
|
@@ -13390,6 +13404,7 @@ class Features {
|
|
|
13390
13404
|
|
|
13391
13405
|
|
|
13392
13406
|
|
|
13407
|
+
|
|
13393
13408
|
|
|
13394
13409
|
constructor() {
|
|
13395
13410
|
this._hasChat = true;
|
|
@@ -13398,6 +13413,7 @@ class Features {
|
|
|
13398
13413
|
this._hasFax = true;
|
|
13399
13414
|
this._hasMobileDoubleCall = true;
|
|
13400
13415
|
this._hasMobileGsm = true;
|
|
13416
|
+
this._hasMeeting = true;
|
|
13401
13417
|
}
|
|
13402
13418
|
|
|
13403
13419
|
async fetchAccess() {
|
|
@@ -13418,6 +13434,7 @@ class Features {
|
|
|
13418
13434
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13419
13435
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13420
13436
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13437
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13421
13438
|
}
|
|
13422
13439
|
|
|
13423
13440
|
hasChat() { return this._hasChat; }
|
|
@@ -13426,6 +13443,7 @@ class Features {
|
|
|
13426
13443
|
hasFax() { return this._hasFax; }
|
|
13427
13444
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13428
13445
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13446
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13429
13447
|
|
|
13430
13448
|
_hasFeatures(scopes , featureName ) {
|
|
13431
13449
|
const scopeName = getScopeName(featureName);
|
package/esm/simple/Phone.js
CHANGED
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -6865,6 +6867,12 @@ class WebRTCClient extends Emitter {
|
|
|
6865
6867
|
};
|
|
6866
6868
|
|
|
6867
6869
|
const ua = new UserAgent(webRTCConfiguration);
|
|
6870
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6871
|
+
ua.transport.connectPromise.catch((e => {
|
|
6872
|
+
logger$9.warn('Transport connect error', e);
|
|
6873
|
+
}));
|
|
6874
|
+
}
|
|
6875
|
+
|
|
6868
6876
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6869
6877
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6870
6878
|
|
|
@@ -7086,6 +7094,7 @@ class WebRTCClient extends Emitter {
|
|
|
7086
7094
|
conference,
|
|
7087
7095
|
audioOnly,
|
|
7088
7096
|
},
|
|
7097
|
+
earlyMedia: true,
|
|
7089
7098
|
};
|
|
7090
7099
|
|
|
7091
7100
|
if (audioOnly) {
|
|
@@ -11874,10 +11883,15 @@ class Participant extends Emitter {
|
|
|
11874
11883
|
}
|
|
11875
11884
|
}
|
|
11876
11885
|
|
|
11877
|
-
broadcastStatus(inboundStatus = null) {
|
|
11886
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
11878
11887
|
const status = inboundStatus || this.getStatus();
|
|
11879
11888
|
logger$4.info('broadcasting participant status', { callId: this.callId, status });
|
|
11880
11889
|
|
|
11890
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
11891
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
11892
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
11893
|
+
}
|
|
11894
|
+
|
|
11881
11895
|
this.room.sendSignal({
|
|
11882
11896
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
11883
11897
|
origin: this.callId,
|
|
@@ -12520,7 +12534,7 @@ class Room$1 extends Emitter {
|
|
|
12520
12534
|
// callId is null, someone's requesting everyone's state;
|
|
12521
12535
|
// or callId is set and matches ours;
|
|
12522
12536
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12523
|
-
this.localParticipant.broadcastStatus();
|
|
12537
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12524
12538
|
}
|
|
12525
12539
|
|
|
12526
12540
|
// might as well update the requester's status
|
|
@@ -12622,7 +12636,7 @@ class Room$1 extends Emitter {
|
|
|
12622
12636
|
|
|
12623
12637
|
this.connected = true;
|
|
12624
12638
|
|
|
12625
|
-
localParticipant.broadcastStatus();
|
|
12639
|
+
localParticipant.broadcastStatus(null, true);
|
|
12626
12640
|
|
|
12627
12641
|
// we're in the room, now let's request everyone's status
|
|
12628
12642
|
if (this.localParticipant) {
|
|
@@ -13314,7 +13328,7 @@ SwitchboardCall.STATE = {
|
|
|
13314
13328
|
|
|
13315
13329
|
//
|
|
13316
13330
|
|
|
13317
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13331
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13318
13332
|
|
|
13319
13333
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13320
13334
|
|
|
@@ -13328,6 +13342,7 @@ class Features {
|
|
|
13328
13342
|
|
|
13329
13343
|
|
|
13330
13344
|
|
|
13345
|
+
|
|
13331
13346
|
|
|
13332
13347
|
constructor() {
|
|
13333
13348
|
this._hasChat = true;
|
|
@@ -13336,6 +13351,7 @@ class Features {
|
|
|
13336
13351
|
this._hasFax = true;
|
|
13337
13352
|
this._hasMobileDoubleCall = true;
|
|
13338
13353
|
this._hasMobileGsm = true;
|
|
13354
|
+
this._hasMeeting = true;
|
|
13339
13355
|
}
|
|
13340
13356
|
|
|
13341
13357
|
async fetchAccess() {
|
|
@@ -13356,6 +13372,7 @@ class Features {
|
|
|
13356
13372
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13357
13373
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13358
13374
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13375
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13359
13376
|
}
|
|
13360
13377
|
|
|
13361
13378
|
hasChat() { return this._hasChat; }
|
|
@@ -13364,6 +13381,7 @@ class Features {
|
|
|
13364
13381
|
hasFax() { return this._hasFax; }
|
|
13365
13382
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13366
13383
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13384
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13367
13385
|
|
|
13368
13386
|
_hasFeatures(scopes , featureName ) {
|
|
13369
13387
|
const scopeName = getScopeName(featureName);
|
package/esm/simple/index.js
CHANGED
|
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
|
|
|
4606
4606
|
}
|
|
4607
4607
|
|
|
4608
4608
|
useLocalVideoElement() {}
|
|
4609
|
+
|
|
4610
|
+
setMediaConstraints() {}
|
|
4609
4611
|
}
|
|
4610
4612
|
|
|
4611
4613
|
/* */
|
|
@@ -7196,6 +7198,12 @@ class WebRTCClient extends Emitter {
|
|
|
7196
7198
|
};
|
|
7197
7199
|
|
|
7198
7200
|
const ua = new UserAgent(webRTCConfiguration);
|
|
7201
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
7202
|
+
ua.transport.connectPromise.catch((e => {
|
|
7203
|
+
logger$8.warn('Transport connect error', e);
|
|
7204
|
+
}));
|
|
7205
|
+
}
|
|
7206
|
+
|
|
7199
7207
|
ua.transport.onMessage = (rawMessage ) => {
|
|
7200
7208
|
const message = Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
7201
7209
|
|
|
@@ -7417,6 +7425,7 @@ class WebRTCClient extends Emitter {
|
|
|
7417
7425
|
conference,
|
|
7418
7426
|
audioOnly,
|
|
7419
7427
|
},
|
|
7428
|
+
earlyMedia: true,
|
|
7420
7429
|
};
|
|
7421
7430
|
|
|
7422
7431
|
if (audioOnly) {
|
|
@@ -12292,10 +12301,15 @@ class Participant extends Emitter {
|
|
|
12292
12301
|
}
|
|
12293
12302
|
}
|
|
12294
12303
|
|
|
12295
|
-
broadcastStatus(inboundStatus = null) {
|
|
12304
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
12296
12305
|
const status = inboundStatus || this.getStatus();
|
|
12297
12306
|
logger$3.info('broadcasting participant status', { callId: this.callId, status });
|
|
12298
12307
|
|
|
12308
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
12309
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12310
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
12311
|
+
}
|
|
12312
|
+
|
|
12299
12313
|
this.room.sendSignal({
|
|
12300
12314
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
12301
12315
|
origin: this.callId,
|
|
@@ -12938,7 +12952,7 @@ class Room$1 extends Emitter {
|
|
|
12938
12952
|
// callId is null, someone's requesting everyone's state;
|
|
12939
12953
|
// or callId is set and matches ours;
|
|
12940
12954
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12941
|
-
this.localParticipant.broadcastStatus();
|
|
12955
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12942
12956
|
}
|
|
12943
12957
|
|
|
12944
12958
|
// might as well update the requester's status
|
|
@@ -13040,7 +13054,7 @@ class Room$1 extends Emitter {
|
|
|
13040
13054
|
|
|
13041
13055
|
this.connected = true;
|
|
13042
13056
|
|
|
13043
|
-
localParticipant.broadcastStatus();
|
|
13057
|
+
localParticipant.broadcastStatus(null, true);
|
|
13044
13058
|
|
|
13045
13059
|
// we're in the room, now let's request everyone's status
|
|
13046
13060
|
if (this.localParticipant) {
|
|
@@ -13724,7 +13738,7 @@ SwitchboardCall.STATE = {
|
|
|
13724
13738
|
|
|
13725
13739
|
//
|
|
13726
13740
|
|
|
13727
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13741
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13728
13742
|
|
|
13729
13743
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13730
13744
|
|
|
@@ -13738,6 +13752,7 @@ class Features {
|
|
|
13738
13752
|
|
|
13739
13753
|
|
|
13740
13754
|
|
|
13755
|
+
|
|
13741
13756
|
|
|
13742
13757
|
constructor() {
|
|
13743
13758
|
this._hasChat = true;
|
|
@@ -13746,6 +13761,7 @@ class Features {
|
|
|
13746
13761
|
this._hasFax = true;
|
|
13747
13762
|
this._hasMobileDoubleCall = true;
|
|
13748
13763
|
this._hasMobileGsm = true;
|
|
13764
|
+
this._hasMeeting = true;
|
|
13749
13765
|
}
|
|
13750
13766
|
|
|
13751
13767
|
async fetchAccess() {
|
|
@@ -13766,6 +13782,7 @@ class Features {
|
|
|
13766
13782
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13767
13783
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13768
13784
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13785
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13769
13786
|
}
|
|
13770
13787
|
|
|
13771
13788
|
hasChat() { return this._hasChat; }
|
|
@@ -13774,6 +13791,7 @@ class Features {
|
|
|
13774
13791
|
hasFax() { return this._hasFax; }
|
|
13775
13792
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13776
13793
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13794
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13777
13795
|
|
|
13778
13796
|
_hasFeatures(scopes , featureName ) {
|
|
13779
13797
|
const scopeName = getScopeName(featureName);
|