@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
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7427,6 +7429,7 @@ class WebRTCClient extends Emitter {
7427
7429
  conference,
7428
7430
  audioOnly,
7429
7431
  },
7432
+ earlyMedia: true,
7430
7433
  };
7431
7434
 
7432
7435
  if (audioOnly) {
@@ -7791,7 +7794,7 @@ class WebRTCClient extends Emitter {
7791
7794
 
7792
7795
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7793
7796
  } else {
7794
- videoSender = pc.getSenders().find(sender => sender.track === null);
7797
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7795
7798
  }
7796
7799
 
7797
7800
  if (!videoSender) {
@@ -12441,10 +12444,15 @@ class Participant extends Emitter {
12441
12444
  }
12442
12445
  }
12443
12446
 
12444
- broadcastStatus(inboundStatus = null) {
12447
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12445
12448
  const status = inboundStatus || this.getStatus();
12446
12449
  logger$2.info('broadcasting participant status', { callId: this.callId, status });
12447
12450
 
12451
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12452
+ // eslint-disable-next-line no-underscore-dangle
12453
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12454
+ }
12455
+
12448
12456
  this.room.sendSignal({
12449
12457
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12450
12458
  origin: this.callId,
@@ -12887,7 +12895,7 @@ SwitchboardCall.STATE = {
12887
12895
 
12888
12896
  //
12889
12897
 
12890
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
12898
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
12891
12899
 
12892
12900
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
12893
12901
 
@@ -12901,6 +12909,7 @@ class Features {
12901
12909
 
12902
12910
 
12903
12911
 
12912
+
12904
12913
 
12905
12914
  constructor() {
12906
12915
  this._hasChat = true;
@@ -12909,6 +12918,7 @@ class Features {
12909
12918
  this._hasFax = true;
12910
12919
  this._hasMobileDoubleCall = true;
12911
12920
  this._hasMobileGsm = true;
12921
+ this._hasMeeting = true;
12912
12922
  }
12913
12923
 
12914
12924
  async fetchAccess() {
@@ -12929,6 +12939,7 @@ class Features {
12929
12939
  this._hasFax = this._hasFeatures(scopes, 'fax');
12930
12940
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
12931
12941
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
12942
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
12932
12943
  }
12933
12944
 
12934
12945
  hasChat() { return this._hasChat; }
@@ -12937,6 +12948,7 @@ class Features {
12937
12948
  hasFax() { return this._hasFax; }
12938
12949
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
12939
12950
  hasMobileGsm() { return this._hasMobileGsm; }
12951
+ hasMeeting() { return this._hasMeeting; }
12940
12952
 
12941
12953
  _hasFeatures(scopes , featureName ) {
12942
12954
  const scopeName = getScopeName(featureName);
@@ -14490,7 +14502,7 @@ class Room extends Emitter {
14490
14502
  // callId is null, someone's requesting everyone's state;
14491
14503
  // or callId is set and matches ours;
14492
14504
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
14493
- this.localParticipant.broadcastStatus();
14505
+ this.localParticipant.broadcastStatus(null, true);
14494
14506
  }
14495
14507
 
14496
14508
  // might as well update the requester's status
@@ -14592,7 +14604,7 @@ class Room extends Emitter {
14592
14604
 
14593
14605
  this.connected = true;
14594
14606
 
14595
- localParticipant.broadcastStatus();
14607
+ localParticipant.broadcastStatus(null, true);
14596
14608
 
14597
14609
  // we're in the room, now let's request everyone's status
14598
14610
  if (this.localParticipant) {
@@ -4618,6 +4618,8 @@ class CTIPhone extends Emitter {
4618
4618
  }
4619
4619
 
4620
4620
  useLocalVideoElement() {}
4621
+
4622
+ setMediaConstraints() {}
4621
4623
  }
4622
4624
 
4623
4625
  /* */
@@ -7429,6 +7431,7 @@ class WebRTCClient extends Emitter {
7429
7431
  conference,
7430
7432
  audioOnly,
7431
7433
  },
7434
+ earlyMedia: true,
7432
7435
  };
7433
7436
 
7434
7437
  if (audioOnly) {
@@ -7793,7 +7796,7 @@ class WebRTCClient extends Emitter {
7793
7796
 
7794
7797
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7795
7798
  } else {
7796
- videoSender = pc.getSenders().find(sender => sender.track === null);
7799
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7797
7800
  }
7798
7801
 
7799
7802
  if (!videoSender) {
@@ -12443,10 +12446,15 @@ class Participant extends Emitter {
12443
12446
  }
12444
12447
  }
12445
12448
 
12446
- broadcastStatus(inboundStatus = null) {
12449
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12447
12450
  const status = inboundStatus || this.getStatus();
12448
12451
  logger$2.info('broadcasting participant status', { callId: this.callId, status });
12449
12452
 
12453
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12454
+ // eslint-disable-next-line no-underscore-dangle
12455
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12456
+ }
12457
+
12450
12458
  this.room.sendSignal({
12451
12459
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12452
12460
  origin: this.callId,
@@ -12900,7 +12908,7 @@ SwitchboardCall.STATE = {
12900
12908
 
12901
12909
  //
12902
12910
 
12903
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
12911
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
12904
12912
 
12905
12913
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
12906
12914
 
@@ -12914,6 +12922,7 @@ class Features {
12914
12922
 
12915
12923
 
12916
12924
 
12925
+
12917
12926
 
12918
12927
  constructor() {
12919
12928
  this._hasChat = true;
@@ -12922,6 +12931,7 @@ class Features {
12922
12931
  this._hasFax = true;
12923
12932
  this._hasMobileDoubleCall = true;
12924
12933
  this._hasMobileGsm = true;
12934
+ this._hasMeeting = true;
12925
12935
  }
12926
12936
 
12927
12937
  async fetchAccess() {
@@ -12942,6 +12952,7 @@ class Features {
12942
12952
  this._hasFax = this._hasFeatures(scopes, 'fax');
12943
12953
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
12944
12954
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
12955
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
12945
12956
  }
12946
12957
 
12947
12958
  hasChat() { return this._hasChat; }
@@ -12950,6 +12961,7 @@ class Features {
12950
12961
  hasFax() { return this._hasFax; }
12951
12962
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
12952
12963
  hasMobileGsm() { return this._hasMobileGsm; }
12964
+ hasMeeting() { return this._hasMeeting; }
12953
12965
 
12954
12966
  _hasFeatures(scopes , featureName ) {
12955
12967
  const scopeName = getScopeName(featureName);
@@ -14503,7 +14515,7 @@ class Room extends Emitter {
14503
14515
  // callId is null, someone's requesting everyone's state;
14504
14516
  // or callId is set and matches ours;
14505
14517
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
14506
- this.localParticipant.broadcastStatus();
14518
+ this.localParticipant.broadcastStatus(null, true);
14507
14519
  }
14508
14520
 
14509
14521
  // might as well update the requester's status
@@ -14605,7 +14617,7 @@ class Room extends Emitter {
14605
14617
 
14606
14618
  this.connected = true;
14607
14619
 
14608
- localParticipant.broadcastStatus();
14620
+ localParticipant.broadcastStatus(null, true);
14609
14621
 
14610
14622
  // we're in the room, now let's request everyone's status
14611
14623
  if (this.localParticipant) {
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7427,6 +7429,7 @@ class WebRTCClient extends Emitter {
7427
7429
  conference,
7428
7430
  audioOnly,
7429
7431
  },
7432
+ earlyMedia: true,
7430
7433
  };
7431
7434
 
7432
7435
  if (audioOnly) {
@@ -7791,7 +7794,7 @@ class WebRTCClient extends Emitter {
7791
7794
 
7792
7795
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7793
7796
  } else {
7794
- videoSender = pc.getSenders().find(sender => sender.track === null);
7797
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7795
7798
  }
7796
7799
 
7797
7800
  if (!videoSender) {
@@ -12302,10 +12305,15 @@ class Participant extends Emitter {
12302
12305
  }
12303
12306
  }
12304
12307
 
12305
- broadcastStatus(inboundStatus = null) {
12308
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12306
12309
  const status = inboundStatus || this.getStatus();
12307
12310
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12308
12311
 
12312
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12313
+ // eslint-disable-next-line no-underscore-dangle
12314
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12315
+ }
12316
+
12309
12317
  this.room.sendSignal({
12310
12318
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12311
12319
  origin: this.callId,
@@ -12948,7 +12956,7 @@ class Room$1 extends Emitter {
12948
12956
  // callId is null, someone's requesting everyone's state;
12949
12957
  // or callId is set and matches ours;
12950
12958
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12951
- this.localParticipant.broadcastStatus();
12959
+ this.localParticipant.broadcastStatus(null, true);
12952
12960
  }
12953
12961
 
12954
12962
  // might as well update the requester's status
@@ -13050,7 +13058,7 @@ class Room$1 extends Emitter {
13050
13058
 
13051
13059
  this.connected = true;
13052
13060
 
13053
- localParticipant.broadcastStatus();
13061
+ localParticipant.broadcastStatus(null, true);
13054
13062
 
13055
13063
  // we're in the room, now let's request everyone's status
13056
13064
  if (this.localParticipant) {
@@ -13595,7 +13603,7 @@ SwitchboardCall.STATE = {
13595
13603
 
13596
13604
  //
13597
13605
 
13598
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13606
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13599
13607
 
13600
13608
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13601
13609
 
@@ -13609,6 +13617,7 @@ class Features {
13609
13617
 
13610
13618
 
13611
13619
 
13620
+
13612
13621
 
13613
13622
  constructor() {
13614
13623
  this._hasChat = true;
@@ -13617,6 +13626,7 @@ class Features {
13617
13626
  this._hasFax = true;
13618
13627
  this._hasMobileDoubleCall = true;
13619
13628
  this._hasMobileGsm = true;
13629
+ this._hasMeeting = true;
13620
13630
  }
13621
13631
 
13622
13632
  async fetchAccess() {
@@ -13637,6 +13647,7 @@ class Features {
13637
13647
  this._hasFax = this._hasFeatures(scopes, 'fax');
13638
13648
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13639
13649
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13650
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13640
13651
  }
13641
13652
 
13642
13653
  hasChat() { return this._hasChat; }
@@ -13645,6 +13656,7 @@ class Features {
13645
13656
  hasFax() { return this._hasFax; }
13646
13657
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13647
13658
  hasMobileGsm() { return this._hasMobileGsm; }
13659
+ hasMeeting() { return this._hasMeeting; }
13648
13660
 
13649
13661
  _hasFeatures(scopes , featureName ) {
13650
13662
  const scopeName = getScopeName(featureName);
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7427,6 +7429,7 @@ class WebRTCClient extends Emitter {
7427
7429
  conference,
7428
7430
  audioOnly,
7429
7431
  },
7432
+ earlyMedia: true,
7430
7433
  };
7431
7434
 
7432
7435
  if (audioOnly) {
@@ -7791,7 +7794,7 @@ class WebRTCClient extends Emitter {
7791
7794
 
7792
7795
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7793
7796
  } else {
7794
- videoSender = pc.getSenders().find(sender => sender.track === null);
7797
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7795
7798
  }
7796
7799
 
7797
7800
  if (!videoSender) {
@@ -12302,10 +12305,15 @@ class Participant extends Emitter {
12302
12305
  }
12303
12306
  }
12304
12307
 
12305
- broadcastStatus(inboundStatus = null) {
12308
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12306
12309
  const status = inboundStatus || this.getStatus();
12307
12310
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12308
12311
 
12312
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12313
+ // eslint-disable-next-line no-underscore-dangle
12314
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12315
+ }
12316
+
12309
12317
  this.room.sendSignal({
12310
12318
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12311
12319
  origin: this.callId,
@@ -12948,7 +12956,7 @@ class Room$1 extends Emitter {
12948
12956
  // callId is null, someone's requesting everyone's state;
12949
12957
  // or callId is set and matches ours;
12950
12958
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12951
- this.localParticipant.broadcastStatus();
12959
+ this.localParticipant.broadcastStatus(null, true);
12952
12960
  }
12953
12961
 
12954
12962
  // might as well update the requester's status
@@ -13050,7 +13058,7 @@ class Room$1 extends Emitter {
13050
13058
 
13051
13059
  this.connected = true;
13052
13060
 
13053
- localParticipant.broadcastStatus();
13061
+ localParticipant.broadcastStatus(null, true);
13054
13062
 
13055
13063
  // we're in the room, now let's request everyone's status
13056
13064
  if (this.localParticipant) {
@@ -13676,7 +13684,7 @@ SwitchboardCall.STATE = {
13676
13684
 
13677
13685
  //
13678
13686
 
13679
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13687
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13680
13688
 
13681
13689
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13682
13690
 
@@ -13690,6 +13698,7 @@ class Features {
13690
13698
 
13691
13699
 
13692
13700
 
13701
+
13693
13702
 
13694
13703
  constructor() {
13695
13704
  this._hasChat = true;
@@ -13698,6 +13707,7 @@ class Features {
13698
13707
  this._hasFax = true;
13699
13708
  this._hasMobileDoubleCall = true;
13700
13709
  this._hasMobileGsm = true;
13710
+ this._hasMeeting = true;
13701
13711
  }
13702
13712
 
13703
13713
  async fetchAccess() {
@@ -13718,6 +13728,7 @@ class Features {
13718
13728
  this._hasFax = this._hasFeatures(scopes, 'fax');
13719
13729
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13720
13730
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13731
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13721
13732
  }
13722
13733
 
13723
13734
  hasChat() { return this._hasChat; }
@@ -13726,6 +13737,7 @@ class Features {
13726
13737
  hasFax() { return this._hasFax; }
13727
13738
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13728
13739
  hasMobileGsm() { return this._hasMobileGsm; }
13740
+ hasMeeting() { return this._hasMeeting; }
13729
13741
 
13730
13742
  _hasFeatures(scopes , featureName ) {
13731
13743
  const scopeName = getScopeName(featureName);
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7427,6 +7429,7 @@ class WebRTCClient extends Emitter {
7427
7429
  conference,
7428
7430
  audioOnly,
7429
7431
  },
7432
+ earlyMedia: true,
7430
7433
  };
7431
7434
 
7432
7435
  if (audioOnly) {
@@ -7791,7 +7794,7 @@ class WebRTCClient extends Emitter {
7791
7794
 
7792
7795
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7793
7796
  } else {
7794
- videoSender = pc.getSenders().find(sender => sender.track === null);
7797
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7795
7798
  }
7796
7799
 
7797
7800
  if (!videoSender) {
@@ -12302,10 +12305,15 @@ class Participant extends Emitter {
12302
12305
  }
12303
12306
  }
12304
12307
 
12305
- broadcastStatus(inboundStatus = null) {
12308
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12306
12309
  const status = inboundStatus || this.getStatus();
12307
12310
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12308
12311
 
12312
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12313
+ // eslint-disable-next-line no-underscore-dangle
12314
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12315
+ }
12316
+
12309
12317
  this.room.sendSignal({
12310
12318
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12311
12319
  origin: this.callId,
@@ -12948,7 +12956,7 @@ class Room$1 extends Emitter {
12948
12956
  // callId is null, someone's requesting everyone's state;
12949
12957
  // or callId is set and matches ours;
12950
12958
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12951
- this.localParticipant.broadcastStatus();
12959
+ this.localParticipant.broadcastStatus(null, true);
12952
12960
  }
12953
12961
 
12954
12962
  // might as well update the requester's status
@@ -13050,7 +13058,7 @@ class Room$1 extends Emitter {
13050
13058
 
13051
13059
  this.connected = true;
13052
13060
 
13053
- localParticipant.broadcastStatus();
13061
+ localParticipant.broadcastStatus(null, true);
13054
13062
 
13055
13063
  // we're in the room, now let's request everyone's status
13056
13064
  if (this.localParticipant) {
@@ -13734,7 +13742,7 @@ SwitchboardCall.STATE = {
13734
13742
 
13735
13743
  //
13736
13744
 
13737
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13745
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13738
13746
 
13739
13747
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13740
13748
 
@@ -13748,6 +13756,7 @@ class Features {
13748
13756
 
13749
13757
 
13750
13758
 
13759
+
13751
13760
 
13752
13761
  constructor() {
13753
13762
  this._hasChat = true;
@@ -13756,6 +13765,7 @@ class Features {
13756
13765
  this._hasFax = true;
13757
13766
  this._hasMobileDoubleCall = true;
13758
13767
  this._hasMobileGsm = true;
13768
+ this._hasMeeting = true;
13759
13769
  }
13760
13770
 
13761
13771
  async fetchAccess() {
@@ -13776,6 +13786,7 @@ class Features {
13776
13786
  this._hasFax = this._hasFeatures(scopes, 'fax');
13777
13787
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13778
13788
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13789
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13779
13790
  }
13780
13791
 
13781
13792
  hasChat() { return this._hasChat; }
@@ -13784,6 +13795,7 @@ class Features {
13784
13795
  hasFax() { return this._hasFax; }
13785
13796
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13786
13797
  hasMobileGsm() { return this._hasMobileGsm; }
13798
+ hasMeeting() { return this._hasMeeting; }
13787
13799
 
13788
13800
  _hasFeatures(scopes , featureName ) {
13789
13801
  const scopeName = getScopeName(featureName);
@@ -4616,6 +4616,8 @@ class CTIPhone extends Emitter {
4616
4616
  }
4617
4617
 
4618
4618
  useLocalVideoElement() {}
4619
+
4620
+ setMediaConstraints() {}
4619
4621
  }
4620
4622
 
4621
4623
  /* */
@@ -7427,6 +7429,7 @@ class WebRTCClient extends Emitter {
7427
7429
  conference,
7428
7430
  audioOnly,
7429
7431
  },
7432
+ earlyMedia: true,
7430
7433
  };
7431
7434
 
7432
7435
  if (audioOnly) {
@@ -7791,7 +7794,7 @@ class WebRTCClient extends Emitter {
7791
7794
 
7792
7795
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7793
7796
  } else {
7794
- videoSender = pc.getSenders().find(sender => sender.track === null);
7797
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7795
7798
  }
7796
7799
 
7797
7800
  if (!videoSender) {
@@ -12302,10 +12305,15 @@ class Participant extends Emitter {
12302
12305
  }
12303
12306
  }
12304
12307
 
12305
- broadcastStatus(inboundStatus = null) {
12308
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12306
12309
  const status = inboundStatus || this.getStatus();
12307
12310
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12308
12311
 
12312
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12313
+ // eslint-disable-next-line no-underscore-dangle
12314
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12315
+ }
12316
+
12309
12317
  this.room.sendSignal({
12310
12318
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12311
12319
  origin: this.callId,
@@ -12948,7 +12956,7 @@ class Room$1 extends Emitter {
12948
12956
  // callId is null, someone's requesting everyone's state;
12949
12957
  // or callId is set and matches ours;
12950
12958
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12951
- this.localParticipant.broadcastStatus();
12959
+ this.localParticipant.broadcastStatus(null, true);
12952
12960
  }
12953
12961
 
12954
12962
  // might as well update the requester's status
@@ -13050,7 +13058,7 @@ class Room$1 extends Emitter {
13050
13058
 
13051
13059
  this.connected = true;
13052
13060
 
13053
- localParticipant.broadcastStatus();
13061
+ localParticipant.broadcastStatus(null, true);
13054
13062
 
13055
13063
  // we're in the room, now let's request everyone's status
13056
13064
  if (this.localParticipant) {
@@ -13734,7 +13742,7 @@ SwitchboardCall.STATE = {
13734
13742
 
13735
13743
  //
13736
13744
 
13737
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13745
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13738
13746
 
13739
13747
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13740
13748
 
@@ -13748,6 +13756,7 @@ class Features {
13748
13756
 
13749
13757
 
13750
13758
 
13759
+
13751
13760
 
13752
13761
  constructor() {
13753
13762
  this._hasChat = true;
@@ -13756,6 +13765,7 @@ class Features {
13756
13765
  this._hasFax = true;
13757
13766
  this._hasMobileDoubleCall = true;
13758
13767
  this._hasMobileGsm = true;
13768
+ this._hasMeeting = true;
13759
13769
  }
13760
13770
 
13761
13771
  async fetchAccess() {
@@ -13776,6 +13786,7 @@ class Features {
13776
13786
  this._hasFax = this._hasFeatures(scopes, 'fax');
13777
13787
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13778
13788
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13789
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13779
13790
  }
13780
13791
 
13781
13792
  hasChat() { return this._hasChat; }
@@ -13784,6 +13795,7 @@ class Features {
13784
13795
  hasFax() { return this._hasFax; }
13785
13796
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13786
13797
  hasMobileGsm() { return this._hasMobileGsm; }
13798
+ hasMeeting() { return this._hasMeeting; }
13787
13799
 
13788
13800
  _hasFeatures(scopes , featureName ) {
13789
13801
  const scopeName = getScopeName(featureName);
@@ -4618,6 +4618,8 @@ class CTIPhone extends Emitter {
4618
4618
  }
4619
4619
 
4620
4620
  useLocalVideoElement() {}
4621
+
4622
+ setMediaConstraints() {}
4621
4623
  }
4622
4624
 
4623
4625
  /* */
@@ -7429,6 +7431,7 @@ class WebRTCClient extends Emitter {
7429
7431
  conference,
7430
7432
  audioOnly,
7431
7433
  },
7434
+ earlyMedia: true,
7432
7435
  };
7433
7436
 
7434
7437
  if (audioOnly) {
@@ -7793,7 +7796,7 @@ class WebRTCClient extends Emitter {
7793
7796
 
7794
7797
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7795
7798
  } else {
7796
- videoSender = pc.getSenders().find(sender => sender.track === null);
7799
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7797
7800
  }
7798
7801
 
7799
7802
  if (!videoSender) {
@@ -12304,10 +12307,15 @@ class Participant extends Emitter {
12304
12307
  }
12305
12308
  }
12306
12309
 
12307
- broadcastStatus(inboundStatus = null) {
12310
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
12308
12311
  const status = inboundStatus || this.getStatus();
12309
12312
  logger$3.info('broadcasting participant status', { callId: this.callId, status });
12310
12313
 
12314
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
12315
+ // eslint-disable-next-line no-underscore-dangle
12316
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
12317
+ }
12318
+
12311
12319
  this.room.sendSignal({
12312
12320
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
12313
12321
  origin: this.callId,
@@ -12950,7 +12958,7 @@ class Room$1 extends Emitter {
12950
12958
  // callId is null, someone's requesting everyone's state;
12951
12959
  // or callId is set and matches ours;
12952
12960
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12953
- this.localParticipant.broadcastStatus();
12961
+ this.localParticipant.broadcastStatus(null, true);
12954
12962
  }
12955
12963
 
12956
12964
  // might as well update the requester's status
@@ -13052,7 +13060,7 @@ class Room$1 extends Emitter {
13052
13060
 
13053
13061
  this.connected = true;
13054
13062
 
13055
- localParticipant.broadcastStatus();
13063
+ localParticipant.broadcastStatus(null, true);
13056
13064
 
13057
13065
  // we're in the room, now let's request everyone's status
13058
13066
  if (this.localParticipant) {
@@ -13720,7 +13728,7 @@ SwitchboardCall.STATE = {
13720
13728
 
13721
13729
  //
13722
13730
 
13723
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13731
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13724
13732
 
13725
13733
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13726
13734
 
@@ -13734,6 +13742,7 @@ class Features {
13734
13742
 
13735
13743
 
13736
13744
 
13745
+
13737
13746
 
13738
13747
  constructor() {
13739
13748
  this._hasChat = true;
@@ -13742,6 +13751,7 @@ class Features {
13742
13751
  this._hasFax = true;
13743
13752
  this._hasMobileDoubleCall = true;
13744
13753
  this._hasMobileGsm = true;
13754
+ this._hasMeeting = true;
13745
13755
  }
13746
13756
 
13747
13757
  async fetchAccess() {
@@ -13762,6 +13772,7 @@ class Features {
13762
13772
  this._hasFax = this._hasFeatures(scopes, 'fax');
13763
13773
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13764
13774
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13775
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13765
13776
  }
13766
13777
 
13767
13778
  hasChat() { return this._hasChat; }
@@ -13770,6 +13781,7 @@ class Features {
13770
13781
  hasFax() { return this._hasFax; }
13771
13782
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13772
13783
  hasMobileGsm() { return this._hasMobileGsm; }
13784
+ hasMeeting() { return this._hasMeeting; }
13773
13785
 
13774
13786
  _hasFeatures(scopes , featureName ) {
13775
13787
  const scopeName = getScopeName(featureName);