@webex/calling 3.3.1-next.2 → 3.3.1-next.21

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 (43) hide show
  1. package/dist/CallingClient/calling/call.js +40 -14
  2. package/dist/CallingClient/calling/call.js.map +1 -1
  3. package/dist/CallingClient/calling/call.test.js +19 -0
  4. package/dist/CallingClient/calling/call.test.js.map +1 -1
  5. package/dist/CallingClient/constants.js +6 -4
  6. package/dist/CallingClient/constants.js.map +1 -1
  7. package/dist/Contacts/ContactsClient.js +234 -253
  8. package/dist/Contacts/ContactsClient.js.map +1 -1
  9. package/dist/Contacts/ContactsClient.test.js +1 -1
  10. package/dist/Contacts/ContactsClient.test.js.map +1 -1
  11. package/dist/Contacts/contactFixtures.js +2 -2
  12. package/dist/Contacts/contactFixtures.js.map +1 -1
  13. package/dist/Contacts/types.js.map +1 -1
  14. package/dist/Metrics/index.js +9 -9
  15. package/dist/Metrics/index.js.map +1 -1
  16. package/dist/Metrics/index.test.js +37 -10
  17. package/dist/Metrics/index.test.js.map +1 -1
  18. package/dist/SDKConnector/types.js.map +1 -1
  19. package/dist/common/testUtil.js +2 -1
  20. package/dist/common/testUtil.js.map +1 -1
  21. package/dist/common/types.js.map +1 -1
  22. package/dist/module/CallingClient/calling/call.js +15 -1
  23. package/dist/module/CallingClient/constants.js +4 -2
  24. package/dist/module/Contacts/ContactsClient.js +20 -15
  25. package/dist/module/Contacts/contactFixtures.js +32 -34
  26. package/dist/module/Metrics/index.js +9 -9
  27. package/dist/module/common/testUtil.js +1 -0
  28. package/dist/types/CallingClient/calling/call.d.ts +1 -0
  29. package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
  30. package/dist/types/CallingClient/constants.d.ts +3 -1
  31. package/dist/types/CallingClient/constants.d.ts.map +1 -1
  32. package/dist/types/Contacts/ContactsClient.d.ts.map +1 -1
  33. package/dist/types/Contacts/contactFixtures.d.ts +1 -1
  34. package/dist/types/Contacts/contactFixtures.d.ts.map +1 -1
  35. package/dist/types/Contacts/types.d.ts +1 -1
  36. package/dist/types/Contacts/types.d.ts.map +1 -1
  37. package/dist/types/SDKConnector/types.d.ts +2 -1
  38. package/dist/types/SDKConnector/types.d.ts.map +1 -1
  39. package/dist/types/common/testUtil.d.ts +1 -0
  40. package/dist/types/common/testUtil.d.ts.map +1 -1
  41. package/dist/types/common/types.d.ts +2 -1
  42. package/dist/types/common/types.d.ts.map +1 -1
  43. package/package.json +7 -7
@@ -2247,6 +2247,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2247
2247
  var mediaConnection = new _internalMediaCore.RoapMediaConnection({
2248
2248
  skipInactiveTransceivers: true,
2249
2249
  iceServers: [],
2250
+ iceCandidatesTimeout: _constants.ICE_CANDIDATES_TIMEOUT,
2250
2251
  sdpMunging: {
2251
2252
  convertPort9to0: true,
2252
2253
  addContentSlides: false
@@ -2774,9 +2775,31 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2774
2775
  }()
2775
2776
  /* istanbul ignore next */
2776
2777
  /**
2777
- * Setup a listener for roap events emitted by the media sdk.
2778
+ * Copy SDP's c-line to session level from media level.
2779
+ * SPARK-522437
2778
2780
  */
2779
2781
  )
2782
+ }, {
2783
+ key: "addSessionConnection",
2784
+ value: function addSessionConnection(sdp) {
2785
+ var lines = sdp.split(/\r\n|\r|\n/);
2786
+ var mIndex = lines.findIndex(function (line) {
2787
+ return line.startsWith('m=');
2788
+ });
2789
+ var tIndex = lines.findIndex(function (line) {
2790
+ return line.startsWith('t=');
2791
+ });
2792
+ if (mIndex !== -1 && mIndex < lines.length - 1 && lines[mIndex + 1].startsWith('c=')) {
2793
+ var cLine = lines[mIndex + 1];
2794
+ lines.splice(tIndex, 0, cLine);
2795
+ }
2796
+ return lines.join('\r\n');
2797
+ }
2798
+
2799
+ /* istanbul ignore next */
2800
+ /**
2801
+ * Setup a listener for roap events emitted by the media sdk.
2802
+ */
2780
2803
  }, {
2781
2804
  key: "mediaRoapEventsListener",
2782
2805
  value: function mediaRoapEventsListener() {
@@ -2786,7 +2809,7 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2786
2809
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2787
2810
  function () {
2788
2811
  var _ref6 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee25(event) {
2789
- var _event$roapMessage, _event$roapMessage2;
2812
+ var _event$roapMessage, _event$roapMessage2, _event$roapMessage3;
2790
2813
  var mediaOk, sdpVideoPortZero;
2791
2814
  return _regenerator.default.wrap(function _callee25$(_context26) {
2792
2815
  while (1) switch (_context26.prev = _context26.next) {
@@ -2796,10 +2819,13 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2796
2819
  file: _constants.CALL_FILE,
2797
2820
  method: _this14.mediaRoapEventsListener.name
2798
2821
  });
2822
+ if ((_event$roapMessage3 = event.roapMessage) !== null && _event$roapMessage3 !== void 0 && _event$roapMessage3.sdp) {
2823
+ event.roapMessage.sdp = _this14.addSessionConnection(event.roapMessage.sdp);
2824
+ }
2799
2825
  _context26.t0 = event.roapMessage.messageType;
2800
- _context26.next = _context26.t0 === _types4.RoapScenario.OK ? 5 : _context26.t0 === _types4.RoapScenario.OFFER ? 8 : _context26.t0 === _types4.RoapScenario.ANSWER ? 13 : _context26.t0 === _types4.RoapScenario.ERROR ? 16 : _context26.t0 === _types4.RoapScenario.OFFER_RESPONSE ? 18 : 21;
2826
+ _context26.next = _context26.t0 === _types4.RoapScenario.OK ? 6 : _context26.t0 === _types4.RoapScenario.OFFER ? 9 : _context26.t0 === _types4.RoapScenario.ANSWER ? 14 : _context26.t0 === _types4.RoapScenario.ERROR ? 17 : _context26.t0 === _types4.RoapScenario.OFFER_RESPONSE ? 19 : 22;
2801
2827
  break;
2802
- case 5:
2828
+ case 6:
2803
2829
  mediaOk = {
2804
2830
  received: false,
2805
2831
  message: event.roapMessage
@@ -2808,8 +2834,8 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2808
2834
  type: 'E_ROAP_OK',
2809
2835
  data: mediaOk
2810
2836
  });
2811
- return _context26.abrupt("break", 21);
2812
- case 8:
2837
+ return _context26.abrupt("break", 22);
2838
+ case 9:
2813
2839
  // TODO: Remove these after the Media-Core adds the fix
2814
2840
  sdpVideoPortZero = event.roapMessage.sdp.replace(/^m=(video) (?:\d+) /gim, 'm=$1 0 ');
2815
2841
  event.roapMessage.sdp = sdpVideoPortZero;
@@ -2818,28 +2844,28 @@ var Call = exports.Call = /*#__PURE__*/function (_Eventing) {
2818
2844
  type: 'E_SEND_CALL_SETUP',
2819
2845
  data: event.roapMessage
2820
2846
  });
2821
- return _context26.abrupt("break", 21);
2822
- case 13:
2847
+ return _context26.abrupt("break", 22);
2848
+ case 14:
2823
2849
  _this14.localRoapMessage = event.roapMessage;
2824
2850
  _this14.sendMediaStateMachineEvt({
2825
2851
  type: 'E_SEND_ROAP_ANSWER',
2826
2852
  data: event.roapMessage
2827
2853
  });
2828
- return _context26.abrupt("break", 21);
2829
- case 16:
2854
+ return _context26.abrupt("break", 22);
2855
+ case 17:
2830
2856
  _this14.sendMediaStateMachineEvt({
2831
2857
  type: 'E_ROAP_ERROR',
2832
2858
  data: event.roapMessage
2833
2859
  });
2834
- return _context26.abrupt("break", 21);
2835
- case 18:
2860
+ return _context26.abrupt("break", 22);
2861
+ case 19:
2836
2862
  _this14.localRoapMessage = event.roapMessage;
2837
2863
  _this14.sendMediaStateMachineEvt({
2838
2864
  type: 'E_SEND_ROAP_OFFER',
2839
2865
  data: event.roapMessage
2840
2866
  });
2841
- return _context26.abrupt("break", 21);
2842
- case 21:
2867
+ return _context26.abrupt("break", 22);
2868
+ case 22:
2843
2869
  case "end":
2844
2870
  return _context26.stop();
2845
2871
  }