@webex/plugin-meetings 3.0.0-beta.14 → 3.0.0-beta.16

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 (311) hide show
  1. package/UPGRADING.md +9 -9
  2. package/browsers.js +19 -24
  3. package/dist/common/browser-detection.js +1 -20
  4. package/dist/common/browser-detection.js.map +1 -1
  5. package/dist/common/collection.js +5 -20
  6. package/dist/common/collection.js.map +1 -1
  7. package/dist/common/config.js +0 -7
  8. package/dist/common/config.js.map +1 -1
  9. package/dist/common/errors/captcha-error.js +5 -26
  10. package/dist/common/errors/captcha-error.js.map +1 -1
  11. package/dist/common/errors/intent-to-join.js +5 -26
  12. package/dist/common/errors/intent-to-join.js.map +1 -1
  13. package/dist/common/errors/join-meeting.js +6 -27
  14. package/dist/common/errors/join-meeting.js.map +1 -1
  15. package/dist/common/errors/media.js +5 -26
  16. package/dist/common/errors/media.js.map +1 -1
  17. package/dist/common/errors/parameter.js +5 -33
  18. package/dist/common/errors/parameter.js.map +1 -1
  19. package/dist/common/errors/password-error.js +5 -26
  20. package/dist/common/errors/password-error.js.map +1 -1
  21. package/dist/common/errors/permission.js +4 -25
  22. package/dist/common/errors/permission.js.map +1 -1
  23. package/dist/common/errors/reconnection-in-progress.js +0 -17
  24. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  25. package/dist/common/errors/reconnection.js +5 -26
  26. package/dist/common/errors/reconnection.js.map +1 -1
  27. package/dist/common/errors/stats.js +5 -26
  28. package/dist/common/errors/stats.js.map +1 -1
  29. package/dist/common/errors/webex-errors.js +6 -41
  30. package/dist/common/errors/webex-errors.js.map +1 -1
  31. package/dist/common/errors/webex-meetings-error.js +1 -24
  32. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  33. package/dist/common/events/events-scope.js +0 -22
  34. package/dist/common/events/events-scope.js.map +1 -1
  35. package/dist/common/events/events.js +0 -23
  36. package/dist/common/events/events.js.map +1 -1
  37. package/dist/common/events/trigger-proxy.js +0 -12
  38. package/dist/common/events/trigger-proxy.js.map +1 -1
  39. package/dist/common/events/util.js +0 -15
  40. package/dist/common/events/util.js.map +1 -1
  41. package/dist/common/logs/logger-config.js +0 -4
  42. package/dist/common/logs/logger-config.js.map +1 -1
  43. package/dist/common/logs/logger-proxy.js +1 -8
  44. package/dist/common/logs/logger-proxy.js.map +1 -1
  45. package/dist/common/logs/request.js +35 -61
  46. package/dist/common/logs/request.js.map +1 -1
  47. package/dist/common/queue.js +4 -14
  48. package/dist/common/queue.js.map +1 -1
  49. package/dist/config.js +1 -5
  50. package/dist/config.js.map +1 -1
  51. package/dist/constants.js +45 -40
  52. package/dist/constants.js.map +1 -1
  53. package/dist/index.js +1 -17
  54. package/dist/index.js.map +1 -1
  55. package/dist/locus-info/controlsUtils.js +10 -28
  56. package/dist/locus-info/controlsUtils.js.map +1 -1
  57. package/dist/locus-info/embeddedAppsUtils.js +3 -26
  58. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  59. package/dist/locus-info/fullState.js +0 -15
  60. package/dist/locus-info/fullState.js.map +1 -1
  61. package/dist/locus-info/hostUtils.js +4 -12
  62. package/dist/locus-info/hostUtils.js.map +1 -1
  63. package/dist/locus-info/index.js +101 -193
  64. package/dist/locus-info/index.js.map +1 -1
  65. package/dist/locus-info/infoUtils.js +0 -38
  66. package/dist/locus-info/infoUtils.js.map +1 -1
  67. package/dist/locus-info/mediaSharesUtils.js +12 -38
  68. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  69. package/dist/locus-info/parser.js +87 -123
  70. package/dist/locus-info/parser.js.map +1 -1
  71. package/dist/locus-info/selfUtils.js +16 -81
  72. package/dist/locus-info/selfUtils.js.map +1 -1
  73. package/dist/media/index.js +43 -97
  74. package/dist/media/index.js.map +1 -1
  75. package/dist/media/internal-media-core-wrapper.js +0 -4
  76. package/dist/media/internal-media-core-wrapper.js.map +1 -1
  77. package/dist/media/properties.js +64 -110
  78. package/dist/media/properties.js.map +1 -1
  79. package/dist/media/util.js +2 -9
  80. package/dist/media/util.js.map +1 -1
  81. package/dist/mediaQualityMetrics/config.js +10 -12
  82. package/dist/mediaQualityMetrics/config.js.map +1 -1
  83. package/dist/meeting/effectsState.js +120 -192
  84. package/dist/meeting/effectsState.js.map +1 -1
  85. package/dist/meeting/in-meeting-actions.js +0 -13
  86. package/dist/meeting/in-meeting-actions.js.map +1 -1
  87. package/dist/meeting/index.js +819 -1591
  88. package/dist/meeting/index.js.map +1 -1
  89. package/dist/meeting/muteState.js +31 -78
  90. package/dist/meeting/muteState.js.map +1 -1
  91. package/dist/meeting/request.js +160 -230
  92. package/dist/meeting/request.js.map +1 -1
  93. package/dist/meeting/request.type.js +0 -1
  94. package/dist/meeting/request.type.js.map +1 -1
  95. package/dist/meeting/state.js +21 -31
  96. package/dist/meeting/state.js.map +1 -1
  97. package/dist/meeting/util.js +19 -158
  98. package/dist/meeting/util.js.map +1 -1
  99. package/dist/meeting-info/collection.js +3 -25
  100. package/dist/meeting-info/collection.js.map +1 -1
  101. package/dist/meeting-info/index.js +10 -33
  102. package/dist/meeting-info/index.js.map +1 -1
  103. package/dist/meeting-info/meeting-info-v2.js +179 -268
  104. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  105. package/dist/meeting-info/request.js +1 -16
  106. package/dist/meeting-info/request.js.map +1 -1
  107. package/dist/meeting-info/util.js +98 -183
  108. package/dist/meeting-info/util.js.map +1 -1
  109. package/dist/meeting-info/utilv2.js +137 -228
  110. package/dist/meeting-info/utilv2.js.map +1 -1
  111. package/dist/meetings/collection.js +3 -21
  112. package/dist/meetings/collection.js.map +1 -1
  113. package/dist/meetings/index.js +450 -582
  114. package/dist/meetings/index.js.map +1 -1
  115. package/dist/meetings/request.js +7 -30
  116. package/dist/meetings/request.js.map +1 -1
  117. package/dist/meetings/util.js +99 -155
  118. package/dist/meetings/util.js.map +1 -1
  119. package/dist/member/index.js +49 -89
  120. package/dist/member/index.js.map +1 -1
  121. package/dist/member/util.js +17 -68
  122. package/dist/member/util.js.map +1 -1
  123. package/dist/members/collection.js +2 -12
  124. package/dist/members/collection.js.map +1 -1
  125. package/dist/members/index.js +72 -194
  126. package/dist/members/index.js.map +1 -1
  127. package/dist/members/request.js +21 -56
  128. package/dist/members/request.js.map +1 -1
  129. package/dist/members/util.js +9 -38
  130. package/dist/members/util.js.map +1 -1
  131. package/dist/metrics/config.js +0 -2
  132. package/dist/metrics/config.js.map +1 -1
  133. package/dist/metrics/constants.js +1 -2
  134. package/dist/metrics/constants.js.map +1 -1
  135. package/dist/metrics/index.js +48 -136
  136. package/dist/metrics/index.js.map +1 -1
  137. package/dist/multistream/mediaRequestManager.js +12 -28
  138. package/dist/multistream/mediaRequestManager.js.map +1 -1
  139. package/dist/multistream/multistreamMedia.js +11 -21
  140. package/dist/multistream/multistreamMedia.js.map +1 -1
  141. package/dist/multistream/receiveSlot.js +7 -47
  142. package/dist/multistream/receiveSlot.js.map +1 -1
  143. package/dist/multistream/receiveSlotManager.js +38 -77
  144. package/dist/multistream/receiveSlotManager.js.map +1 -1
  145. package/dist/multistream/remoteMedia.js +11 -56
  146. package/dist/multistream/remoteMedia.js.map +1 -1
  147. package/dist/multistream/remoteMediaGroup.js +6 -40
  148. package/dist/multistream/remoteMediaGroup.js.map +1 -1
  149. package/dist/multistream/remoteMediaManager.js +221 -380
  150. package/dist/multistream/remoteMediaManager.js.map +1 -1
  151. package/dist/networkQualityMonitor/index.js +28 -57
  152. package/dist/networkQualityMonitor/index.js.map +1 -1
  153. package/dist/personal-meeting-room/index.js +10 -45
  154. package/dist/personal-meeting-room/index.js.map +1 -1
  155. package/dist/personal-meeting-room/request.js +2 -33
  156. package/dist/personal-meeting-room/request.js.map +1 -1
  157. package/dist/personal-meeting-room/util.js +0 -13
  158. package/dist/personal-meeting-room/util.js.map +1 -1
  159. package/dist/reachability/index.js +100 -166
  160. package/dist/reachability/index.js.map +1 -1
  161. package/dist/reachability/request.js +2 -18
  162. package/dist/reachability/request.js.map +1 -1
  163. package/dist/reactions/reactions.js +0 -2
  164. package/dist/reactions/reactions.js.map +1 -1
  165. package/dist/reactions/reactions.type.js +2 -6
  166. package/dist/reactions/reactions.type.js.map +1 -1
  167. package/dist/reconnection-manager/index.js +294 -459
  168. package/dist/reconnection-manager/index.js.map +1 -1
  169. package/dist/roap/index.js +18 -53
  170. package/dist/roap/index.js.map +1 -1
  171. package/dist/roap/request.js +13 -55
  172. package/dist/roap/request.js.map +1 -1
  173. package/dist/roap/turnDiscovery.js +10 -52
  174. package/dist/roap/turnDiscovery.js.map +1 -1
  175. package/dist/statsAnalyzer/global.js +0 -2
  176. package/dist/statsAnalyzer/global.js.map +1 -1
  177. package/dist/statsAnalyzer/index.js +66 -174
  178. package/dist/statsAnalyzer/index.js.map +1 -1
  179. package/dist/statsAnalyzer/mqaUtil.js +54 -53
  180. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  181. package/dist/transcription/index.js +13 -45
  182. package/dist/transcription/index.js.map +1 -1
  183. package/internal-README.md +7 -6
  184. package/package.json +18 -18
  185. package/src/common/browser-detection.ts +9 -6
  186. package/src/common/collection.ts +3 -1
  187. package/src/common/errors/captcha-error.ts +6 -6
  188. package/src/common/errors/intent-to-join.ts +6 -6
  189. package/src/common/errors/join-meeting.ts +12 -8
  190. package/src/common/errors/media.ts +6 -6
  191. package/src/common/errors/parameter.ts +9 -6
  192. package/src/common/errors/password-error.ts +6 -6
  193. package/src/common/errors/permission.ts +5 -5
  194. package/src/common/errors/reconnection.ts +6 -6
  195. package/src/common/errors/stats.ts +6 -6
  196. package/src/common/errors/webex-errors.ts +7 -5
  197. package/src/common/errors/webex-meetings-error.ts +1 -1
  198. package/src/common/events/events-scope.ts +5 -1
  199. package/src/common/events/events.ts +5 -1
  200. package/src/common/events/trigger-proxy.ts +8 -3
  201. package/src/common/events/util.ts +1 -2
  202. package/src/common/logs/logger-proxy.ts +21 -10
  203. package/src/common/logs/request.ts +11 -8
  204. package/src/config.ts +11 -11
  205. package/src/constants.ts +1 -1
  206. package/src/index.js +1 -1
  207. package/src/locus-info/controlsUtils.ts +34 -24
  208. package/src/locus-info/fullState.ts +15 -11
  209. package/src/locus-info/hostUtils.ts +4 -3
  210. package/src/locus-info/index.ts +25 -34
  211. package/src/locus-info/infoUtils.ts +12 -4
  212. package/src/locus-info/mediaSharesUtils.ts +4 -4
  213. package/src/locus-info/parser.ts +45 -68
  214. package/src/locus-info/selfUtils.ts +106 -57
  215. package/src/media/index.ts +123 -135
  216. package/src/media/internal-media-core-wrapper.ts +2 -2
  217. package/src/media/properties.ts +30 -20
  218. package/src/media/util.ts +1 -1
  219. package/src/mediaQualityMetrics/config.ts +46 -46
  220. package/src/meeting/effectsState.ts +35 -35
  221. package/src/meeting/in-meeting-actions.ts +7 -3
  222. package/src/meeting/index.ts +1559 -1292
  223. package/src/meeting/muteState.ts +62 -31
  224. package/src/meeting/request.ts +155 -116
  225. package/src/meeting/request.type.ts +8 -8
  226. package/src/meeting/state.ts +45 -30
  227. package/src/meeting/util.ts +101 -70
  228. package/src/meeting-info/collection.ts +2 -1
  229. package/src/meeting-info/index.ts +32 -30
  230. package/src/meeting-info/meeting-info-v2.ts +106 -108
  231. package/src/meeting-info/request.ts +9 -3
  232. package/src/meeting-info/util.ts +54 -46
  233. package/src/meeting-info/utilv2.ts +59 -53
  234. package/src/meetings/collection.ts +1 -1
  235. package/src/meetings/index.ts +512 -440
  236. package/src/meetings/request.ts +26 -24
  237. package/src/meetings/util.ts +29 -29
  238. package/src/member/index.ts +55 -49
  239. package/src/member/util.ts +26 -13
  240. package/src/members/collection.ts +0 -1
  241. package/src/members/index.ts +182 -126
  242. package/src/members/request.ts +46 -14
  243. package/src/members/util.ts +44 -42
  244. package/src/metrics/config.ts +254 -81
  245. package/src/metrics/constants.ts +0 -2
  246. package/src/metrics/index.ts +84 -71
  247. package/src/multistream/multistreamMedia.ts +1 -0
  248. package/src/multistream/receiveSlot.ts +1 -0
  249. package/src/multistream/receiveSlotManager.ts +1 -0
  250. package/src/multistream/remoteMedia.ts +1 -1
  251. package/src/multistream/remoteMediaGroup.ts +2 -1
  252. package/src/multistream/remoteMediaManager.ts +3 -0
  253. package/src/networkQualityMonitor/index.ts +20 -23
  254. package/src/personal-meeting-room/index.ts +12 -16
  255. package/src/personal-meeting-room/request.ts +10 -3
  256. package/src/personal-meeting-room/util.ts +3 -3
  257. package/src/reachability/index.ts +61 -59
  258. package/src/reachability/request.ts +36 -32
  259. package/src/reactions/reactions.ts +4 -4
  260. package/src/reactions/reactions.type.ts +4 -3
  261. package/src/reconnection-manager/index.ts +139 -84
  262. package/src/roap/index.ts +46 -38
  263. package/src/roap/request.ts +44 -31
  264. package/src/roap/turnDiscovery.ts +59 -30
  265. package/src/statsAnalyzer/global.ts +30 -33
  266. package/src/statsAnalyzer/index.ts +432 -175
  267. package/src/statsAnalyzer/mqaUtil.ts +178 -72
  268. package/src/transcription/index.ts +34 -32
  269. package/test/integration/spec/journey.js +664 -463
  270. package/test/integration/spec/space-meeting.js +319 -204
  271. package/test/integration/spec/transcription.js +7 -8
  272. package/test/unit/spec/common/browser-detection.js +9 -28
  273. package/test/unit/spec/fixture/locus.js +92 -90
  274. package/test/unit/spec/locus-info/controlsUtils.js +5 -5
  275. package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
  276. package/test/unit/spec/locus-info/index.js +1 -2
  277. package/test/unit/spec/locus-info/infoUtils.js +26 -33
  278. package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
  279. package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
  280. package/test/unit/spec/locus-info/parser.js +3 -9
  281. package/test/unit/spec/locus-info/selfConstant.js +72 -103
  282. package/test/unit/spec/locus-info/selfUtils.js +21 -12
  283. package/test/unit/spec/meeting/effectsState.js +36 -46
  284. package/test/unit/spec/meeting/in-meeting-actions.ts +2 -3
  285. package/test/unit/spec/meeting/index.js +1279 -685
  286. package/test/unit/spec/meeting/muteState.js +42 -33
  287. package/test/unit/spec/meeting/request.js +57 -46
  288. package/test/unit/spec/meeting/utils.js +78 -53
  289. package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
  290. package/test/unit/spec/meeting-info/request.js +7 -9
  291. package/test/unit/spec/meeting-info/util.js +11 -12
  292. package/test/unit/spec/meeting-info/utilv2.js +110 -74
  293. package/test/unit/spec/meetings/collection.js +1 -1
  294. package/test/unit/spec/meetings/index.js +438 -257
  295. package/test/unit/spec/meetings/utils.js +14 -12
  296. package/test/unit/spec/member/index.js +0 -1
  297. package/test/unit/spec/member/util.js +5 -6
  298. package/test/unit/spec/members/index.js +104 -54
  299. package/test/unit/spec/members/request.js +29 -20
  300. package/test/unit/spec/members/utils.js +8 -5
  301. package/test/unit/spec/metrics/index.js +16 -21
  302. package/test/unit/spec/networkQualityMonitor/index.js +21 -15
  303. package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
  304. package/test/unit/spec/reachability/index.ts +9 -11
  305. package/test/unit/spec/reconnection-manager/index.js +16 -18
  306. package/test/unit/spec/roap/turnDiscovery.ts +22 -19
  307. package/test/unit/spec/stats-analyzer/index.js +25 -20
  308. package/test/utils/cmr.js +44 -42
  309. package/test/utils/testUtils.js +83 -74
  310. package/test/utils/webex-config.js +18 -18
  311. package/test/utils/webex-test-users.js +53 -50
@@ -1,65 +1,36 @@
1
1
  "use strict";
2
2
 
3
3
  var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
4
-
5
4
  var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
6
-
7
5
  var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
8
-
9
6
  _Object$defineProperty(exports, "__esModule", {
10
7
  value: true
11
8
  });
12
-
13
9
  exports.default = void 0;
14
-
15
10
  var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
16
-
17
11
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
18
-
19
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
20
-
21
13
  var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
22
-
23
14
  var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
24
-
25
15
  var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
26
-
27
16
  var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
28
-
29
17
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
30
-
31
18
  var _isEqual2 = _interopRequireDefault(require("lodash/isEqual"));
32
-
33
19
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
34
-
35
20
  var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
36
-
37
21
  var _constants = require("../constants");
38
-
39
22
  var _metrics = _interopRequireDefault(require("../metrics"));
40
-
41
23
  var _config = require("../metrics/config");
42
-
43
- var _infoUtils = _interopRequireDefault(require("../locus-info/infoUtils"));
44
-
45
- var _fullState = _interopRequireDefault(require("../locus-info/fullState"));
46
-
47
- var _selfUtils = _interopRequireDefault(require("../locus-info/selfUtils"));
48
-
49
- var _hostUtils = _interopRequireDefault(require("../locus-info/hostUtils"));
50
-
51
- var _controlsUtils = _interopRequireDefault(require("../locus-info/controlsUtils"));
52
-
53
- var _embeddedAppsUtils = _interopRequireDefault(require("../locus-info/embeddedAppsUtils"));
54
-
55
- var _mediaSharesUtils = _interopRequireDefault(require("../locus-info/mediaSharesUtils"));
56
-
57
- var _parser = _interopRequireDefault(require("../locus-info/parser"));
58
-
24
+ var _infoUtils = _interopRequireDefault(require("./infoUtils"));
25
+ var _fullState = _interopRequireDefault(require("./fullState"));
26
+ var _selfUtils = _interopRequireDefault(require("./selfUtils"));
27
+ var _hostUtils = _interopRequireDefault(require("./hostUtils"));
28
+ var _controlsUtils = _interopRequireDefault(require("./controlsUtils"));
29
+ var _embeddedAppsUtils = _interopRequireDefault(require("./embeddedAppsUtils"));
30
+ var _mediaSharesUtils = _interopRequireDefault(require("./mediaSharesUtils"));
31
+ var _parser = _interopRequireDefault(require("./parser"));
59
32
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
60
-
61
33
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
62
-
63
34
  /**
64
35
  * @description LocusInfo extends ChildEmitter to convert locusInfo info a private emitter to parent object
65
36
  * @export
@@ -68,12 +39,9 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
68
39
  */
69
40
  var LocusInfo = /*#__PURE__*/function (_EventsScope) {
70
41
  (0, _inherits2.default)(LocusInfo, _EventsScope);
71
-
72
42
  var _super = _createSuper(LocusInfo);
73
-
74
43
  function LocusInfo(updateMeeting, webex, meetingId) {
75
44
  var _this;
76
-
77
45
  (0, _classCallCheck2.default)(this, LocusInfo);
78
46
  _this = _super.call(this);
79
47
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "compareAndUpdateFlags", void 0);
@@ -114,6 +82,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
114
82
  _this.locusParser = new _parser.default();
115
83
  return _this;
116
84
  }
85
+
117
86
  /**
118
87
  * Apply locus delta data to meeting
119
88
  * @param {string} action Locus delta action
@@ -121,45 +90,38 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
121
90
  * @param {Meeting} meeting
122
91
  * @returns {undefined}
123
92
  */
124
-
125
-
126
93
  (0, _createClass2.default)(LocusInfo, [{
127
94
  key: "applyLocusDeltaData",
128
95
  value: function applyLocusDeltaData(action, locus, meeting) {
129
96
  var _this2 = this;
130
-
131
97
  var _LocusDeltaParser$loc = _parser.default.loci,
132
- DESYNC = _LocusDeltaParser$loc.DESYNC,
133
- USE_CURRENT = _LocusDeltaParser$loc.USE_CURRENT,
134
- USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING;
135
-
98
+ DESYNC = _LocusDeltaParser$loc.DESYNC,
99
+ USE_CURRENT = _LocusDeltaParser$loc.USE_CURRENT,
100
+ USE_INCOMING = _LocusDeltaParser$loc.USE_INCOMING;
136
101
  switch (action) {
137
102
  case USE_INCOMING:
138
103
  meeting.locusInfo.onDeltaLocus(locus);
139
104
  break;
140
-
141
105
  case USE_CURRENT:
142
106
  meeting.locusDesync = false;
143
107
  meeting.needToGetFullLocus = false;
144
108
  break;
145
-
146
109
  case DESYNC:
147
110
  meeting.meetingRequest.getFullLocus({
148
111
  desync: true,
149
112
  locusUrl: meeting.locusUrl
150
113
  }).then(function (res) {
151
- meeting.locusInfo.onFullLocus(res.body); // Notify parser to resume processing delta events
114
+ meeting.locusInfo.onFullLocus(res.body);
115
+ // Notify parser to resume processing delta events
152
116
  // now that we have full locus from DESYNC.
153
-
154
117
  _this2.locusParser.resume();
155
118
  });
156
119
  break;
157
-
158
120
  default:
159
121
  _loggerProxy.default.logger.info("Locus-info:index#applyLocusDeltaData --> Unknown locus delta action: ".concat(action));
160
-
161
122
  }
162
123
  }
124
+
163
125
  /**
164
126
  * Adds locus delta to parser's queue
165
127
  * and registers a function handler
@@ -168,12 +130,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
168
130
  * @param {Meeting} meeting
169
131
  * @returns {undefined}
170
132
  */
171
-
172
133
  }, {
173
134
  key: "handleLocusDelta",
174
135
  value: function handleLocusDelta(locus, meeting) {
175
136
  var _this3 = this;
176
-
177
137
  // register a function to process delta actions
178
138
  if (!this.locusParser.onDeltaAction) {
179
139
  // delta action, along with associated loci
@@ -181,17 +141,16 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
181
141
  this.locusParser.onDeltaAction = function (action, parsedLoci) {
182
142
  _this3.applyLocusDeltaData(action, parsedLoci, meeting);
183
143
  };
184
- } // queue delta event with parser
185
-
186
-
144
+ }
145
+ // queue delta event with parser
187
146
  this.locusParser.onDeltaEvent(locus);
188
147
  }
148
+
189
149
  /**
190
150
  * @param {Locus} locus
191
151
  * @returns {undefined}
192
152
  * @memberof LocusInfo
193
153
  */
194
-
195
154
  }, {
196
155
  key: "init",
197
156
  value: function init() {
@@ -206,6 +165,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
206
165
  this.membership = locus.membership || null;
207
166
  this.identities = locus.identities || null;
208
167
  this.participants = locus.participants || null;
168
+
209
169
  /**
210
170
  * Stores the delta values for a changed participant.
211
171
  *
@@ -223,50 +183,50 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
223
183
  * @private
224
184
  * @member LocusInfo
225
185
  */
186
+ this.deltaParticipants = [];
226
187
 
227
- this.deltaParticipants = []; // above section only updates the locusInfo object
188
+ // above section only updates the locusInfo object
228
189
  // The below section makes sure it updates the locusInfo as well as updates the meeting object
229
-
230
- this.updateParticipants(locus.participants); // For 1:1 space meeting the conversation Url does not exist in locus.conversation
231
-
190
+ this.updateParticipants(locus.participants);
191
+ // For 1:1 space meeting the conversation Url does not exist in locus.conversation
232
192
  this.updateConversationUrl(locus.conversationUrl, locus.info);
233
193
  this.updateControls(locus.controls);
234
194
  this.updateLocusUrl(locus.url);
235
195
  this.updateFullState(locus.fullState);
236
196
  this.updateMeetingInfo(locus.info);
237
- this.updateEmbeddedApps(locus.embeddedApps); // self and participants generate sipUrl for 1:1 meeting
238
-
197
+ this.updateEmbeddedApps(locus.embeddedApps);
198
+ // self and participants generate sipUrl for 1:1 meeting
239
199
  this.updateSelf(locus.self, locus.participants);
240
200
  this.updateHostInfo(locus.host);
241
201
  this.updateMediaShares(locus.mediaShares);
242
202
  }
203
+
243
204
  /**
244
205
  * @param {Object} locus
245
206
  * @returns {undefined}
246
207
  * @memberof LocusInfo
247
208
  */
248
-
249
209
  }, {
250
210
  key: "initialSetup",
251
211
  value: function initialSetup(locus) {
252
- this.onFullLocus(locus); // Change it to true after it receives it first locus object
212
+ this.onFullLocus(locus);
253
213
 
214
+ // Change it to true after it receives it first locus object
254
215
  this.emitChange = true;
255
216
  }
217
+
256
218
  /**
257
219
  * @param {Meeting} meeting
258
220
  * @param {Object} data
259
221
  * @returns {undefined}
260
222
  * @memberof LocusInfo
261
223
  */
262
-
263
224
  }, {
264
225
  key: "parse",
265
226
  value: function parse(meeting, data) {
227
+ // eslint-disable-next-line @typescript-eslint/no-shadow
266
228
  var eventType = data.eventType;
267
-
268
229
  _loggerProxy.default.logger.info("Locus-info:index#parse --> received locus data: ".concat(eventType));
269
-
270
230
  switch (eventType) {
271
231
  case _constants.LOCUSEVENT.PARTICIPANT_JOIN:
272
232
  case _constants.LOCUSEVENT.PARTICIPANT_LEFT:
@@ -284,17 +244,16 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
284
244
  case _constants.LOCUSEVENT.FLOOR_RELEASED:
285
245
  this.onFullLocus(data.locus, eventType);
286
246
  break;
287
-
288
247
  case _constants.LOCUSEVENT.DIFFERENCE:
289
248
  this.handleLocusDelta(data.locus, meeting);
290
249
  break;
291
-
292
250
  default:
293
251
  // Why will there be a event with no eventType ????
294
252
  // we may not need this, we can get full locus
295
253
  this.handleLocusDelta(data.locus, meeting);
296
254
  }
297
255
  }
256
+
298
257
  /**
299
258
  * @param {String} scope
300
259
  * @param {String} eventName
@@ -302,12 +261,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
302
261
  * @returns {undefined}
303
262
  * @memberof LocusInfo
304
263
  */
305
-
306
264
  }, {
307
265
  key: "emitScoped",
308
266
  value: function emitScoped(scope, eventName, args) {
309
267
  return this.emit(scope, eventName, args);
310
268
  }
269
+
311
270
  /**
312
271
  * updates the locus with full locus object
313
272
  * @param {object} locus locus object
@@ -315,14 +274,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
315
274
  * @returns {object} null
316
275
  * @memberof LocusInfo
317
276
  */
318
-
277
+ // eslint-disable-next-line @typescript-eslint/no-shadow
319
278
  }, {
320
279
  key: "onFullLocus",
321
280
  value: function onFullLocus(locus, eventType) {
322
281
  if (!locus) {
323
282
  _loggerProxy.default.logger.error('Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.');
324
283
  }
325
-
326
284
  this.updateParticipantDeltas(locus.participants);
327
285
  this.scheduledMeeting = locus.meeting || null;
328
286
  this.participants = locus.participants;
@@ -330,17 +288,18 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
330
288
  this.updateParticipants(locus.participants);
331
289
  this.isMeetingActive();
332
290
  this.handleOneOnOneEvent(eventType);
333
- this.updateEmbeddedApps(locus.embeddedApps); // set current (working copy) for parser
334
-
291
+ this.updateEmbeddedApps(locus.embeddedApps);
292
+ // set current (working copy) for parser
335
293
  this.locusParser.workingCopy = locus;
336
- } // used for ringing stops on one on one
294
+ }
337
295
 
296
+ // used for ringing stops on one on one
338
297
  /**
339
298
  * @param {String} eventType
340
299
  * @returns {undefined}
341
300
  * @memberof LocusInfo
342
301
  */
343
-
302
+ // eslint-disable-next-line @typescript-eslint/no-shadow
344
303
  }, {
345
304
  key: "handleOneOnOneEvent",
346
305
  value: function handleOneOnOneEvent(eventType) {
@@ -355,9 +314,8 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
355
314
  remoteDeclined: true,
356
315
  remoteAnswered: false
357
316
  });
358
- } // for 1:1 bob calls alice and alice answers, notify the meeting state
359
-
360
-
317
+ }
318
+ // for 1:1 bob calls alice and alice answers, notify the meeting state
361
319
  if (eventType === _constants.LOCUSEVENT.PARTICIPANT_JOIN) {
362
320
  // trigger the event for stop ringing
363
321
  this.emitScoped({
@@ -370,12 +328,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
370
328
  }
371
329
  }
372
330
  }
331
+
373
332
  /**
374
333
  * @param {Object} locus
375
334
  * @returns {undefined}
376
335
  * @memberof LocusInfo
377
336
  */
378
-
379
337
  }, {
380
338
  key: "onDeltaLocus",
381
339
  value: function onDeltaLocus(locus) {
@@ -383,12 +341,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
383
341
  this.updateParticipants(locus.participants);
384
342
  this.isMeetingActive();
385
343
  }
344
+
386
345
  /**
387
346
  * @param {Object} locus
388
347
  * @returns {undefined}
389
348
  * @memberof LocusInfo
390
349
  */
391
-
392
350
  }, {
393
351
  key: "updateLocusInfo",
394
352
  value: function updateLocusInfo(locus) {
@@ -409,33 +367,34 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
409
367
  this.updateMemberShip(locus.membership);
410
368
  this.updateIdentifiers(locus.identities);
411
369
  this.updateEmbeddedApps(locus.embeddedApps);
412
- this.compareAndUpdate(); // update which required to compare different objects from locus
370
+ this.compareAndUpdate();
371
+ // update which required to compare different objects from locus
413
372
  }
373
+
414
374
  /**
415
375
  * @param {Array} participants
416
376
  * @param {Object} self
417
377
  * @returns {Array}
418
378
  * @memberof LocusInfo
419
379
  */
420
-
421
380
  }, {
422
381
  key: "getLocusPartner",
423
382
  value: function getLocusPartner(participants, self) {
424
383
  if (!participants || participants.length === 0) {
425
384
  return null;
426
385
  }
427
-
428
386
  return participants.find(function (participant) {
429
387
  return self && participant.identity !== self.identity && (participants.length <= 2 || participant.type === _constants._USER_ && !participant.removed);
430
- } // @ts-ignore
388
+ }
389
+ // @ts-ignore
431
390
  ) || this.partner;
432
- } // TODO: all the leave states need to be checked
391
+ }
433
392
 
393
+ // TODO: all the leave states need to be checked
434
394
  /**
435
395
  * @returns {undefined}
436
396
  * @memberof LocusInfo
437
397
  */
438
-
439
398
  }, {
440
399
  key: "isMeetingActive",
441
400
  value: function isMeetingActive() {
@@ -444,20 +403,22 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
444
403
  var partner = this.getLocusPartner(this.participants, this.self);
445
404
  this.updateMeeting({
446
405
  partner: partner
447
- }); // Check if guest user needs to be checked here
406
+ });
407
+
408
+ // Check if guest user needs to be checked here
409
+
448
410
  // 1) when bob declines call from bob, (bob='DECLINED')
449
411
  // 2) When alice rejects call to bob , (bob='NOTIFIED')
412
+
450
413
  // When we dont add MEDIA for condition 2. The state of bob='IDLE'
451
414
 
452
415
  if (this.fullState && this.fullState.state === _constants.LOCUS.STATE.INACTIVE) {
453
416
  // TODO: update the meeting state
454
417
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Call Ended, locus state is inactive.');
455
-
456
418
  _metrics.default.postEvent({
457
419
  event: _config.eventType.REMOTE_ENDED,
458
420
  meetingId: this.meetingId
459
421
  });
460
-
461
422
  this.emitScoped({
462
423
  file: 'locus-info',
463
424
  function: 'isMeetingActive'
@@ -470,7 +431,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
470
431
  event: _config.eventType.REMOTE_ENDED,
471
432
  meetingId: this.meetingId
472
433
  });
473
-
474
434
  this.emitScoped({
475
435
  file: 'locus-info',
476
436
  function: 'isMeetingActive'
@@ -484,7 +444,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
484
444
  event: _config.eventType.REMOTE_ENDED,
485
445
  meetingId: this.meetingId
486
446
  });
487
-
488
447
  this.emitScoped({
489
448
  file: 'locus-info',
490
449
  function: 'isMeetingActive'
@@ -494,15 +453,14 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
494
453
  });
495
454
  }
496
455
  } else if (this.parsedLocus.fullState.type === _constants._MEETING_) {
497
- if (this.fullState && (this.fullState.state === _constants.LOCUS.STATE.INACTIVE || // @ts-ignore
456
+ if (this.fullState && (this.fullState.state === _constants.LOCUS.STATE.INACTIVE ||
457
+ // @ts-ignore
498
458
  this.fullState.state === _constants.LOCUS.STATE.TERMINATING)) {
499
459
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting is ending due to inactive or terminating');
500
-
501
460
  _metrics.default.postEvent({
502
461
  event: _config.eventType.REMOTE_ENDED,
503
462
  meetingId: this.meetingId
504
463
  });
505
-
506
464
  this.emitScoped({
507
465
  file: 'locus-info',
508
466
  function: 'isMeetingActive'
@@ -516,7 +474,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
516
474
  event: _config.eventType.REMOTE_ENDED,
517
475
  meetingId: this.meetingId
518
476
  });
519
-
520
477
  this.emitScoped({
521
478
  file: 'locus-info',
522
479
  function: 'isMeetingActive'
@@ -524,7 +481,8 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
524
481
  reason: _constants.MEETING_REMOVED_REASON.FULLSTATE_REMOVED,
525
482
  shouldLeave: false
526
483
  });
527
- } // If you are guest and you are removed from the meeting
484
+ }
485
+ // If you are guest and you are removed from the meeting
528
486
  // You wont get any further events
529
487
  else if (this.parsedLocus.self && this.parsedLocus.self.removed) {
530
488
  // Check if we need to send an event
@@ -540,13 +498,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
540
498
  _loggerProxy.default.logger.warn('Locus-info:index#isMeetingActive --> Meeting Type is unknown.');
541
499
  }
542
500
  }
501
+
543
502
  /**
544
503
  * checks if the host permissions have changed while in the meeting
545
504
  * This would be the case if your role as host or moderator has been updated
546
505
  * @returns {undefined}
547
506
  * @memberof LocusInfo
548
507
  */
549
-
550
508
  }, {
551
509
  key: "compareAndUpdate",
552
510
  value: function compareAndUpdate() {
@@ -556,17 +514,16 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
556
514
  this.compareSelfAndHost();
557
515
  }
558
516
  }
517
+
559
518
  /**
560
519
  * compared the self object to check if the user has host permissions
561
520
  * @returns {undefined}
562
521
  * @memberof LocusInfo
563
522
  */
564
-
565
523
  }, {
566
524
  key: "compareSelfAndHost",
567
525
  value: function compareSelfAndHost() {
568
526
  var _this$parsedLocus$hos;
569
-
570
527
  // In some cases the host info is not present but the moderator values changes from null to false so it triggers an update
571
528
  if (this.parsedLocus.self.selfIdentity === ((_this$parsedLocus$hos = this.parsedLocus.host) === null || _this$parsedLocus$hos === void 0 ? void 0 : _this$parsedLocus$hos.hostId) && this.parsedLocus.self.moderator) {
572
529
  this.emitScoped({
@@ -584,6 +541,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
584
541
  });
585
542
  }
586
543
  }
544
+
587
545
  /**
588
546
  * Update the deltaParticipants property of this object based on a list of
589
547
  * provided participants.
@@ -591,22 +549,19 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
591
549
  * @param {Array} [participants] - The participants to update against.
592
550
  * @returns {void}
593
551
  */
594
-
595
552
  }, {
596
553
  key: "updateParticipantDeltas",
597
554
  value: function updateParticipantDeltas() {
598
555
  var _this4 = this;
599
-
600
556
  var participants = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
601
-
602
557
  // Used to find a participant within a participants collection.
603
558
  var findParticipant = function findParticipant(participant, collection) {
604
559
  return collection.find(function (item) {
605
560
  return item.person.id === participant.person.id;
606
561
  });
607
- }; // Generates an object that indicates which state properties have changed.
608
-
562
+ };
609
563
 
564
+ // Generates an object that indicates which state properties have changed.
610
565
  var generateDelta = function generateDelta() {
611
566
  var prevState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
612
567
  var newState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
@@ -615,8 +570,9 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
615
570
  audioStatus: prevState.audioStatus !== newState.audioStatus,
616
571
  videoSlidesStatus: prevState.videoSlidesStatus !== newState.videoSlidesStatus,
617
572
  videoStatus: prevState.videoStatus !== newState.videoStatus
618
- }; // Clean the object
573
+ };
619
574
 
575
+ // Clean the object
620
576
  (0, _keys.default)(deltas).forEach(function (key) {
621
577
  if (deltas[key] !== true) {
622
578
  delete deltas[key];
@@ -624,22 +580,20 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
624
580
  });
625
581
  return deltas;
626
582
  };
627
-
628
583
  this.deltaParticipants = participants.reduce(function (collection, participant) {
629
584
  var existingParticipant = findParticipant(participant, _this4.participants || []) || {};
630
585
  var delta = generateDelta(existingParticipant.status, participant.status);
631
586
  var changed = (0, _keys.default)(delta).length > 0;
632
-
633
587
  if (changed) {
634
588
  collection.push({
635
589
  person: participant.person,
636
590
  delta: delta
637
591
  });
638
592
  }
639
-
640
593
  return collection;
641
594
  }, []);
642
595
  }
596
+
643
597
  /**
644
598
  *
645
599
  * @param {Object} participants new participants object
@@ -647,12 +601,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
647
601
  * @returns {Array} updatedParticipants
648
602
  * @memberof LocusInfo
649
603
  */
650
-
651
604
  }, {
652
605
  key: "updateParticipants",
653
606
  value: function updateParticipants(participants) {
654
607
  var _this$parsedLocus$con;
655
-
656
608
  this.emitScoped({
657
609
  file: 'locus-info',
658
610
  function: 'updateParticipants'
@@ -664,30 +616,27 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
664
616
  hostId: this.parsedLocus.host && this.parsedLocus.host.hostId
665
617
  });
666
618
  }
619
+
667
620
  /**
668
621
  * @param {Object} controls
669
622
  * @returns {undefined}
670
623
  * @memberof LocusInfo
671
624
  */
672
-
673
625
  }, {
674
626
  key: "updateControls",
675
627
  value: function updateControls(controls) {
676
628
  if (controls && !(0, _isEqual2.default)(this.controls, controls)) {
677
629
  this.parsedLocus.controls = _controlsUtils.default.parse(controls);
678
-
679
630
  var _ControlsUtils$getCon = _controlsUtils.default.getControls(this.controls, controls),
680
- _ControlsUtils$getCon2 = _ControlsUtils$getCon.updates,
681
- hasRecordingChanged = _ControlsUtils$getCon2.hasRecordingChanged,
682
- hasRecordingPausedChanged = _ControlsUtils$getCon2.hasRecordingPausedChanged,
683
- hasMeetingContainerChanged = _ControlsUtils$getCon2.hasMeetingContainerChanged,
684
- hasTranscribeChanged = _ControlsUtils$getCon2.hasTranscribeChanged,
685
- hasEntryExitToneChanged = _ControlsUtils$getCon2.hasEntryExitToneChanged,
686
- current = _ControlsUtils$getCon.current;
687
-
631
+ _ControlsUtils$getCon2 = _ControlsUtils$getCon.updates,
632
+ hasRecordingChanged = _ControlsUtils$getCon2.hasRecordingChanged,
633
+ hasRecordingPausedChanged = _ControlsUtils$getCon2.hasRecordingPausedChanged,
634
+ hasMeetingContainerChanged = _ControlsUtils$getCon2.hasMeetingContainerChanged,
635
+ hasTranscribeChanged = _ControlsUtils$getCon2.hasTranscribeChanged,
636
+ hasEntryExitToneChanged = _ControlsUtils$getCon2.hasEntryExitToneChanged,
637
+ current = _ControlsUtils$getCon.current;
688
638
  if (hasRecordingChanged || hasRecordingPausedChanged) {
689
639
  var state = null;
690
-
691
640
  if (hasRecordingPausedChanged) {
692
641
  if (current.record.paused) {
693
642
  state = _constants.RECORDING_STATE.PAUSED;
@@ -698,7 +647,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
698
647
  } else if (hasRecordingChanged) {
699
648
  state = current.record.recording ? _constants.RECORDING_STATE.RECORDING : _constants.RECORDING_STATE.IDLE;
700
649
  }
701
-
702
650
  this.emitScoped({
703
651
  file: 'locus-info',
704
652
  function: 'updateControls'
@@ -708,7 +656,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
708
656
  lastModified: current.record.lastModified
709
657
  });
710
658
  }
711
-
712
659
  if (hasMeetingContainerChanged) {
713
660
  var meetingContainerUrl = current.meetingContainer.meetingContainerUrl;
714
661
  this.emitScoped({
@@ -718,11 +665,10 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
718
665
  meetingContainerUrl: meetingContainerUrl
719
666
  });
720
667
  }
721
-
722
668
  if (hasTranscribeChanged) {
723
669
  var _current$transcribe = current.transcribe,
724
- transcribing = _current$transcribe.transcribing,
725
- caption = _current$transcribe.caption;
670
+ transcribing = _current$transcribe.transcribing,
671
+ caption = _current$transcribe.caption;
726
672
  this.emitScoped({
727
673
  file: 'locus-info',
728
674
  function: 'updateControls'
@@ -731,7 +677,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
731
677
  caption: caption
732
678
  });
733
679
  }
734
-
735
680
  if (hasEntryExitToneChanged) {
736
681
  var entryExitTone = current.entryExitTone;
737
682
  this.emitScoped({
@@ -744,17 +689,16 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
744
689
  entryExitTone: entryExitTone
745
690
  });
746
691
  }
747
-
748
692
  this.controls = controls;
749
693
  }
750
694
  }
695
+
751
696
  /**
752
697
  * @param {String} conversationUrl
753
698
  * @param {Object} info
754
699
  * @returns {undefined}
755
700
  * @memberof LocusInfo
756
701
  */
757
-
758
702
  }, {
759
703
  key: "updateConversationUrl",
760
704
  value: function updateConversationUrl(conversationUrl, info) {
@@ -770,12 +714,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
770
714
  });
771
715
  }
772
716
  }
717
+
773
718
  /**
774
719
  * @param {Object} created
775
720
  * @returns {undefined}
776
721
  * @memberof LocusInfo
777
722
  */
778
-
779
723
  }, {
780
724
  key: "updateCreated",
781
725
  value: function updateCreated(created) {
@@ -783,20 +727,18 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
783
727
  this.created = created;
784
728
  }
785
729
  }
730
+
786
731
  /**
787
732
  * @param {Object} fullState
788
733
  * @returns {undefined}
789
734
  * @memberof LocusInfo
790
735
  */
791
-
792
736
  }, {
793
737
  key: "updateFullState",
794
738
  value: function updateFullState(fullState) {
795
739
  if (fullState && !(0, _isEqual2.default)(this.fullState, fullState)) {
796
740
  var result = _fullState.default.getFullState(this.fullState, fullState);
797
-
798
741
  this.updateMeeting(result.current);
799
-
800
742
  if (result.updates.meetingStateChangedTo) {
801
743
  this.emitScoped({
802
744
  file: 'locus-info',
@@ -806,7 +748,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
806
748
  currentState: result.current.meetingState
807
749
  });
808
750
  }
809
-
810
751
  if (result.updates.meetingTypeChangedTo) {
811
752
  this.emitScoped({
812
753
  file: 'locus-info',
@@ -815,11 +756,11 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
815
756
  type: result.current.type
816
757
  });
817
758
  }
818
-
819
759
  this.parsedLocus.fullState = result.current;
820
760
  this.fullState = fullState;
821
761
  }
822
762
  }
763
+
823
764
  /**
824
765
  * handles when the locus.host is updated
825
766
  * @param {Object} host the locus.host property
@@ -827,16 +768,13 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
827
768
  * @memberof LocusInfo
828
769
  * emits internal event locus_info_update_host
829
770
  */
830
-
831
771
  }, {
832
772
  key: "updateHostInfo",
833
773
  value: function updateHostInfo(host) {
834
774
  if (host && !(0, _isEqual2.default)(this.host, host)) {
835
775
  var parsedHosts = _hostUtils.default.getHosts(this.host, host);
836
-
837
776
  this.updateMeeting(parsedHosts.current);
838
777
  this.parsedLocus.host = parsedHosts.current;
839
-
840
778
  if (parsedHosts.updates.isNewHost) {
841
779
  this.compareAndUpdateFlags.compareSelfAndHost = true;
842
780
  this.emitScoped({
@@ -847,31 +785,26 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
847
785
  oldHost: parsedHosts.previous
848
786
  });
849
787
  }
850
-
851
788
  this.host = host;
852
789
  } else {
853
790
  this.compareAndUpdateFlags.compareSelfAndHost = false;
854
791
  }
855
792
  }
793
+
856
794
  /**
857
795
  * @param {Object} info
858
796
  * @param {Object} self
859
797
  * @returns {undefined}
860
798
  * @memberof LocusInfo
861
799
  */
862
-
863
800
  }, {
864
801
  key: "updateMeetingInfo",
865
802
  value: function updateMeetingInfo(info, self) {
866
803
  if (info && !(0, _isEqual2.default)(this.info, info)) {
867
804
  var _this$parsedLocus$sel;
868
-
869
805
  var roles = self ? _selfUtils.default.getRoles(self) : ((_this$parsedLocus$sel = this.parsedLocus.self) === null || _this$parsedLocus$sel === void 0 ? void 0 : _this$parsedLocus$sel.roles) || [];
870
-
871
806
  var isJoined = _selfUtils.default.isJoined(self || this.parsedLocus.self);
872
-
873
807
  var parsedInfo = _infoUtils.default.getInfos(this.parsedLocus.info, info, roles, isJoined);
874
-
875
808
  this.emitScoped({
876
809
  file: 'locus-info',
877
810
  function: 'updateMeetingInfo'
@@ -879,33 +812,30 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
879
812
  info: parsedInfo.current,
880
813
  self: self
881
814
  });
882
-
883
815
  if (parsedInfo.updates.isLocked) {
884
816
  this.emitScoped({
885
817
  file: 'locus-info',
886
818
  function: 'updateMeetingInfo'
887
819
  }, _constants.LOCUSINFO.EVENTS.MEETING_LOCKED, info);
888
820
  }
889
-
890
821
  if (parsedInfo.updates.isUnlocked) {
891
822
  this.emitScoped({
892
823
  file: 'locus-info',
893
824
  function: 'updateMeetingInfo'
894
825
  }, _constants.LOCUSINFO.EVENTS.MEETING_UNLOCKED, info);
895
826
  }
896
-
897
827
  this.info = info;
898
- this.parsedLocus.info = parsedInfo.current; // Parses the info and adds necessary values
899
-
828
+ this.parsedLocus.info = parsedInfo.current;
829
+ // Parses the info and adds necessary values
900
830
  this.updateMeeting(parsedInfo.current);
901
831
  }
902
832
  }
833
+
903
834
  /**
904
835
  * @param {Object} embeddedApps
905
836
  * @returns {undefined}
906
837
  * @memberof LocusInfo
907
838
  */
908
-
909
839
  }, {
910
840
  key: "updateEmbeddedApps",
911
841
  value: function updateEmbeddedApps(embeddedApps) {
@@ -913,9 +843,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
913
843
  if (_embeddedAppsUtils.default.areSimilar(this.embeddedApps, embeddedApps)) {
914
844
  return;
915
845
  }
916
-
917
846
  var parsedEmbeddedApps = _embeddedAppsUtils.default.parse(embeddedApps);
918
-
919
847
  this.updateMeeting({
920
848
  embeddedApps: parsedEmbeddedApps
921
849
  });
@@ -925,6 +853,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
925
853
  }, _constants.LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED, parsedEmbeddedApps);
926
854
  this.embeddedApps = embeddedApps;
927
855
  }
856
+
928
857
  /**
929
858
  * handles when the locus.mediaShares is updated
930
859
  * @param {Object} mediaShares the locus.mediaShares property
@@ -932,13 +861,11 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
932
861
  * @memberof LocusInfo
933
862
  * emits internal event locus_info_update_media_shares
934
863
  */
935
-
936
864
  }, {
937
865
  key: "updateMediaShares",
938
866
  value: function updateMediaShares(mediaShares) {
939
867
  if (mediaShares && !(0, _isEqual2.default)(this.mediaShares, mediaShares)) {
940
868
  var parsedMediaShares = _mediaSharesUtils.default.getMediaShares(this.mediaShares, mediaShares);
941
-
942
869
  this.updateMeeting(parsedMediaShares.current);
943
870
  this.emitScoped({
944
871
  file: 'locus-info',
@@ -951,12 +878,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
951
878
  this.mediaShares = mediaShares;
952
879
  }
953
880
  }
881
+
954
882
  /**
955
883
  * @param {String} participantsUrl
956
884
  * @returns {undefined}
957
885
  * @memberof LocusInfo
958
886
  */
959
-
960
887
  }, {
961
888
  key: "updateParticipantsUrl",
962
889
  value: function updateParticipantsUrl(participantsUrl) {
@@ -964,12 +891,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
964
891
  this.participantsUrl = participantsUrl;
965
892
  }
966
893
  }
894
+
967
895
  /**
968
896
  * @param {Object} replace
969
897
  * @returns {undefined}
970
898
  * @memberof LocusInfo
971
899
  */
972
-
973
900
  }, {
974
901
  key: "updateReplace",
975
902
  value: function updateReplace(replace) {
@@ -977,6 +904,7 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
977
904
  this.replace = replace;
978
905
  }
979
906
  }
907
+
980
908
  /**
981
909
  * handles when the locus.self is updated
982
910
  * @param {Object} self the locus.mediaShares property
@@ -985,7 +913,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
985
913
  * @memberof LocusInfo
986
914
  * emits internal events self_admitted_guest, self_unadmitted_guest, locus_info_update_self
987
915
  */
988
-
989
916
  }, {
990
917
  key: "updateSelf",
991
918
  value: function updateSelf(self, participants) {
@@ -993,29 +920,24 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
993
920
  if (self && !(0, _isEqual2.default)(this.self, self)) {
994
921
  // @ts-ignore
995
922
  var parsedSelves = _selfUtils.default.getSelves(this.self, self, this.webex.internal.device.url);
996
-
997
923
  this.updateMeeting(parsedSelves.current);
998
924
  this.parsedLocus.self = parsedSelves.current;
999
925
  var element = this.parsedLocus.states[this.parsedLocus.states.length - 1];
1000
-
1001
926
  if (element !== parsedSelves.current.state) {
1002
927
  this.parsedLocus.states.push(parsedSelves.current.state);
1003
- } // TODO: check if we need to save the sipUri here as well
1004
- // this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri));
1005
-
928
+ }
1006
929
 
930
+ // TODO: check if we need to save the sipUri here as well
931
+ // this.emit(LOCUSINFO.EVENTS.MEETING_UPDATE, SelfUtils.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri));
1007
932
  var result = _selfUtils.default.getSipUrl(this.getLocusPartner(participants, self), this.parsedLocus.fullState.type, this.parsedLocus.info.sipUri);
1008
-
1009
933
  if (result.sipUri) {
1010
934
  this.updateMeeting(result);
1011
935
  }
1012
-
1013
936
  if (parsedSelves.updates.moderatorChanged) {
1014
937
  this.compareAndUpdateFlags.compareHostAndSelf = true;
1015
938
  } else {
1016
939
  this.compareAndUpdateFlags.compareHostAndSelf = false;
1017
940
  }
1018
-
1019
941
  if (parsedSelves.updates.layoutChanged) {
1020
942
  this.emitScoped({
1021
943
  file: 'locus-info',
@@ -1024,7 +946,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1024
946
  layout: parsedSelves.current.layout
1025
947
  });
1026
948
  }
1027
-
1028
949
  if (parsedSelves.updates.isMediaInactiveOrReleased) {
1029
950
  this.emitScoped({
1030
951
  file: 'locus-info',
@@ -1033,14 +954,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1033
954
  reason: self.reason
1034
955
  });
1035
956
  }
1036
-
1037
957
  if (parsedSelves.updates.moderatorChanged) {
1038
958
  this.emitScoped({
1039
959
  file: 'locus-info',
1040
960
  function: 'updateSelf'
1041
961
  }, _constants.LOCUSINFO.EVENTS.SELF_MODERATOR_CHANGED, self);
1042
962
  }
1043
-
1044
963
  if (parsedSelves.updates.localAudioUnmuteRequiredByServer) {
1045
964
  this.emitScoped({
1046
965
  file: 'locus-info',
@@ -1050,7 +969,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1050
969
  unmuteAllowed: parsedSelves.current.unmuteAllowed
1051
970
  });
1052
971
  }
1053
-
1054
972
  if (parsedSelves.updates.isMutedByOthersChanged) {
1055
973
  this.emitScoped({
1056
974
  file: 'locus-info',
@@ -1060,39 +978,34 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1060
978
  unmuteAllowed: parsedSelves.current.unmuteAllowed
1061
979
  });
1062
980
  }
1063
-
1064
981
  if (parsedSelves.updates.localAudioUnmuteRequestedByServer) {
1065
982
  this.emitScoped({
1066
983
  file: 'locus-info',
1067
984
  function: 'updateSelf'
1068
985
  }, _constants.LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUESTED, {});
1069
986
  }
1070
-
1071
987
  if (parsedSelves.updates.isUserUnadmitted) {
1072
988
  this.emitScoped({
1073
989
  file: 'locus-info',
1074
990
  function: 'updateSelf'
1075
991
  }, _constants.LOCUSINFO.EVENTS.SELF_UNADMITTED_GUEST, self);
1076
992
  }
1077
-
1078
993
  if (parsedSelves.updates.isUserAdmitted) {
1079
994
  this.emitScoped({
1080
995
  file: 'locus-info',
1081
996
  function: 'updateSelf'
1082
997
  }, _constants.LOCUSINFO.EVENTS.SELF_ADMITTED_GUEST, self);
1083
998
  }
1084
-
1085
999
  if (parsedSelves.updates.isMediaInactive) {
1086
1000
  this.emitScoped({
1087
1001
  file: 'locus-info',
1088
1002
  function: 'updateSelf'
1089
- }, // @ts-ignore
1003
+ },
1004
+ // @ts-ignore
1090
1005
  _constants.LOCUSINFO.EVENTS.MEDIA_INACTIVITY, _selfUtils.default.getMediaStatus(self.mediaSessions));
1091
1006
  }
1092
-
1093
1007
  if (parsedSelves.updates.audioStateChange || parsedSelves.updates.videoStateChange || parsedSelves.updates.shareStateChange) {
1094
1008
  var _parsedSelves$current, _parsedSelves$current2, _parsedSelves$current3;
1095
-
1096
1009
  this.emitScoped({
1097
1010
  file: 'locus-info',
1098
1011
  function: 'updateSelf'
@@ -1102,14 +1015,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1102
1015
  shareStatus: (_parsedSelves$current3 = parsedSelves.current.currentMediaStatus) === null || _parsedSelves$current3 === void 0 ? void 0 : _parsedSelves$current3.share
1103
1016
  });
1104
1017
  }
1105
-
1106
1018
  if (parsedSelves.updates.isUserObserving) {
1107
1019
  this.emitScoped({
1108
1020
  file: 'locus-info',
1109
1021
  function: 'updateSelf'
1110
1022
  }, _constants.LOCUSINFO.EVENTS.SELF_OBSERVING);
1111
1023
  }
1112
-
1113
1024
  if (parsedSelves.updates.canNotViewTheParticipantListChanged) {
1114
1025
  this.emitScoped({
1115
1026
  file: 'locus-info',
@@ -1118,7 +1029,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1118
1029
  canNotViewTheParticipantList: parsedSelves.current.canNotViewTheParticipantList
1119
1030
  });
1120
1031
  }
1121
-
1122
1032
  if (parsedSelves.updates.isSharingBlockedChanged) {
1123
1033
  this.emitScoped({
1124
1034
  file: 'locus-info',
@@ -1127,7 +1037,6 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1127
1037
  isSharingBlocked: parsedSelves.current.isSharingBlocked
1128
1038
  });
1129
1039
  }
1130
-
1131
1040
  this.emitScoped({
1132
1041
  file: 'locus-info',
1133
1042
  function: 'updateSelf'
@@ -1135,20 +1044,20 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1135
1044
  oldSelf: parsedSelves.previous,
1136
1045
  newSelf: parsedSelves.current
1137
1046
  });
1138
- this.parsedLocus.self = parsedSelves.current; // @ts-ignore
1139
-
1047
+ this.parsedLocus.self = parsedSelves.current;
1048
+ // @ts-ignore
1140
1049
  this.self = self;
1141
1050
  } else {
1142
1051
  this.compareAndUpdateFlags.compareHostAndSelf = false;
1143
1052
  }
1144
1053
  }
1054
+
1145
1055
  /**
1146
1056
  * handles when the locus.url is updated
1147
1057
  * @param {String} url
1148
1058
  * @returns {undefined}
1149
1059
  * emits internal event locus_info_update_url
1150
1060
  */
1151
-
1152
1061
  }, {
1153
1062
  key: "updateLocusUrl",
1154
1063
  value: function updateLocusUrl(url) {
@@ -1163,12 +1072,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1163
1072
  }, _constants.EVENTS.LOCUS_INFO_UPDATE_URL, url);
1164
1073
  }
1165
1074
  }
1075
+
1166
1076
  /**
1167
1077
  * @param {String} aclUrl
1168
1078
  * @returns {undefined}
1169
1079
  * @memberof LocusInfo
1170
1080
  */
1171
-
1172
1081
  }, {
1173
1082
  key: "updateAclUrl",
1174
1083
  value: function updateAclUrl(aclUrl) {
@@ -1176,12 +1085,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1176
1085
  this.aclUrl = aclUrl;
1177
1086
  }
1178
1087
  }
1088
+
1179
1089
  /**
1180
1090
  * @param {Number} baseSequence
1181
1091
  * @returns {undefined}
1182
1092
  * @memberof LocusInfo
1183
1093
  */
1184
-
1185
1094
  }, {
1186
1095
  key: "updateBasequence",
1187
1096
  value: function updateBasequence(baseSequence) {
@@ -1189,12 +1098,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1189
1098
  this.baseSequence = baseSequence;
1190
1099
  }
1191
1100
  }
1101
+
1192
1102
  /**
1193
1103
  * @param {Number} sequence
1194
1104
  * @returns {undefined}
1195
1105
  * @memberof LocusInfo
1196
1106
  */
1197
-
1198
1107
  }, {
1199
1108
  key: "updateSequence",
1200
1109
  value: function updateSequence(sequence) {
@@ -1202,12 +1111,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1202
1111
  this.sequence = sequence;
1203
1112
  }
1204
1113
  }
1114
+
1205
1115
  /**
1206
1116
  * @param {Object} membership
1207
1117
  * @returns {undefined}
1208
1118
  * @memberof LocusInfo
1209
1119
  */
1210
-
1211
1120
  }, {
1212
1121
  key: "updateMemberShip",
1213
1122
  value: function updateMemberShip(membership) {
@@ -1215,12 +1124,12 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1215
1124
  this.membership = membership;
1216
1125
  }
1217
1126
  }
1127
+
1218
1128
  /**
1219
1129
  * @param {Array} identities
1220
1130
  * @returns {undefined}
1221
1131
  * @memberof LocusInfo
1222
1132
  */
1223
-
1224
1133
  }, {
1225
1134
  key: "updateIdentifiers",
1226
1135
  value: function updateIdentifiers(identities) {
@@ -1231,6 +1140,5 @@ var LocusInfo = /*#__PURE__*/function (_EventsScope) {
1231
1140
  }]);
1232
1141
  return LocusInfo;
1233
1142
  }(_eventsScope.default);
1234
-
1235
1143
  exports.default = LocusInfo;
1236
1144
  //# sourceMappingURL=index.js.map