@wazo/sdk 0.38.11 → 0.38.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/wazo-sdk.js +4 -4
  2. package/esm/__tests__/web-rtc-client.test.js +2 -1
  3. package/esm/checker/Checker.js +2 -1
  4. package/esm/checker/checks/index.js +2 -1
  5. package/esm/checker/checks/webrtc-transport.js +2 -1
  6. package/esm/checker/checks/webrtc.js +2 -1
  7. package/esm/domain/Features.js +5 -1
  8. package/esm/domain/Phone/CTIPhone.js +2 -0
  9. package/esm/index.js +17 -5
  10. package/esm/simple/Auth.js +17 -5
  11. package/esm/simple/Configuration.js +17 -5
  12. package/esm/simple/Phone.js +17 -5
  13. package/esm/simple/index.js +17 -5
  14. package/esm/simple/room/LocalParticipant.js +5521 -5509
  15. package/esm/simple/room/Participant.js +5519 -5507
  16. package/esm/simple/room/RemoteParticipant.js +17 -5
  17. package/esm/simple/room/Room.js +17 -5
  18. package/esm/simple/room/SipRoom.js +17 -5
  19. package/esm/simple/room/Stream.js +17 -5
  20. package/esm/simple/room/__tests__/Participant.test.js +17 -5
  21. package/esm/simple/room/__tests__/RemoteParticipant.test.js +17 -5
  22. package/esm/simple/utils.js +17 -5
  23. package/esm/web-rtc-client.js +2 -1
  24. package/lib/__tests__/web-rtc-client.test.js +2 -1
  25. package/lib/checker/Checker.js +2 -1
  26. package/lib/checker/checks/index.js +2 -1
  27. package/lib/checker/checks/webrtc-transport.js +2 -1
  28. package/lib/checker/checks/webrtc.js +2 -1
  29. package/lib/domain/Features.js +5 -1
  30. package/lib/domain/Phone/CTIPhone.js +2 -0
  31. package/lib/index.js +17 -5
  32. package/lib/simple/Auth.js +17 -5
  33. package/lib/simple/Configuration.js +17 -5
  34. package/lib/simple/Phone.js +17 -5
  35. package/lib/simple/index.js +17 -5
  36. package/lib/simple/room/LocalParticipant.js +6446 -6434
  37. package/lib/simple/room/Participant.js +6546 -6534
  38. package/lib/simple/room/RemoteParticipant.js +17 -5
  39. package/lib/simple/room/Room.js +17 -5
  40. package/lib/simple/room/SipRoom.js +17 -5
  41. package/lib/simple/room/Stream.js +17 -5
  42. package/lib/simple/room/__tests__/Participant.test.js +17 -5
  43. package/lib/simple/room/__tests__/RemoteParticipant.test.js +17 -5
  44. package/lib/simple/utils.js +17 -5
  45. package/lib/web-rtc-client.js +2 -1
  46. package/package.json +1 -1
  47. package/src/domain/Features.js +5 -1
  48. package/src/domain/Phone/CTIPhone.js +2 -0
  49. package/src/domain/Phone/Phone.js +2 -0
  50. package/src/simple/room/Participant.js +7 -1
  51. package/src/simple/room/Room.js +2 -2
  52. package/src/web-rtc-client.js +2 -1
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
4606
4606
  }
4607
4607
 
4608
4608
  useLocalVideoElement() {}
4609
+
4610
+ setMediaConstraints() {}
4609
4611
  }
4610
4612
 
4611
4613
  /* */
@@ -7417,6 +7419,7 @@ class WebRTCClient extends Emitter {
7417
7419
  conference,
7418
7420
  audioOnly,
7419
7421
  },
7422
+ earlyMedia: true,
7420
7423
  };
7421
7424
 
7422
7425
  if (audioOnly) {
@@ -7781,7 +7784,7 @@ class WebRTCClient extends Emitter {
7781
7784
 
7782
7785
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7783
7786
  } else {
7784
- videoSender = pc.getSenders().find(sender => sender.track === null);
7787
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7785
7788
  }
7786
7789
 
7787
7790
  if (!videoSender) {
@@ -12431,10 +12434,15 @@ class Participant extends Emitter {
12431
12434
  }
12432
12435
  }
12433
12436
 
12434
- broadcastStatus(inboundStatus = null) {
12437
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12435
12438
  const status = inboundStatus || this.getStatus();
12436
12439
  logger$2.info('broadcasting participant status', { callId: this.callId, status });
12437
12440
 
12441
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12442
+ // eslint-disable-next-line no-underscore-dangle
12443
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12444
+ }
12445
+
12438
12446
  this.room.sendSignal({
12439
12447
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12440
12448
  origin: this.callId,
@@ -12877,7 +12885,7 @@ SwitchboardCall.STATE = {
12877
12885
 
12878
12886
  //
12879
12887
 
12880
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
12888
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
12881
12889
 
12882
12890
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
12883
12891
 
@@ -12891,6 +12899,7 @@ class Features {
12891
12899
 
12892
12900
 
12893
12901
 
12902
+
12894
12903
 
12895
12904
  constructor() {
12896
12905
  this._hasChat = true;
@@ -12899,6 +12908,7 @@ class Features {
12899
12908
  this._hasFax = true;
12900
12909
  this._hasMobileDoubleCall = true;
12901
12910
  this._hasMobileGsm = true;
12911
+ this._hasMeeting = true;
12902
12912
  }
12903
12913
 
12904
12914
  async fetchAccess() {
@@ -12919,6 +12929,7 @@ class Features {
12919
12929
  this._hasFax = this._hasFeatures(scopes, 'fax');
12920
12930
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
12921
12931
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
12932
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
12922
12933
  }
12923
12934
 
12924
12935
  hasChat() { return this._hasChat; }
@@ -12927,6 +12938,7 @@ class Features {
12927
12938
  hasFax() { return this._hasFax; }
12928
12939
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
12929
12940
  hasMobileGsm() { return this._hasMobileGsm; }
12941
+ hasMeeting() { return this._hasMeeting; }
12930
12942
 
12931
12943
  _hasFeatures(scopes , featureName ) {
12932
12944
  const scopeName = getScopeName(featureName);
@@ -14480,7 +14492,7 @@ class Room extends Emitter {
14480
14492
  // callId is null, someone's requesting everyone's state;
14481
14493
  // or callId is set and matches ours;
14482
14494
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
14483
- this.localParticipant.broadcastStatus();
14495
+ this.localParticipant.broadcastStatus(null, true);
14484
14496
  }
14485
14497
 
14486
14498
  // might as well update the requester's status
@@ -14582,7 +14594,7 @@ class Room extends Emitter {
14582
14594
 
14583
14595
  this.connected = true;
14584
14596
 
14585
- localParticipant.broadcastStatus();
14597
+ localParticipant.broadcastStatus(null, true);
14586
14598
 
14587
14599
  // we're in the room, now let's request everyone's status
14588
14600
  if (this.localParticipant) {
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
4606
4606
  }
4607
4607
 
4608
4608
  useLocalVideoElement() {}
4609
+
4610
+ setMediaConstraints() {}
4609
4611
  }
4610
4612
 
4611
4613
  /* */
@@ -7417,6 +7419,7 @@ class WebRTCClient extends Emitter {
7417
7419
  conference,
7418
7420
  audioOnly,
7419
7421
  },
7422
+ earlyMedia: true,
7420
7423
  };
7421
7424
 
7422
7425
  if (audioOnly) {
@@ -7781,7 +7784,7 @@ class WebRTCClient extends Emitter {
7781
7784
 
7782
7785
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7783
7786
  } else {
7784
- videoSender = pc.getSenders().find(sender => sender.track === null);
7787
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7785
7788
  }
7786
7789
 
7787
7790
  if (!videoSender) {
@@ -12431,10 +12434,15 @@ class Participant extends Emitter {
12431
12434
  }
12432
12435
  }
12433
12436
 
12434
- broadcastStatus(inboundStatus = null) {
12437
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12435
12438
  const status = inboundStatus || this.getStatus();
12436
12439
  logger$2.info('broadcasting participant status', { callId: this.callId, status });
12437
12440
 
12441
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12442
+ // eslint-disable-next-line no-underscore-dangle
12443
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12444
+ }
12445
+
12438
12446
  this.room.sendSignal({
12439
12447
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12440
12448
  origin: this.callId,
@@ -12888,7 +12896,7 @@ SwitchboardCall.STATE = {
12888
12896
 
12889
12897
  //
12890
12898
 
12891
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
12899
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
12892
12900
 
12893
12901
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
12894
12902
 
@@ -12902,6 +12910,7 @@ class Features {
12902
12910
 
12903
12911
 
12904
12912
 
12913
+
12905
12914
 
12906
12915
  constructor() {
12907
12916
  this._hasChat = true;
@@ -12910,6 +12919,7 @@ class Features {
12910
12919
  this._hasFax = true;
12911
12920
  this._hasMobileDoubleCall = true;
12912
12921
  this._hasMobileGsm = true;
12922
+ this._hasMeeting = true;
12913
12923
  }
12914
12924
 
12915
12925
  async fetchAccess() {
@@ -12930,6 +12940,7 @@ class Features {
12930
12940
  this._hasFax = this._hasFeatures(scopes, 'fax');
12931
12941
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
12932
12942
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
12943
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
12933
12944
  }
12934
12945
 
12935
12946
  hasChat() { return this._hasChat; }
@@ -12938,6 +12949,7 @@ class Features {
12938
12949
  hasFax() { return this._hasFax; }
12939
12950
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
12940
12951
  hasMobileGsm() { return this._hasMobileGsm; }
12952
+ hasMeeting() { return this._hasMeeting; }
12941
12953
 
12942
12954
  _hasFeatures(scopes , featureName ) {
12943
12955
  const scopeName = getScopeName(featureName);
@@ -14491,7 +14503,7 @@ class Room extends Emitter {
14491
14503
  // callId is null, someone's requesting everyone's state;
14492
14504
  // or callId is set and matches ours;
14493
14505
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
14494
- this.localParticipant.broadcastStatus();
14506
+ this.localParticipant.broadcastStatus(null, true);
14495
14507
  }
14496
14508
 
14497
14509
  // might as well update the requester's status
@@ -14593,7 +14605,7 @@ class Room extends Emitter {
14593
14605
 
14594
14606
  this.connected = true;
14595
14607
 
14596
- localParticipant.broadcastStatus();
14608
+ localParticipant.broadcastStatus(null, true);
14597
14609
 
14598
14610
  // we're in the room, now let's request everyone's status
14599
14611
  if (this.localParticipant) {
@@ -4606,6 +4606,8 @@ class CTIPhone extends Emitter {
4606
4606
  }
4607
4607
 
4608
4608
  useLocalVideoElement() {}
4609
+
4610
+ setMediaConstraints() {}
4609
4611
  }
4610
4612
 
4611
4613
  /* */
@@ -7417,6 +7419,7 @@ class WebRTCClient extends Emitter {
7417
7419
  conference,
7418
7420
  audioOnly,
7419
7421
  },
7422
+ earlyMedia: true,
7420
7423
  };
7421
7424
 
7422
7425
  if (audioOnly) {
@@ -7781,7 +7784,7 @@ class WebRTCClient extends Emitter {
7781
7784
 
7782
7785
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7783
7786
  } else {
7784
- videoSender = pc.getSenders().find(sender => sender.track === null);
7787
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7785
7788
  }
7786
7789
 
7787
7790
  if (!videoSender) {
@@ -12292,10 +12295,15 @@ class Participant extends Emitter {
12292
12295
  }
12293
12296
  }
12294
12297
 
12295
- broadcastStatus(inboundStatus = null) {
12298
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12296
12299
  const status = inboundStatus || this.getStatus();
12297
12300
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12298
12301
 
12302
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12303
+ // eslint-disable-next-line no-underscore-dangle
12304
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12305
+ }
12306
+
12299
12307
  this.room.sendSignal({
12300
12308
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12301
12309
  origin: this.callId,
@@ -12938,7 +12946,7 @@ class Room$1 extends Emitter {
12938
12946
  // callId is null, someone's requesting everyone's state;
12939
12947
  // or callId is set and matches ours;
12940
12948
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12941
- this.localParticipant.broadcastStatus();
12949
+ this.localParticipant.broadcastStatus(null, true);
12942
12950
  }
12943
12951
 
12944
12952
  // might as well update the requester's status
@@ -13040,7 +13048,7 @@ class Room$1 extends Emitter {
13040
13048
 
13041
13049
  this.connected = true;
13042
13050
 
13043
- localParticipant.broadcastStatus();
13051
+ localParticipant.broadcastStatus(null, true);
13044
13052
 
13045
13053
  // we're in the room, now let's request everyone's status
13046
13054
  if (this.localParticipant) {
@@ -13585,7 +13593,7 @@ SwitchboardCall.STATE = {
13585
13593
 
13586
13594
  //
13587
13595
 
13588
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13596
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13589
13597
 
13590
13598
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13591
13599
 
@@ -13599,6 +13607,7 @@ class Features {
13599
13607
 
13600
13608
 
13601
13609
 
13610
+
13602
13611
 
13603
13612
  constructor() {
13604
13613
  this._hasChat = true;
@@ -13607,6 +13616,7 @@ class Features {
13607
13616
  this._hasFax = true;
13608
13617
  this._hasMobileDoubleCall = true;
13609
13618
  this._hasMobileGsm = true;
13619
+ this._hasMeeting = true;
13610
13620
  }
13611
13621
 
13612
13622
  async fetchAccess() {
@@ -13627,6 +13637,7 @@ class Features {
13627
13637
  this._hasFax = this._hasFeatures(scopes, 'fax');
13628
13638
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13629
13639
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13640
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13630
13641
  }
13631
13642
 
13632
13643
  hasChat() { return this._hasChat; }
@@ -13635,6 +13646,7 @@ class Features {
13635
13646
  hasFax() { return this._hasFax; }
13636
13647
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13637
13648
  hasMobileGsm() { return this._hasMobileGsm; }
13649
+ hasMeeting() { return this._hasMeeting; }
13638
13650
 
13639
13651
  _hasFeatures(scopes , featureName ) {
13640
13652
  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
  /* */
@@ -7417,6 +7419,7 @@ class WebRTCClient extends Emitter {
7417
7419
  conference,
7418
7420
  audioOnly,
7419
7421
  },
7422
+ earlyMedia: true,
7420
7423
  };
7421
7424
 
7422
7425
  if (audioOnly) {
@@ -7781,7 +7784,7 @@ class WebRTCClient extends Emitter {
7781
7784
 
7782
7785
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7783
7786
  } else {
7784
- videoSender = pc.getSenders().find(sender => sender.track === null);
7787
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7785
7788
  }
7786
7789
 
7787
7790
  if (!videoSender) {
@@ -12292,10 +12295,15 @@ class Participant extends Emitter {
12292
12295
  }
12293
12296
  }
12294
12297
 
12295
- broadcastStatus(inboundStatus = null) {
12298
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12296
12299
  const status = inboundStatus || this.getStatus();
12297
12300
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12298
12301
 
12302
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12303
+ // eslint-disable-next-line no-underscore-dangle
12304
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12305
+ }
12306
+
12299
12307
  this.room.sendSignal({
12300
12308
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12301
12309
  origin: this.callId,
@@ -12938,7 +12946,7 @@ class Room$1 extends Emitter {
12938
12946
  // callId is null, someone's requesting everyone's state;
12939
12947
  // or callId is set and matches ours;
12940
12948
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12941
- this.localParticipant.broadcastStatus();
12949
+ this.localParticipant.broadcastStatus(null, true);
12942
12950
  }
12943
12951
 
12944
12952
  // might as well update the requester's status
@@ -13040,7 +13048,7 @@ class Room$1 extends Emitter {
13040
13048
 
13041
13049
  this.connected = true;
13042
13050
 
13043
- localParticipant.broadcastStatus();
13051
+ localParticipant.broadcastStatus(null, true);
13044
13052
 
13045
13053
  // we're in the room, now let's request everyone's status
13046
13054
  if (this.localParticipant) {
@@ -13666,7 +13674,7 @@ SwitchboardCall.STATE = {
13666
13674
 
13667
13675
  //
13668
13676
 
13669
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13677
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13670
13678
 
13671
13679
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13672
13680
 
@@ -13680,6 +13688,7 @@ class Features {
13680
13688
 
13681
13689
 
13682
13690
 
13691
+
13683
13692
 
13684
13693
  constructor() {
13685
13694
  this._hasChat = true;
@@ -13688,6 +13697,7 @@ class Features {
13688
13697
  this._hasFax = true;
13689
13698
  this._hasMobileDoubleCall = true;
13690
13699
  this._hasMobileGsm = true;
13700
+ this._hasMeeting = true;
13691
13701
  }
13692
13702
 
13693
13703
  async fetchAccess() {
@@ -13708,6 +13718,7 @@ class Features {
13708
13718
  this._hasFax = this._hasFeatures(scopes, 'fax');
13709
13719
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13710
13720
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13721
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13711
13722
  }
13712
13723
 
13713
13724
  hasChat() { return this._hasChat; }
@@ -13716,6 +13727,7 @@ class Features {
13716
13727
  hasFax() { return this._hasFax; }
13717
13728
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13718
13729
  hasMobileGsm() { return this._hasMobileGsm; }
13730
+ hasMeeting() { return this._hasMeeting; }
13719
13731
 
13720
13732
  _hasFeatures(scopes , featureName ) {
13721
13733
  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
  /* */
@@ -7417,6 +7419,7 @@ class WebRTCClient extends Emitter {
7417
7419
  conference,
7418
7420
  audioOnly,
7419
7421
  },
7422
+ earlyMedia: true,
7420
7423
  };
7421
7424
 
7422
7425
  if (audioOnly) {
@@ -7781,7 +7784,7 @@ class WebRTCClient extends Emitter {
7781
7784
 
7782
7785
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7783
7786
  } else {
7784
- videoSender = pc.getSenders().find(sender => sender.track === null);
7787
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7785
7788
  }
7786
7789
 
7787
7790
  if (!videoSender) {
@@ -12292,10 +12295,15 @@ class Participant extends Emitter {
12292
12295
  }
12293
12296
  }
12294
12297
 
12295
- broadcastStatus(inboundStatus = null) {
12298
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12296
12299
  const status = inboundStatus || this.getStatus();
12297
12300
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12298
12301
 
12302
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12303
+ // eslint-disable-next-line no-underscore-dangle
12304
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12305
+ }
12306
+
12299
12307
  this.room.sendSignal({
12300
12308
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12301
12309
  origin: this.callId,
@@ -12938,7 +12946,7 @@ class Room$1 extends Emitter {
12938
12946
  // callId is null, someone's requesting everyone's state;
12939
12947
  // or callId is set and matches ours;
12940
12948
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12941
- this.localParticipant.broadcastStatus();
12949
+ this.localParticipant.broadcastStatus(null, true);
12942
12950
  }
12943
12951
 
12944
12952
  // might as well update the requester's status
@@ -13040,7 +13048,7 @@ class Room$1 extends Emitter {
13040
13048
 
13041
13049
  this.connected = true;
13042
13050
 
13043
- localParticipant.broadcastStatus();
13051
+ localParticipant.broadcastStatus(null, true);
13044
13052
 
13045
13053
  // we're in the room, now let's request everyone's status
13046
13054
  if (this.localParticipant) {
@@ -13724,7 +13732,7 @@ SwitchboardCall.STATE = {
13724
13732
 
13725
13733
  //
13726
13734
 
13727
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13735
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13728
13736
 
13729
13737
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13730
13738
 
@@ -13738,6 +13746,7 @@ class Features {
13738
13746
 
13739
13747
 
13740
13748
 
13749
+
13741
13750
 
13742
13751
  constructor() {
13743
13752
  this._hasChat = true;
@@ -13746,6 +13755,7 @@ class Features {
13746
13755
  this._hasFax = true;
13747
13756
  this._hasMobileDoubleCall = true;
13748
13757
  this._hasMobileGsm = true;
13758
+ this._hasMeeting = true;
13749
13759
  }
13750
13760
 
13751
13761
  async fetchAccess() {
@@ -13766,6 +13776,7 @@ class Features {
13766
13776
  this._hasFax = this._hasFeatures(scopes, 'fax');
13767
13777
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13768
13778
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13779
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13769
13780
  }
13770
13781
 
13771
13782
  hasChat() { return this._hasChat; }
@@ -13774,6 +13785,7 @@ class Features {
13774
13785
  hasFax() { return this._hasFax; }
13775
13786
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13776
13787
  hasMobileGsm() { return this._hasMobileGsm; }
13788
+ hasMeeting() { return this._hasMeeting; }
13777
13789
 
13778
13790
  _hasFeatures(scopes , featureName ) {
13779
13791
  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
  /* */
@@ -7417,6 +7419,7 @@ class WebRTCClient extends Emitter {
7417
7419
  conference,
7418
7420
  audioOnly,
7419
7421
  },
7422
+ earlyMedia: true,
7420
7423
  };
7421
7424
 
7422
7425
  if (audioOnly) {
@@ -7781,7 +7784,7 @@ class WebRTCClient extends Emitter {
7781
7784
 
7782
7785
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7783
7786
  } else {
7784
- videoSender = pc.getSenders().find(sender => sender.track === null);
7787
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7785
7788
  }
7786
7789
 
7787
7790
  if (!videoSender) {
@@ -12292,10 +12295,15 @@ class Participant extends Emitter {
12292
12295
  }
12293
12296
  }
12294
12297
 
12295
- broadcastStatus(inboundStatus = null) {
12298
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12296
12299
  const status = inboundStatus || this.getStatus();
12297
12300
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12298
12301
 
12302
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12303
+ // eslint-disable-next-line no-underscore-dangle
12304
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12305
+ }
12306
+
12299
12307
  this.room.sendSignal({
12300
12308
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12301
12309
  origin: this.callId,
@@ -12938,7 +12946,7 @@ class Room$1 extends Emitter {
12938
12946
  // callId is null, someone's requesting everyone's state;
12939
12947
  // or callId is set and matches ours;
12940
12948
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12941
- this.localParticipant.broadcastStatus();
12949
+ this.localParticipant.broadcastStatus(null, true);
12942
12950
  }
12943
12951
 
12944
12952
  // might as well update the requester's status
@@ -13040,7 +13048,7 @@ class Room$1 extends Emitter {
13040
13048
 
13041
13049
  this.connected = true;
13042
13050
 
13043
- localParticipant.broadcastStatus();
13051
+ localParticipant.broadcastStatus(null, true);
13044
13052
 
13045
13053
  // we're in the room, now let's request everyone's status
13046
13054
  if (this.localParticipant) {
@@ -13724,7 +13732,7 @@ SwitchboardCall.STATE = {
13724
13732
 
13725
13733
  //
13726
13734
 
13727
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13735
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13728
13736
 
13729
13737
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13730
13738
 
@@ -13738,6 +13746,7 @@ class Features {
13738
13746
 
13739
13747
 
13740
13748
 
13749
+
13741
13750
 
13742
13751
  constructor() {
13743
13752
  this._hasChat = true;
@@ -13746,6 +13755,7 @@ class Features {
13746
13755
  this._hasFax = true;
13747
13756
  this._hasMobileDoubleCall = true;
13748
13757
  this._hasMobileGsm = true;
13758
+ this._hasMeeting = true;
13749
13759
  }
13750
13760
 
13751
13761
  async fetchAccess() {
@@ -13766,6 +13776,7 @@ class Features {
13766
13776
  this._hasFax = this._hasFeatures(scopes, 'fax');
13767
13777
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13768
13778
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13779
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13769
13780
  }
13770
13781
 
13771
13782
  hasChat() { return this._hasChat; }
@@ -13774,6 +13785,7 @@ class Features {
13774
13785
  hasFax() { return this._hasFax; }
13775
13786
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13776
13787
  hasMobileGsm() { return this._hasMobileGsm; }
13788
+ hasMeeting() { return this._hasMeeting; }
13777
13789
 
13778
13790
  _hasFeatures(scopes , featureName ) {
13779
13791
  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
  /* */
@@ -7417,6 +7419,7 @@ class WebRTCClient extends Emitter {
7417
7419
  conference,
7418
7420
  audioOnly,
7419
7421
  },
7422
+ earlyMedia: true,
7420
7423
  };
7421
7424
 
7422
7425
  if (audioOnly) {
@@ -7781,7 +7784,7 @@ class WebRTCClient extends Emitter {
7781
7784
 
7782
7785
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7783
7786
  } else {
7784
- videoSender = pc.getSenders().find(sender => sender.track === null);
7787
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7785
7788
  }
7786
7789
 
7787
7790
  if (!videoSender) {
@@ -12292,10 +12295,15 @@ class Participant extends Emitter {
12292
12295
  }
12293
12296
  }
12294
12297
 
12295
- broadcastStatus(inboundStatus = null) {
12298
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12296
12299
  const status = inboundStatus || this.getStatus();
12297
12300
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12298
12301
 
12302
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12303
+ // eslint-disable-next-line no-underscore-dangle
12304
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12305
+ }
12306
+
12299
12307
  this.room.sendSignal({
12300
12308
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12301
12309
  origin: this.callId,
@@ -12938,7 +12946,7 @@ class Room$1 extends Emitter {
12938
12946
  // callId is null, someone's requesting everyone's state;
12939
12947
  // or callId is set and matches ours;
12940
12948
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12941
- this.localParticipant.broadcastStatus();
12949
+ this.localParticipant.broadcastStatus(null, true);
12942
12950
  }
12943
12951
 
12944
12952
  // might as well update the requester's status
@@ -13040,7 +13048,7 @@ class Room$1 extends Emitter {
13040
13048
 
13041
13049
  this.connected = true;
13042
13050
 
13043
- localParticipant.broadcastStatus();
13051
+ localParticipant.broadcastStatus(null, true);
13044
13052
 
13045
13053
  // we're in the room, now let's request everyone's status
13046
13054
  if (this.localParticipant) {
@@ -13708,7 +13716,7 @@ SwitchboardCall.STATE = {
13708
13716
 
13709
13717
  //
13710
13718
 
13711
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13719
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13712
13720
 
13713
13721
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13714
13722
 
@@ -13722,6 +13730,7 @@ class Features {
13722
13730
 
13723
13731
 
13724
13732
 
13733
+
13725
13734
 
13726
13735
  constructor() {
13727
13736
  this._hasChat = true;
@@ -13730,6 +13739,7 @@ class Features {
13730
13739
  this._hasFax = true;
13731
13740
  this._hasMobileDoubleCall = true;
13732
13741
  this._hasMobileGsm = true;
13742
+ this._hasMeeting = true;
13733
13743
  }
13734
13744
 
13735
13745
  async fetchAccess() {
@@ -13750,6 +13760,7 @@ class Features {
13750
13760
  this._hasFax = this._hasFeatures(scopes, 'fax');
13751
13761
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13752
13762
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13763
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13753
13764
  }
13754
13765
 
13755
13766
  hasChat() { return this._hasChat; }
@@ -13758,6 +13769,7 @@ class Features {
13758
13769
  hasFax() { return this._hasFax; }
13759
13770
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13760
13771
  hasMobileGsm() { return this._hasMobileGsm; }
13772
+ hasMeeting() { return this._hasMeeting; }
13761
13773
 
13762
13774
  _hasFeatures(scopes , featureName ) {
13763
13775
  const scopeName = getScopeName(featureName);