@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
package/lib/simple/Phone.js
CHANGED
|
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
|
|
|
4616
4616
|
}
|
|
4617
4617
|
|
|
4618
4618
|
useLocalVideoElement() {}
|
|
4619
|
+
|
|
4620
|
+
setMediaConstraints() {}
|
|
4619
4621
|
}
|
|
4620
4622
|
|
|
4621
4623
|
/* */
|
|
@@ -6875,6 +6877,12 @@ class WebRTCClient extends Emitter {
|
|
|
6875
6877
|
};
|
|
6876
6878
|
|
|
6877
6879
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
6880
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
6881
|
+
ua.transport.connectPromise.catch((e => {
|
|
6882
|
+
logger$9.warn('Transport connect error', e);
|
|
6883
|
+
}));
|
|
6884
|
+
}
|
|
6885
|
+
|
|
6878
6886
|
ua.transport.onMessage = (rawMessage ) => {
|
|
6879
6887
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
6880
6888
|
|
|
@@ -7096,6 +7104,7 @@ class WebRTCClient extends Emitter {
|
|
|
7096
7104
|
conference,
|
|
7097
7105
|
audioOnly,
|
|
7098
7106
|
},
|
|
7107
|
+
earlyMedia: true,
|
|
7099
7108
|
};
|
|
7100
7109
|
|
|
7101
7110
|
if (audioOnly) {
|
|
@@ -11884,10 +11893,15 @@ class Participant extends Emitter {
|
|
|
11884
11893
|
}
|
|
11885
11894
|
}
|
|
11886
11895
|
|
|
11887
|
-
broadcastStatus(inboundStatus = null) {
|
|
11896
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
11888
11897
|
const status = inboundStatus || this.getStatus();
|
|
11889
11898
|
logger$4.info('broadcasting participant status', { callId: this.callId, status });
|
|
11890
11899
|
|
|
11900
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
11901
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
11902
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
11903
|
+
}
|
|
11904
|
+
|
|
11891
11905
|
this.room.sendSignal({
|
|
11892
11906
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
11893
11907
|
origin: this.callId,
|
|
@@ -12530,7 +12544,7 @@ class Room$1 extends Emitter {
|
|
|
12530
12544
|
// callId is null, someone's requesting everyone's state;
|
|
12531
12545
|
// or callId is set and matches ours;
|
|
12532
12546
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12533
|
-
this.localParticipant.broadcastStatus();
|
|
12547
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12534
12548
|
}
|
|
12535
12549
|
|
|
12536
12550
|
// might as well update the requester's status
|
|
@@ -12632,7 +12646,7 @@ class Room$1 extends Emitter {
|
|
|
12632
12646
|
|
|
12633
12647
|
this.connected = true;
|
|
12634
12648
|
|
|
12635
|
-
localParticipant.broadcastStatus();
|
|
12649
|
+
localParticipant.broadcastStatus(null, true);
|
|
12636
12650
|
|
|
12637
12651
|
// we're in the room, now let's request everyone's status
|
|
12638
12652
|
if (this.localParticipant) {
|
|
@@ -13324,7 +13338,7 @@ SwitchboardCall.STATE = {
|
|
|
13324
13338
|
|
|
13325
13339
|
//
|
|
13326
13340
|
|
|
13327
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13341
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13328
13342
|
|
|
13329
13343
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13330
13344
|
|
|
@@ -13338,6 +13352,7 @@ class Features {
|
|
|
13338
13352
|
|
|
13339
13353
|
|
|
13340
13354
|
|
|
13355
|
+
|
|
13341
13356
|
|
|
13342
13357
|
constructor() {
|
|
13343
13358
|
this._hasChat = true;
|
|
@@ -13346,6 +13361,7 @@ class Features {
|
|
|
13346
13361
|
this._hasFax = true;
|
|
13347
13362
|
this._hasMobileDoubleCall = true;
|
|
13348
13363
|
this._hasMobileGsm = true;
|
|
13364
|
+
this._hasMeeting = true;
|
|
13349
13365
|
}
|
|
13350
13366
|
|
|
13351
13367
|
async fetchAccess() {
|
|
@@ -13366,6 +13382,7 @@ class Features {
|
|
|
13366
13382
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13367
13383
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13368
13384
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13385
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13369
13386
|
}
|
|
13370
13387
|
|
|
13371
13388
|
hasChat() { return this._hasChat; }
|
|
@@ -13374,6 +13391,7 @@ class Features {
|
|
|
13374
13391
|
hasFax() { return this._hasFax; }
|
|
13375
13392
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13376
13393
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13394
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13377
13395
|
|
|
13378
13396
|
_hasFeatures(scopes , featureName ) {
|
|
13379
13397
|
const scopeName = getScopeName(featureName);
|
package/lib/simple/index.js
CHANGED
|
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
|
|
|
4616
4616
|
}
|
|
4617
4617
|
|
|
4618
4618
|
useLocalVideoElement() {}
|
|
4619
|
+
|
|
4620
|
+
setMediaConstraints() {}
|
|
4619
4621
|
}
|
|
4620
4622
|
|
|
4621
4623
|
/* */
|
|
@@ -7206,6 +7208,12 @@ class WebRTCClient extends Emitter {
|
|
|
7206
7208
|
};
|
|
7207
7209
|
|
|
7208
7210
|
const ua = new userAgent.UserAgent(webRTCConfiguration);
|
|
7211
|
+
if (ua.transport && ua.transport.connectPromise) {
|
|
7212
|
+
ua.transport.connectPromise.catch((e => {
|
|
7213
|
+
logger$8.warn('Transport connect error', e);
|
|
7214
|
+
}));
|
|
7215
|
+
}
|
|
7216
|
+
|
|
7209
7217
|
ua.transport.onMessage = (rawMessage ) => {
|
|
7210
7218
|
const message = parser.Parser.parseMessage(rawMessage, ua.transport.logger);
|
|
7211
7219
|
|
|
@@ -7427,6 +7435,7 @@ class WebRTCClient extends Emitter {
|
|
|
7427
7435
|
conference,
|
|
7428
7436
|
audioOnly,
|
|
7429
7437
|
},
|
|
7438
|
+
earlyMedia: true,
|
|
7430
7439
|
};
|
|
7431
7440
|
|
|
7432
7441
|
if (audioOnly) {
|
|
@@ -12302,10 +12311,15 @@ class Participant extends Emitter {
|
|
|
12302
12311
|
}
|
|
12303
12312
|
}
|
|
12304
12313
|
|
|
12305
|
-
broadcastStatus(inboundStatus = null) {
|
|
12314
|
+
broadcastStatus(inboundStatus = null, sendReinvite ) {
|
|
12306
12315
|
const status = inboundStatus || this.getStatus();
|
|
12307
12316
|
logger$3.info('broadcasting participant status', { callId: this.callId, status });
|
|
12308
12317
|
|
|
12318
|
+
if (sendReinvite && !this.streams.length && Phone$1.phone) {
|
|
12319
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
12320
|
+
Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
|
|
12321
|
+
}
|
|
12322
|
+
|
|
12309
12323
|
this.room.sendSignal({
|
|
12310
12324
|
type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
|
|
12311
12325
|
origin: this.callId,
|
|
@@ -12948,7 +12962,7 @@ class Room$1 extends Emitter {
|
|
|
12948
12962
|
// callId is null, someone's requesting everyone's state;
|
|
12949
12963
|
// or callId is set and matches ours;
|
|
12950
12964
|
if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
|
|
12951
|
-
this.localParticipant.broadcastStatus();
|
|
12965
|
+
this.localParticipant.broadcastStatus(null, true);
|
|
12952
12966
|
}
|
|
12953
12967
|
|
|
12954
12968
|
// might as well update the requester's status
|
|
@@ -13050,7 +13064,7 @@ class Room$1 extends Emitter {
|
|
|
13050
13064
|
|
|
13051
13065
|
this.connected = true;
|
|
13052
13066
|
|
|
13053
|
-
localParticipant.broadcastStatus();
|
|
13067
|
+
localParticipant.broadcastStatus(null, true);
|
|
13054
13068
|
|
|
13055
13069
|
// we're in the room, now let's request everyone's status
|
|
13056
13070
|
if (this.localParticipant) {
|
|
@@ -13734,7 +13748,7 @@ SwitchboardCall.STATE = {
|
|
|
13734
13748
|
|
|
13735
13749
|
//
|
|
13736
13750
|
|
|
13737
|
-
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
|
|
13751
|
+
const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
|
|
13738
13752
|
|
|
13739
13753
|
const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
|
|
13740
13754
|
|
|
@@ -13748,6 +13762,7 @@ class Features {
|
|
|
13748
13762
|
|
|
13749
13763
|
|
|
13750
13764
|
|
|
13765
|
+
|
|
13751
13766
|
|
|
13752
13767
|
constructor() {
|
|
13753
13768
|
this._hasChat = true;
|
|
@@ -13756,6 +13771,7 @@ class Features {
|
|
|
13756
13771
|
this._hasFax = true;
|
|
13757
13772
|
this._hasMobileDoubleCall = true;
|
|
13758
13773
|
this._hasMobileGsm = true;
|
|
13774
|
+
this._hasMeeting = true;
|
|
13759
13775
|
}
|
|
13760
13776
|
|
|
13761
13777
|
async fetchAccess() {
|
|
@@ -13776,6 +13792,7 @@ class Features {
|
|
|
13776
13792
|
this._hasFax = this._hasFeatures(scopes, 'fax');
|
|
13777
13793
|
this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
|
|
13778
13794
|
this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
|
|
13795
|
+
this._hasMeeting = this._hasFeatures(scopes, 'meeting');
|
|
13779
13796
|
}
|
|
13780
13797
|
|
|
13781
13798
|
hasChat() { return this._hasChat; }
|
|
@@ -13784,6 +13801,7 @@ class Features {
|
|
|
13784
13801
|
hasFax() { return this._hasFax; }
|
|
13785
13802
|
hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
|
|
13786
13803
|
hasMobileGsm() { return this._hasMobileGsm; }
|
|
13804
|
+
hasMeeting() { return this._hasMeeting; }
|
|
13787
13805
|
|
|
13788
13806
|
_hasFeatures(scopes , featureName ) {
|
|
13789
13807
|
const scopeName = getScopeName(featureName);
|