@wazo/sdk 0.38.13 → 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 (49) hide show
  1. package/dist/wazo-sdk.js +4 -4
  2. package/esm/__tests__/web-rtc-client.test.js +1 -0
  3. package/esm/checker/Checker.js +1 -0
  4. package/esm/checker/checks/index.js +1 -0
  5. package/esm/checker/checks/webrtc-transport.js +1 -0
  6. package/esm/checker/checks/webrtc.js +1 -0
  7. package/esm/domain/Phone/CTIPhone.js +2 -0
  8. package/esm/index.js +11 -3
  9. package/esm/simple/Auth.js +11 -3
  10. package/esm/simple/Configuration.js +11 -3
  11. package/esm/simple/Phone.js +11 -3
  12. package/esm/simple/index.js +11 -3
  13. package/esm/simple/room/LocalParticipant.js +5521 -5513
  14. package/esm/simple/room/Participant.js +5527 -5519
  15. package/esm/simple/room/RemoteParticipant.js +11 -3
  16. package/esm/simple/room/Room.js +11 -3
  17. package/esm/simple/room/SipRoom.js +11 -3
  18. package/esm/simple/room/Stream.js +11 -3
  19. package/esm/simple/room/__tests__/Participant.test.js +11 -3
  20. package/esm/simple/room/__tests__/RemoteParticipant.test.js +11 -3
  21. package/esm/simple/utils.js +11 -3
  22. package/esm/web-rtc-client.js +1 -0
  23. package/lib/__tests__/web-rtc-client.test.js +1 -0
  24. package/lib/checker/Checker.js +1 -0
  25. package/lib/checker/checks/index.js +1 -0
  26. package/lib/checker/checks/webrtc-transport.js +1 -0
  27. package/lib/checker/checks/webrtc.js +1 -0
  28. package/lib/domain/Phone/CTIPhone.js +2 -0
  29. package/lib/index.js +11 -3
  30. package/lib/simple/Auth.js +11 -3
  31. package/lib/simple/Configuration.js +11 -3
  32. package/lib/simple/Phone.js +11 -3
  33. package/lib/simple/index.js +11 -3
  34. package/lib/simple/room/LocalParticipant.js +6430 -6422
  35. package/lib/simple/room/Participant.js +6433 -6425
  36. package/lib/simple/room/RemoteParticipant.js +11 -3
  37. package/lib/simple/room/Room.js +11 -3
  38. package/lib/simple/room/SipRoom.js +11 -3
  39. package/lib/simple/room/Stream.js +11 -3
  40. package/lib/simple/room/__tests__/Participant.test.js +11 -3
  41. package/lib/simple/room/__tests__/RemoteParticipant.test.js +11 -3
  42. package/lib/simple/utils.js +11 -3
  43. package/lib/web-rtc-client.js +1 -0
  44. package/package.json +1 -1
  45. package/src/domain/Phone/CTIPhone.js +2 -0
  46. package/src/domain/Phone/Phone.js +2 -0
  47. package/src/simple/room/Participant.js +7 -1
  48. package/src/simple/room/Room.js +2 -2
  49. package/src/web-rtc-client.js +1 -0
@@ -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) {
@@ -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) {
@@ -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) {
@@ -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) {
@@ -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) {
@@ -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) {
@@ -13271,10 +13274,15 @@ class Participant extends Emitter {
13271
13274
  }
13272
13275
  }
13273
13276
 
13274
- broadcastStatus(inboundStatus = null) {
13277
+ broadcastStatus(inboundStatus = null, sendReinvite ) {
13275
13278
  const status = inboundStatus || this.getStatus();
13276
13279
  logger$2.info('broadcasting participant status', { callId: this.callId, status });
13277
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
+
13278
13286
  this.room.sendSignal({
13279
13287
  type: SIGNAL_TYPE_PARTICIPANT_UPDATE,
13280
13288
  origin: this.callId,
@@ -13917,7 +13925,7 @@ class Room extends Emitter {
13917
13925
  // callId is null, someone's requesting everyone's state;
13918
13926
  // or callId is set and matches ours;
13919
13927
  if (this.localParticipant && (!callId || callId === this.localParticipant.callId)) {
13920
- this.localParticipant.broadcastStatus();
13928
+ this.localParticipant.broadcastStatus(null, true);
13921
13929
  }
13922
13930
 
13923
13931
  // might as well update the requester's status
@@ -14019,7 +14027,7 @@ class Room extends Emitter {
14019
14027
 
14020
14028
  this.connected = true;
14021
14029
 
14022
- localParticipant.broadcastStatus();
14030
+ localParticipant.broadcastStatus(null, true);
14023
14031
 
14024
14032
  // we're in the room, now let's request everyone's status
14025
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) {
@@ -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) {
@@ -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) {
@@ -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) {
@@ -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) {
@@ -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) {
@@ -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) {
@@ -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) {