@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
@@ -6004,6 +6004,7 @@ class WebRTCClient extends Emitter {
6004
6004
  conference,
6005
6005
  audioOnly,
6006
6006
  },
6007
+ earlyMedia: true,
6007
6008
  };
6008
6009
 
6009
6010
  if (audioOnly) {
@@ -6368,7 +6369,7 @@ class WebRTCClient extends Emitter {
6368
6369
 
6369
6370
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6370
6371
  } else {
6371
- videoSender = pc.getSenders().find(sender => sender.track === null);
6372
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
6372
6373
  }
6373
6374
 
6374
6375
  if (!videoSender) {
@@ -6591,6 +6591,7 @@ class WebRTCClient extends Emitter {
6591
6591
  conference,
6592
6592
  audioOnly,
6593
6593
  },
6594
+ earlyMedia: true,
6594
6595
  };
6595
6596
 
6596
6597
  if (audioOnly) {
@@ -6955,7 +6956,7 @@ class WebRTCClient extends Emitter {
6955
6956
 
6956
6957
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6957
6958
  } else {
6958
- videoSender = pc.getSenders().find(sender => sender.track === null);
6959
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
6959
6960
  }
6960
6961
 
6961
6962
  if (!videoSender) {
@@ -6591,6 +6591,7 @@ class WebRTCClient extends Emitter {
6591
6591
  conference,
6592
6592
  audioOnly,
6593
6593
  },
6594
+ earlyMedia: true,
6594
6595
  };
6595
6596
 
6596
6597
  if (audioOnly) {
@@ -6955,7 +6956,7 @@ class WebRTCClient extends Emitter {
6955
6956
 
6956
6957
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6957
6958
  } else {
6958
- videoSender = pc.getSenders().find(sender => sender.track === null);
6959
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
6959
6960
  }
6960
6961
 
6961
6962
  if (!videoSender) {
@@ -6004,6 +6004,7 @@ class WebRTCClient extends Emitter {
6004
6004
  conference,
6005
6005
  audioOnly,
6006
6006
  },
6007
+ earlyMedia: true,
6007
6008
  };
6008
6009
 
6009
6010
  if (audioOnly) {
@@ -6368,7 +6369,7 @@ class WebRTCClient extends Emitter {
6368
6369
 
6369
6370
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6370
6371
  } else {
6371
- videoSender = pc.getSenders().find(sender => sender.track === null);
6372
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
6372
6373
  }
6373
6374
 
6374
6375
  if (!videoSender) {
@@ -6004,6 +6004,7 @@ class WebRTCClient extends Emitter {
6004
6004
  conference,
6005
6005
  audioOnly,
6006
6006
  },
6007
+ earlyMedia: true,
6007
6008
  };
6008
6009
 
6009
6010
  if (audioOnly) {
@@ -6368,7 +6369,7 @@ class WebRTCClient extends Emitter {
6368
6369
 
6369
6370
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
6370
6371
  } else {
6371
- videoSender = pc.getSenders().find(sender => sender.track === null);
6372
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
6372
6373
  }
6373
6374
 
6374
6375
  if (!videoSender) {
@@ -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);
@@ -5768,6 +5768,8 @@ class CTIPhone extends Emitter {
5768
5768
  }
5769
5769
 
5770
5770
  useLocalVideoElement() {}
5771
+
5772
+ setMediaConstraints() {}
5771
5773
  }
5772
5774
 
5773
5775
  export default CTIPhone;
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
  /* */
@@ -6908,6 +6910,7 @@ class WebRTCClient extends Emitter {
6908
6910
  conference,
6909
6911
  audioOnly,
6910
6912
  },
6913
+ earlyMedia: true,
6911
6914
  };
6912
6915
 
6913
6916
  if (audioOnly) {
@@ -7272,7 +7275,7 @@ class WebRTCClient extends Emitter {
7272
7275
 
7273
7276
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7274
7277
  } else {
7275
- videoSender = pc.getSenders().find(sender => sender.track === null);
7278
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7276
7279
  }
7277
7280
 
7278
7281
  if (!videoSender) {
@@ -9219,7 +9222,7 @@ var COUNTRIES = {
9219
9222
 
9220
9223
  //
9221
9224
 
9222
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
9225
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
9223
9226
 
9224
9227
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
9225
9228
 
@@ -9233,6 +9236,7 @@ class Features {
9233
9236
 
9234
9237
 
9235
9238
 
9239
+
9236
9240
 
9237
9241
  constructor() {
9238
9242
  this._hasChat = true;
@@ -9241,6 +9245,7 @@ class Features {
9241
9245
  this._hasFax = true;
9242
9246
  this._hasMobileDoubleCall = true;
9243
9247
  this._hasMobileGsm = true;
9248
+ this._hasMeeting = true;
9244
9249
  }
9245
9250
 
9246
9251
  async fetchAccess() {
@@ -9261,6 +9266,7 @@ class Features {
9261
9266
  this._hasFax = this._hasFeatures(scopes, 'fax');
9262
9267
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
9263
9268
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
9269
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
9264
9270
  }
9265
9271
 
9266
9272
  hasChat() { return this._hasChat; }
@@ -9269,6 +9275,7 @@ class Features {
9269
9275
  hasFax() { return this._hasFax; }
9270
9276
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
9271
9277
  hasMobileGsm() { return this._hasMobileGsm; }
9278
+ hasMeeting() { return this._hasMeeting; }
9272
9279
 
9273
9280
  _hasFeatures(scopes , featureName ) {
9274
9281
  const scopeName = getScopeName(featureName);
@@ -13267,10 +13274,15 @@ class Participant extends Emitter {
13267
13274
  }
13268
13275
  }
13269
13276
 
13270
- broadcastStatus(inboundStatus = null) {
13277
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
13271
13278
  const status = inboundStatus || this.getStatus();
13272
13279
  logger$2.info('broadcasting participant status', { callId: this.callId, status });
13273
13280
 
13281
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
13282
+ // eslint-disable-next-line no-underscore-dangle
13283
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
13284
+ }
13285
+
13274
13286
  this.room.sendSignal({
13275
13287
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
13276
13288
  origin: this.callId,
@@ -13913,7 +13925,7 @@ class Room extends Emitter {
13913
13925
  // callId is null, someone's requesting everyone's state;
13914
13926
  // or callId is set and matches ours;
13915
13927
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
13916
- this.localParticipant.broadcastStatus();
13928
+ this.localParticipant.broadcastStatus(null, true);
13917
13929
  }
13918
13930
 
13919
13931
  // might as well update the requester's status
@@ -14015,7 +14027,7 @@ class Room extends Emitter {
14015
14027
 
14016
14028
  this.connected = true;
14017
14029
 
14018
- localParticipant.broadcastStatus();
14030
+ localParticipant.broadcastStatus(null, true);
14019
14031
 
14020
14032
  // we're in the room, now let's request everyone's status
14021
14033
  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
  /* */
@@ -7086,6 +7088,7 @@ class WebRTCClient extends Emitter {
7086
7088
  conference,
7087
7089
  audioOnly,
7088
7090
  },
7091
+ earlyMedia: true,
7089
7092
  };
7090
7093
 
7091
7094
  if (audioOnly) {
@@ -7450,7 +7453,7 @@ class WebRTCClient extends Emitter {
7450
7453
 
7451
7454
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7452
7455
  } else {
7453
- videoSender = pc.getSenders().find(sender => sender.track === null);
7456
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7454
7457
  }
7455
7458
 
7456
7459
  if (!videoSender) {
@@ -11961,10 +11964,15 @@ class Participant extends Emitter {
11961
11964
  }
11962
11965
  }
11963
11966
 
11964
- broadcastStatus(inboundStatus = null) {
11967
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
11965
11968
  const status = inboundStatus || this.getStatus();
11966
11969
  logger$4.info('broadcasting participant status', { callId: this.callId, status });
11967
11970
 
11971
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
11972
+ // eslint-disable-next-line no-underscore-dangle
11973
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
11974
+ }
11975
+
11968
11976
  this.room.sendSignal({
11969
11977
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
11970
11978
  origin: this.callId,
@@ -12607,7 +12615,7 @@ class Room$1 extends Emitter {
12607
12615
  // callId is null, someone's requesting everyone's state;
12608
12616
  // or callId is set and matches ours;
12609
12617
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12610
- this.localParticipant.broadcastStatus();
12618
+ this.localParticipant.broadcastStatus(null, true);
12611
12619
  }
12612
12620
 
12613
12621
  // might as well update the requester's status
@@ -12709,7 +12717,7 @@ class Room$1 extends Emitter {
12709
12717
 
12710
12718
  this.connected = true;
12711
12719
 
12712
- localParticipant.broadcastStatus();
12720
+ localParticipant.broadcastStatus(null, true);
12713
12721
 
12714
12722
  // we're in the room, now let's request everyone's status
12715
12723
  if (this.localParticipant) {
@@ -13393,7 +13401,7 @@ SwitchboardCall.STATE = {
13393
13401
 
13394
13402
  //
13395
13403
 
13396
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13404
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13397
13405
 
13398
13406
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13399
13407
 
@@ -13407,6 +13415,7 @@ class Features {
13407
13415
 
13408
13416
 
13409
13417
 
13418
+
13410
13419
 
13411
13420
  constructor() {
13412
13421
  this._hasChat = true;
@@ -13415,6 +13424,7 @@ class Features {
13415
13424
  this._hasFax = true;
13416
13425
  this._hasMobileDoubleCall = true;
13417
13426
  this._hasMobileGsm = true;
13427
+ this._hasMeeting = true;
13418
13428
  }
13419
13429
 
13420
13430
  async fetchAccess() {
@@ -13435,6 +13445,7 @@ class Features {
13435
13445
  this._hasFax = this._hasFeatures(scopes, 'fax');
13436
13446
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13437
13447
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13448
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13438
13449
  }
13439
13450
 
13440
13451
  hasChat() { return this._hasChat; }
@@ -13443,6 +13454,7 @@ class Features {
13443
13454
  hasFax() { return this._hasFax; }
13444
13455
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13445
13456
  hasMobileGsm() { return this._hasMobileGsm; }
13457
+ hasMeeting() { return this._hasMeeting; }
13446
13458
 
13447
13459
  _hasFeatures(scopes , featureName ) {
13448
13460
  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
  /* */
@@ -7086,6 +7088,7 @@ class WebRTCClient extends Emitter {
7086
7088
  conference,
7087
7089
  audioOnly,
7088
7090
  },
7091
+ earlyMedia: true,
7089
7092
  };
7090
7093
 
7091
7094
  if (audioOnly) {
@@ -7450,7 +7453,7 @@ class WebRTCClient extends Emitter {
7450
7453
 
7451
7454
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7452
7455
  } else {
7453
- videoSender = pc.getSenders().find(sender => sender.track === null);
7456
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7454
7457
  }
7455
7458
 
7456
7459
  if (!videoSender) {
@@ -11961,10 +11964,15 @@ class Participant extends Emitter {
11961
11964
  }
11962
11965
  }
11963
11966
 
11964
- broadcastStatus(inboundStatus = null) {
11967
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
11965
11968
  const status = inboundStatus || this.getStatus();
11966
11969
  logger$4.info('broadcasting participant status', { callId: this.callId, status });
11967
11970
 
11971
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
11972
+ // eslint-disable-next-line no-underscore-dangle
11973
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
11974
+ }
11975
+
11968
11976
  this.room.sendSignal({
11969
11977
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
11970
11978
  origin: this.callId,
@@ -12607,7 +12615,7 @@ class Room$1 extends Emitter {
12607
12615
  // callId is null, someone's requesting everyone's state;
12608
12616
  // or callId is set and matches ours;
12609
12617
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12610
- this.localParticipant.broadcastStatus();
12618
+ this.localParticipant.broadcastStatus(null, true);
12611
12619
  }
12612
12620
 
12613
12621
  // might as well update the requester's status
@@ -12709,7 +12717,7 @@ class Room$1 extends Emitter {
12709
12717
 
12710
12718
  this.connected = true;
12711
12719
 
12712
- localParticipant.broadcastStatus();
12720
+ localParticipant.broadcastStatus(null, true);
12713
12721
 
12714
12722
  // we're in the room, now let's request everyone's status
12715
12723
  if (this.localParticipant) {
@@ -13376,7 +13384,7 @@ SwitchboardCall.STATE = {
13376
13384
 
13377
13385
  //
13378
13386
 
13379
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13387
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13380
13388
 
13381
13389
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13382
13390
 
@@ -13390,6 +13398,7 @@ class Features {
13390
13398
 
13391
13399
 
13392
13400
 
13401
+
13393
13402
 
13394
13403
  constructor() {
13395
13404
  this._hasChat = true;
@@ -13398,6 +13407,7 @@ class Features {
13398
13407
  this._hasFax = true;
13399
13408
  this._hasMobileDoubleCall = true;
13400
13409
  this._hasMobileGsm = true;
13410
+ this._hasMeeting = true;
13401
13411
  }
13402
13412
 
13403
13413
  async fetchAccess() {
@@ -13418,6 +13428,7 @@ class Features {
13418
13428
  this._hasFax = this._hasFeatures(scopes, 'fax');
13419
13429
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13420
13430
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13431
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13421
13432
  }
13422
13433
 
13423
13434
  hasChat() { return this._hasChat; }
@@ -13426,6 +13437,7 @@ class Features {
13426
13437
  hasFax() { return this._hasFax; }
13427
13438
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13428
13439
  hasMobileGsm() { return this._hasMobileGsm; }
13440
+ hasMeeting() { return this._hasMeeting; }
13429
13441
 
13430
13442
  _hasFeatures(scopes , featureName ) {
13431
13443
  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
  /* */
@@ -7086,6 +7088,7 @@ class WebRTCClient extends Emitter {
7086
7088
  conference,
7087
7089
  audioOnly,
7088
7090
  },
7091
+ earlyMedia: true,
7089
7092
  };
7090
7093
 
7091
7094
  if (audioOnly) {
@@ -7450,7 +7453,7 @@ class WebRTCClient extends Emitter {
7450
7453
 
7451
7454
  videoSender = transceiverIdx !== -1 ? transceivers[transceiverIdx].sender : null;
7452
7455
  } else {
7453
- videoSender = pc.getSenders().find(sender => sender.track === null);
7456
+ videoSender = pc && pc.getSenders && pc.getSenders().find(sender => sender.track === null);
7454
7457
  }
7455
7458
 
7456
7459
  if (!videoSender) {
@@ -11874,10 +11877,15 @@ class Participant extends Emitter {
11874
11877
  }
11875
11878
  }
11876
11879
 
11877
- broadcastStatus(inboundStatus = null) {
11880
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
11878
11881
  const status = inboundStatus || this.getStatus();
11879
11882
  logger$4.info('broadcasting participant status', { callId: this.callId, status });
11880
11883
 
11884
+ if (sendReinvite && !this.streams.length && Phone$1.phone) {
11885
+ // eslint-disable-next-line no-underscore-dangle
11886
+ Phone$1.phone._sendReinviteMessage(this.room.callSession, false);
11887
+ }
11888
+
11881
11889
  this.room.sendSignal({
11882
11890
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
11883
11891
  origin: this.callId,
@@ -12520,7 +12528,7 @@ class Room$1 extends Emitter {
12520
12528
  // callId is null, someone's requesting everyone's state;
12521
12529
  // or callId is set and matches ours;
12522
12530
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
12523
- this.localParticipant.broadcastStatus();
12531
+ this.localParticipant.broadcastStatus(null, true);
12524
12532
  }
12525
12533
 
12526
12534
  // might as well update the requester's status
@@ -12622,7 +12630,7 @@ class Room$1 extends Emitter {
12622
12630
 
12623
12631
  this.connected = true;
12624
12632
 
12625
- localParticipant.broadcastStatus();
12633
+ localParticipant.broadcastStatus(null, true);
12626
12634
 
12627
12635
  // we're in the room, now let's request everyone's status
12628
12636
  if (this.localParticipant) {
@@ -13314,7 +13322,7 @@ SwitchboardCall.STATE = {
13314
13322
 
13315
13323
  //
13316
13324
 
13317
- const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm'];
13325
+ const FEATURES = ['chat', 'video', 'call_recording', 'fax', 'mobile_double_call', 'mobile_gsm', 'meeting'];
13318
13326
 
13319
13327
  const getScopeName = (featureName ) => `enterprise.app.${featureName}`;
13320
13328
 
@@ -13328,6 +13336,7 @@ class Features {
13328
13336
 
13329
13337
 
13330
13338
 
13339
+
13331
13340
 
13332
13341
  constructor() {
13333
13342
  this._hasChat = true;
@@ -13336,6 +13345,7 @@ class Features {
13336
13345
  this._hasFax = true;
13337
13346
  this._hasMobileDoubleCall = true;
13338
13347
  this._hasMobileGsm = true;
13348
+ this._hasMeeting = true;
13339
13349
  }
13340
13350
 
13341
13351
  async fetchAccess() {
@@ -13356,6 +13366,7 @@ class Features {
13356
13366
  this._hasFax = this._hasFeatures(scopes, 'fax');
13357
13367
  this._hasMobileDoubleCall = this._hasFeatures(scopes, 'mobile_double_call');
13358
13368
  this._hasMobileGsm = this._hasFeatures(scopes, 'mobile_gsm');
13369
+ this._hasMeeting = this._hasFeatures(scopes, 'meeting');
13359
13370
  }
13360
13371
 
13361
13372
  hasChat() { return this._hasChat; }
@@ -13364,6 +13375,7 @@ class Features {
13364
13375
  hasFax() { return this._hasFax; }
13365
13376
  hasMobileDoubleCall() { return this._hasMobileDoubleCall; }
13366
13377
  hasMobileGsm() { return this._hasMobileGsm; }
13378
+ hasMeeting() { return this._hasMeeting; }
13367
13379
 
13368
13380
  _hasFeatures(scopes , featureName ) {
13369
13381
  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);