@webex/plugin-meetings 3.0.0-beta.1 → 3.0.0-beta.11

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 (281) hide show
  1. package/dist/common/browser-detection.js.map +1 -1
  2. package/dist/common/collection.js.map +1 -1
  3. package/dist/common/config.js.map +1 -1
  4. package/dist/common/errors/captcha-error.js +7 -0
  5. package/dist/common/errors/captcha-error.js.map +1 -1
  6. package/dist/common/errors/intent-to-join.js +8 -0
  7. package/dist/common/errors/intent-to-join.js.map +1 -1
  8. package/dist/common/errors/join-meeting.js +8 -0
  9. package/dist/common/errors/join-meeting.js.map +1 -1
  10. package/dist/common/errors/media.js +7 -0
  11. package/dist/common/errors/media.js.map +1 -1
  12. package/dist/common/errors/parameter.js.map +1 -1
  13. package/dist/common/errors/password-error.js +7 -0
  14. package/dist/common/errors/password-error.js.map +1 -1
  15. package/dist/common/errors/permission.js +7 -0
  16. package/dist/common/errors/permission.js.map +1 -1
  17. package/dist/common/errors/reconnection-in-progress.js.map +1 -1
  18. package/dist/common/errors/reconnection.js +7 -0
  19. package/dist/common/errors/reconnection.js.map +1 -1
  20. package/dist/common/errors/stats.js +7 -0
  21. package/dist/common/errors/stats.js.map +1 -1
  22. package/dist/common/errors/webex-errors.js +5 -29
  23. package/dist/common/errors/webex-errors.js.map +1 -1
  24. package/dist/common/errors/webex-meetings-error.js +5 -2
  25. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  26. package/dist/common/events/events-scope.js.map +1 -1
  27. package/dist/common/events/events.js.map +1 -1
  28. package/dist/common/events/trigger-proxy.js.map +1 -1
  29. package/dist/common/events/util.js.map +1 -1
  30. package/dist/common/logs/logger-config.js.map +1 -1
  31. package/dist/common/logs/logger-proxy.js.map +1 -1
  32. package/dist/common/logs/request.js +3 -0
  33. package/dist/common/logs/request.js.map +1 -1
  34. package/dist/common/queue.js.map +1 -1
  35. package/dist/config.js +1 -0
  36. package/dist/config.js.map +1 -1
  37. package/dist/constants.js +15 -74
  38. package/dist/constants.js.map +1 -1
  39. package/dist/locus-info/controlsUtils.js.map +1 -1
  40. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  41. package/dist/locus-info/fullState.js.map +1 -1
  42. package/dist/locus-info/hostUtils.js.map +1 -1
  43. package/dist/locus-info/index.js +43 -5
  44. package/dist/locus-info/index.js.map +1 -1
  45. package/dist/locus-info/infoUtils.js +4 -0
  46. package/dist/locus-info/infoUtils.js.map +1 -1
  47. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  48. package/dist/locus-info/parser.js +12 -3
  49. package/dist/locus-info/parser.js.map +1 -1
  50. package/dist/locus-info/selfUtils.js.map +1 -1
  51. package/dist/media/index.js +71 -210
  52. package/dist/media/index.js.map +1 -1
  53. package/dist/media/internal-media-core-wrapper.js +22 -0
  54. package/dist/media/internal-media-core-wrapper.js.map +1 -0
  55. package/dist/media/properties.js +32 -25
  56. package/dist/media/properties.js.map +1 -1
  57. package/dist/media/util.js +0 -27
  58. package/dist/media/util.js.map +1 -1
  59. package/dist/mediaQualityMetrics/config.js.map +1 -1
  60. package/dist/meeting/effectsState.js +8 -1
  61. package/dist/meeting/effectsState.js.map +1 -1
  62. package/dist/meeting/index.js +1146 -602
  63. package/dist/meeting/index.js.map +1 -1
  64. package/dist/meeting/muteState.js +6 -0
  65. package/dist/meeting/muteState.js.map +1 -1
  66. package/dist/meeting/request.js +83 -24
  67. package/dist/meeting/request.js.map +1 -1
  68. package/dist/meeting/state.js.map +1 -1
  69. package/dist/meeting/util.js +5 -44
  70. package/dist/meeting/util.js.map +1 -1
  71. package/dist/meeting-info/collection.js +4 -1
  72. package/dist/meeting-info/collection.js.map +1 -1
  73. package/dist/meeting-info/index.js +5 -0
  74. package/dist/meeting-info/index.js.map +1 -1
  75. package/dist/meeting-info/meeting-info-v2.js +14 -2
  76. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  77. package/dist/meeting-info/request.js +3 -0
  78. package/dist/meeting-info/request.js.map +1 -1
  79. package/dist/meeting-info/util.js.map +1 -1
  80. package/dist/meeting-info/utilv2.js.map +1 -1
  81. package/dist/meetings/collection.js +4 -1
  82. package/dist/meetings/collection.js.map +1 -1
  83. package/dist/meetings/index.js +136 -25
  84. package/dist/meetings/index.js.map +1 -1
  85. package/dist/meetings/request.js +4 -0
  86. package/dist/meetings/request.js.map +1 -1
  87. package/dist/meetings/util.js +24 -1
  88. package/dist/meetings/util.js.map +1 -1
  89. package/dist/member/index.js +30 -7
  90. package/dist/member/index.js.map +1 -1
  91. package/dist/member/util.js +2 -1
  92. package/dist/member/util.js.map +1 -1
  93. package/dist/members/collection.js +1 -0
  94. package/dist/members/collection.js.map +1 -1
  95. package/dist/members/index.js +82 -1
  96. package/dist/members/index.js.map +1 -1
  97. package/dist/members/request.js +19 -9
  98. package/dist/members/request.js.map +1 -1
  99. package/dist/members/util.js.map +1 -1
  100. package/dist/metrics/config.js.map +1 -1
  101. package/dist/metrics/constants.js.map +1 -1
  102. package/dist/metrics/index.js +8 -0
  103. package/dist/metrics/index.js.map +1 -1
  104. package/dist/multistream/mediaRequestManager.js +133 -0
  105. package/dist/multistream/mediaRequestManager.js.map +1 -0
  106. package/dist/multistream/multistreamMedia.js +116 -0
  107. package/dist/multistream/multistreamMedia.js.map +1 -0
  108. package/dist/multistream/receiveSlot.js +209 -0
  109. package/dist/multistream/receiveSlot.js.map +1 -0
  110. package/dist/multistream/receiveSlotManager.js +195 -0
  111. package/dist/multistream/receiveSlotManager.js.map +1 -0
  112. package/dist/multistream/remoteMedia.js +289 -0
  113. package/dist/multistream/remoteMedia.js.map +1 -0
  114. package/dist/multistream/remoteMediaGroup.js +243 -0
  115. package/dist/multistream/remoteMediaGroup.js.map +1 -0
  116. package/dist/multistream/remoteMediaManager.js +1113 -0
  117. package/dist/multistream/remoteMediaManager.js.map +1 -0
  118. package/dist/networkQualityMonitor/index.js +10 -2
  119. package/dist/networkQualityMonitor/index.js.map +1 -1
  120. package/dist/personal-meeting-room/index.js +11 -0
  121. package/dist/personal-meeting-room/index.js.map +1 -1
  122. package/dist/personal-meeting-room/request.js +2 -1
  123. package/dist/personal-meeting-room/request.js.map +1 -1
  124. package/dist/personal-meeting-room/util.js.map +1 -1
  125. package/dist/reachability/index.js +17 -7
  126. package/dist/reachability/index.js.map +1 -1
  127. package/dist/reachability/request.js +1 -0
  128. package/dist/reachability/request.js.map +1 -1
  129. package/dist/reactions/reactions.js +111 -0
  130. package/dist/reactions/reactions.js.map +1 -0
  131. package/dist/reactions/reactions.type.js +40 -0
  132. package/dist/reactions/reactions.type.js.map +1 -0
  133. package/dist/reconnection-manager/index.js +130 -132
  134. package/dist/reconnection-manager/index.js.map +1 -1
  135. package/dist/roap/index.js +58 -231
  136. package/dist/roap/index.js.map +1 -1
  137. package/dist/roap/request.js +7 -116
  138. package/dist/roap/request.js.map +1 -1
  139. package/dist/roap/turnDiscovery.js +20 -6
  140. package/dist/roap/turnDiscovery.js.map +1 -1
  141. package/dist/statsAnalyzer/global.js +2 -0
  142. package/dist/statsAnalyzer/global.js.map +1 -1
  143. package/dist/statsAnalyzer/index.js +58 -37
  144. package/dist/statsAnalyzer/index.js.map +1 -1
  145. package/dist/statsAnalyzer/mqaUtil.js +9 -3
  146. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  147. package/dist/transcription/index.js +10 -3
  148. package/dist/transcription/index.js.map +1 -1
  149. package/package.json +21 -20
  150. package/src/common/{browser-detection.js → browser-detection.ts} +1 -1
  151. package/src/common/collection.ts +6 -6
  152. package/src/common/{config.js → config.ts} +1 -1
  153. package/src/common/errors/{captcha-error.js → captcha-error.ts} +5 -1
  154. package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +6 -1
  155. package/src/common/errors/{join-meeting.js → join-meeting.ts} +6 -1
  156. package/src/common/errors/{media.js → media.ts} +5 -1
  157. package/src/common/errors/parameter.ts +3 -2
  158. package/src/common/errors/{password-error.js → password-error.ts} +5 -1
  159. package/src/common/errors/{permission.js → permission.ts} +5 -1
  160. package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
  161. package/src/common/errors/{reconnection.js → reconnection.ts} +5 -1
  162. package/src/common/errors/{stats.js → stats.ts} +5 -1
  163. package/src/common/errors/{webex-errors.js → webex-errors.ts} +1 -20
  164. package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +3 -1
  165. package/src/common/events/{events-scope.js → events-scope.ts} +1 -1
  166. package/src/common/events/{events.js → events.ts} +0 -0
  167. package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +1 -2
  168. package/src/common/events/{util.js → util.ts} +1 -1
  169. package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
  170. package/src/common/logs/{logger-proxy.js → logger-proxy.ts} +1 -1
  171. package/src/common/logs/{request.js → request.ts} +12 -2
  172. package/src/common/queue.ts +1 -2
  173. package/src/{config.js → config.ts} +2 -0
  174. package/src/constants.ts +139 -179
  175. package/src/locus-info/{controlsUtils.js → controlsUtils.ts} +4 -4
  176. package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
  177. package/src/locus-info/{fullState.js → fullState.ts} +1 -1
  178. package/src/locus-info/{hostUtils.js → hostUtils.ts} +5 -5
  179. package/src/locus-info/{index.js → index.ts} +67 -32
  180. package/src/locus-info/{infoUtils.js → infoUtils.ts} +7 -4
  181. package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +13 -13
  182. package/src/locus-info/{parser.js → parser.ts} +22 -12
  183. package/src/locus-info/{selfUtils.js → selfUtils.ts} +17 -19
  184. package/src/media/{index.js → index.ts} +130 -205
  185. package/src/media/internal-media-core-wrapper.ts +9 -0
  186. package/src/media/{properties.js → properties.ts} +35 -29
  187. package/src/media/util.ts +16 -0
  188. package/src/mediaQualityMetrics/{config.js → config.ts} +1 -1
  189. package/src/meeting/{effectsState.js → effectsState.ts} +12 -6
  190. package/src/meeting/{index.js → index.ts} +993 -474
  191. package/src/meeting/{muteState.js → muteState.ts} +16 -11
  192. package/src/meeting/{request.js → request.ts} +148 -36
  193. package/src/meeting/{state.js → state.ts} +6 -6
  194. package/src/meeting/{util.js → util.ts} +9 -51
  195. package/src/meeting-info/{collection.js → collection.ts} +4 -1
  196. package/src/meeting-info/{index.js → index.ts} +10 -6
  197. package/src/meeting-info/{meeting-info-v2.js → meeting-info-v2.ts} +28 -10
  198. package/src/meeting-info/{request.js → request.ts} +6 -2
  199. package/src/meeting-info/{util.js → util.ts} +6 -5
  200. package/src/meeting-info/{utilv2.js → utilv2.ts} +8 -7
  201. package/src/meetings/{collection.js → collection.ts} +5 -2
  202. package/src/meetings/{index.js → index.ts} +118 -22
  203. package/src/meetings/{request.js → request.ts} +6 -1
  204. package/src/meetings/{util.js → util.ts} +28 -5
  205. package/src/member/{index.js → index.ts} +46 -15
  206. package/src/member/{util.js → util.ts} +17 -16
  207. package/src/members/{collection.js → collection.ts} +2 -1
  208. package/src/members/{index.js → index.ts} +94 -26
  209. package/src/members/{request.js → request.ts} +16 -5
  210. package/src/members/{util.js → util.ts} +7 -7
  211. package/src/metrics/{config.js → config.ts} +0 -2
  212. package/src/metrics/{constants.js → constants.ts} +0 -0
  213. package/src/metrics/{index.js → index.ts} +27 -8
  214. package/src/multistream/mediaRequestManager.ts +166 -0
  215. package/src/multistream/multistreamMedia.ts +92 -0
  216. package/src/multistream/receiveSlot.ts +141 -0
  217. package/src/multistream/receiveSlotManager.ts +142 -0
  218. package/src/multistream/remoteMedia.ts +228 -0
  219. package/src/multistream/remoteMediaGroup.ts +224 -0
  220. package/src/multistream/remoteMediaManager.ts +911 -0
  221. package/src/networkQualityMonitor/{index.js → index.ts} +18 -3
  222. package/src/personal-meeting-room/{index.js → index.ts} +17 -4
  223. package/src/personal-meeting-room/{request.js → request.ts} +3 -1
  224. package/src/personal-meeting-room/{util.js → util.ts} +1 -1
  225. package/src/reachability/{index.js → index.ts} +28 -17
  226. package/src/reachability/request.ts +4 -2
  227. package/src/reactions/reactions.ts +104 -0
  228. package/src/reactions/reactions.type.ts +36 -0
  229. package/src/reconnection-manager/{index.js → index.ts} +81 -65
  230. package/src/roap/index.ts +229 -0
  231. package/src/roap/{request.js → request.ts} +15 -74
  232. package/src/roap/turnDiscovery.ts +26 -11
  233. package/src/statsAnalyzer/{global.js → global.ts} +2 -0
  234. package/src/statsAnalyzer/{index.js → index.ts} +66 -61
  235. package/src/statsAnalyzer/{mqaUtil.js → mqaUtil.ts} +6 -1
  236. package/src/transcription/{index.js → index.ts} +16 -11
  237. package/test/integration/spec/journey.js +1 -1
  238. package/test/integration/spec/space-meeting.js +1 -2
  239. package/test/unit/spec/locus-info/infoUtils.js +17 -1
  240. package/test/unit/spec/media/index.ts +207 -0
  241. package/test/unit/spec/media/properties.ts +73 -82
  242. package/test/unit/spec/meeting/effectsState.js +1 -3
  243. package/test/unit/spec/meeting/index.js +672 -245
  244. package/test/unit/spec/meeting/muteState.js +7 -0
  245. package/test/unit/spec/meeting/request.js +25 -1
  246. package/test/unit/spec/meeting/utils.js +63 -2
  247. package/test/unit/spec/meetings/index.js +0 -4
  248. package/test/unit/spec/members/index.js +164 -2
  249. package/test/unit/spec/multistream/mediaRequestManager.ts +515 -0
  250. package/test/unit/spec/multistream/receiveSlot.ts +104 -0
  251. package/test/unit/spec/multistream/receiveSlotManager.ts +173 -0
  252. package/test/unit/spec/multistream/remoteMedia.ts +225 -0
  253. package/test/unit/spec/multistream/remoteMediaGroup.ts +396 -0
  254. package/test/unit/spec/multistream/remoteMediaManager.ts +1309 -0
  255. package/test/unit/spec/reconnection-manager/index.js +68 -2
  256. package/test/unit/spec/roap/index.ts +63 -35
  257. package/test/unit/spec/stats-analyzer/index.js +19 -22
  258. package/dist/peer-connection-manager/index.js +0 -794
  259. package/dist/peer-connection-manager/index.js.map +0 -1
  260. package/dist/peer-connection-manager/util.js +0 -124
  261. package/dist/peer-connection-manager/util.js.map +0 -1
  262. package/dist/roap/collection.js +0 -73
  263. package/dist/roap/collection.js.map +0 -1
  264. package/dist/roap/handler.js +0 -337
  265. package/dist/roap/handler.js.map +0 -1
  266. package/dist/roap/state.js +0 -164
  267. package/dist/roap/state.js.map +0 -1
  268. package/dist/roap/util.js +0 -102
  269. package/dist/roap/util.js.map +0 -1
  270. package/src/media/util.js +0 -38
  271. package/src/peer-connection-manager/index.js +0 -723
  272. package/src/peer-connection-manager/util.ts +0 -117
  273. package/src/roap/collection.js +0 -63
  274. package/src/roap/handler.js +0 -252
  275. package/src/roap/index.js +0 -380
  276. package/src/roap/state.js +0 -149
  277. package/src/roap/util.js +0 -93
  278. package/test/unit/spec/peerconnection-manager/index.js +0 -188
  279. package/test/unit/spec/peerconnection-manager/utils.js +0 -48
  280. package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
  281. package/test/unit/spec/roap/util.js +0 -30
@@ -1,6 +1,6 @@
1
1
  import {isEqual} from 'lodash';
2
2
 
3
- const ControlsUtils = {};
3
+ const ControlsUtils: any = {};
4
4
 
5
5
  /**
6
6
  * Controls
@@ -17,7 +17,7 @@ const ControlsUtils = {};
17
17
  * @returns {Object} parsedObject - parsed host or null if host was undefined
18
18
  * @returns {String} parsedObject.recordingId
19
19
  */
20
- ControlsUtils.parse = (controls) => {
20
+ ControlsUtils.parse = (controls: any) => {
21
21
  const parsedControls = {...controls};
22
22
 
23
23
  if (controls && controls.record) {
@@ -55,7 +55,7 @@ ControlsUtils.parse = (controls) => {
55
55
  * @param {LocusControls} newControls current state
56
56
  * @returns {Object} combination of state plus the changes
57
57
  */
58
- ControlsUtils.getControls = (oldControls, newControls) => {
58
+ ControlsUtils.getControls = (oldControls: any, newControls: any) => {
59
59
  const previous = ControlsUtils.parse(oldControls);
60
60
  const current = ControlsUtils.parse(newControls);
61
61
 
@@ -91,7 +91,7 @@ ControlsUtils.getControls = (oldControls, newControls) => {
91
91
  * @param {LocusControls} controls
92
92
  * @returns {String|null}
93
93
  */
94
- ControlsUtils.getId = (controls) => {
94
+ ControlsUtils.getId = (controls: any) => {
95
95
  if (controls.record.meta) {
96
96
  return controls.record.meta.modifiedBy;
97
97
  }
@@ -1,7 +1,6 @@
1
1
  import {EMBEDDED_APP_TYPES} from '../constants';
2
2
 
3
- const EmbeddedAppsUtils = {};
4
-
3
+ const EmbeddedAppsUtils: any = {};
5
4
  const SLIDO_REGEX = /.sli.do\//;
6
5
 
7
6
  /**
@@ -9,8 +8,8 @@ const SLIDO_REGEX = /.sli.do\//;
9
8
  * @param {Object} embeddedApp - raw embedded app object
10
9
  * @returns {Object} parsedObject - parsed embedded app object
11
10
  */
12
- EmbeddedAppsUtils.parseApp = (embeddedApp) => {
13
- const parsedApp = {...embeddedApp};
11
+ EmbeddedAppsUtils.parseApp = (embeddedApp: object) => {
12
+ const parsedApp: any = {...embeddedApp};
14
13
 
15
14
  parsedApp.type = EMBEDDED_APP_TYPES.OTHER;
16
15
  const url = parsedApp.instanceInfo?.appInstanceUrl;
@@ -29,7 +28,7 @@ EmbeddedAppsUtils.parseApp = (embeddedApp) => {
29
28
  * @param {any[]} apps2 - an array of apps
30
29
  * @returns {boolean} true if the arrays are different
31
30
  */
32
- EmbeddedAppsUtils.areSimilar = (apps1, apps2) => {
31
+ EmbeddedAppsUtils.areSimilar = (apps1: any[], apps2: any[]) => {
33
32
  if (!apps1 || !apps2) {
34
33
  return apps1 === apps2;
35
34
  }
@@ -52,7 +51,7 @@ EmbeddedAppsUtils.areSimilar = (apps1, apps2) => {
52
51
  * @param {array} embeddedApps
53
52
  * @returns {array} result - new array of parsed embedded app objects
54
53
  */
55
- EmbeddedAppsUtils.parse = (embeddedApps) =>
54
+ EmbeddedAppsUtils.parse = (embeddedApps: Array<any>) =>
56
55
  embeddedApps && embeddedApps.map(EmbeddedAppsUtils.parseApp);
57
56
 
58
57
  export default EmbeddedAppsUtils;
@@ -1,6 +1,6 @@
1
1
  import {FULL_STATE} from '../constants';
2
2
 
3
- const FullState = {};
3
+ const FullState: any = {};
4
4
 
5
5
  FullState.parse = (fullState) => ({
6
6
  type: fullState.type || FULL_STATE.UNKNOWN,
@@ -1,11 +1,11 @@
1
- const HostUtils = {};
1
+ const HostUtils: any = {};
2
2
 
3
3
  /**
4
4
  * parse the relevant host values that we care about: id
5
5
  * @param {Object} host
6
6
  * @returns {Object} parsed host or null if host was undefined
7
7
  */
8
- HostUtils.parse = (host) => {
8
+ HostUtils.parse = (host: object) => {
9
9
  if (host) {
10
10
  return {
11
11
  hostId: HostUtils.getId(host)
@@ -22,7 +22,7 @@ HostUtils.parse = (host) => {
22
22
  * @returns {Object}
23
23
  * previous: {Object} old host, current: {Object} new host, updates: {isNewHost: {boolean}} boolean update values
24
24
  */
25
- HostUtils.getHosts = (oldHost, newHost) => {
25
+ HostUtils.getHosts = (oldHost: object, newHost: object) => {
26
26
  const previous = oldHost && HostUtils.parse(oldHost);
27
27
  const current = newHost && HostUtils.parse(newHost);
28
28
 
@@ -41,14 +41,14 @@ HostUtils.getHosts = (oldHost, newHost) => {
41
41
  * @param {String} currentId
42
42
  * @returns {Boolean}
43
43
  */
44
- HostUtils.isDifferentHosts = (previousId, currentId) => previousId !== currentId;
44
+ HostUtils.isDifferentHosts = (previousId: string, currentId: string) => previousId !== currentId;
45
45
 
46
46
  /**
47
47
  * Extract the id from the host object
48
48
  * @param {Object} host
49
49
  * @returns {String}
50
50
  */
51
- HostUtils.getId = (host) => {
51
+ HostUtils.getId = (host: any) => {
52
52
  if (!host) {
53
53
  return null;
54
54
  }
@@ -35,6 +35,34 @@ import LocusDeltaParser from '../locus-info/parser';
35
35
  * @class LocusInfo
36
36
  */
37
37
  export default class LocusInfo extends EventsScope {
38
+ compareAndUpdateFlags: any;
39
+ emitChange: any;
40
+ locusParser: any;
41
+ meetingId: any;
42
+ parsedLocus: any;
43
+ updateMeeting: any;
44
+ webex: any;
45
+ aclUrl: any;
46
+ baseSequence: any;
47
+ created: any;
48
+ deltaParticipants: any;
49
+ identities: any;
50
+ membership: any;
51
+ participants: any;
52
+ participantsUrl: any;
53
+ replaces: any;
54
+ scheduledMeeting: any;
55
+ sequence: any;
56
+ controls: any;
57
+ conversationUrl: any;
58
+ embeddedApps: any;
59
+ fullState: any;
60
+ host: any;
61
+ info: any;
62
+ mediaShares: any;
63
+ replace: any;
64
+ url: any;
65
+
38
66
  constructor(updateMeeting, webex, meetingId) {
39
67
  super();
40
68
  this.parsedLocus = {
@@ -55,7 +83,7 @@ export default class LocusInfo extends EventsScope {
55
83
  * @param {Meeting} meeting
56
84
  * @returns {undefined}
57
85
  */
58
- applyLocusDeltaData(action, locus, meeting) {
86
+ applyLocusDeltaData(action: string, locus: any, meeting: any) {
59
87
  const {DESYNC, USE_CURRENT, USE_INCOMING} = LocusDeltaParser.loci;
60
88
 
61
89
  switch (action) {
@@ -94,7 +122,7 @@ export default class LocusInfo extends EventsScope {
94
122
  * @param {Meeting} meeting
95
123
  * @returns {undefined}
96
124
  */
97
- handleLocusDelta(locus, meeting) {
125
+ handleLocusDelta(locus: any, meeting: any) {
98
126
  // register a function to process delta actions
99
127
  if (!this.locusParser.onDeltaAction) {
100
128
  // delta action, along with associated loci
@@ -112,7 +140,7 @@ export default class LocusInfo extends EventsScope {
112
140
  * @returns {undefined}
113
141
  * @memberof LocusInfo
114
142
  */
115
- init(locus = {}) {
143
+ init(locus: any = {}) {
116
144
  this.created = locus.created || null;
117
145
  this.scheduledMeeting = locus.meeting || null;
118
146
  this.participantsUrl = locus.participantsUrl || null;
@@ -164,7 +192,7 @@ export default class LocusInfo extends EventsScope {
164
192
  * @returns {undefined}
165
193
  * @memberof LocusInfo
166
194
  */
167
- initialSetup(locus) {
195
+ initialSetup(locus: object) {
168
196
  this.onFullLocus(locus);
169
197
 
170
198
  // Change it to true after it receives it first locus object
@@ -177,7 +205,7 @@ export default class LocusInfo extends EventsScope {
177
205
  * @returns {undefined}
178
206
  * @memberof LocusInfo
179
207
  */
180
- parse(meeting, data) {
208
+ parse(meeting: any, data: any) {
181
209
  const {eventType} = data;
182
210
 
183
211
  LoggerProxy.logger.info(`Locus-info:index#parse --> received locus data: ${eventType}`);
@@ -217,18 +245,18 @@ export default class LocusInfo extends EventsScope {
217
245
  * @returns {undefined}
218
246
  * @memberof LocusInfo
219
247
  */
220
- emitScoped(scope, eventName, args) {
248
+ emitScoped(scope?: any, eventName?: string, args?: any) {
221
249
  return this.emit(scope, eventName, args);
222
250
  }
223
251
 
224
252
  /**
225
253
  * updates the locus with full locus object
226
254
  * @param {object} locus locus object
227
- * @param {sting} eventType particulat locus event
255
+ * @param {string} eventType particulat locus event
228
256
  * @returns {object} null
229
257
  * @memberof LocusInfo
230
258
  */
231
- onFullLocus(locus, eventType) {
259
+ onFullLocus(locus: any, eventType?: string) {
232
260
  if (!locus) {
233
261
  LoggerProxy.logger.error(
234
262
  'Locus-info:index#onFullLocus --> object passed as argument was invalid, continuing.'
@@ -252,7 +280,7 @@ export default class LocusInfo extends EventsScope {
252
280
  * @returns {undefined}
253
281
  * @memberof LocusInfo
254
282
  */
255
- handleOneOnOneEvent(eventType) {
283
+ handleOneOnOneEvent(eventType: string) {
256
284
  if (
257
285
  this.parsedLocus.fullState.type === _CALL_ ||
258
286
  this.parsedLocus.fullState.type === _SIP_BRIDGE_
@@ -295,7 +323,7 @@ export default class LocusInfo extends EventsScope {
295
323
  * @returns {undefined}
296
324
  * @memberof LocusInfo
297
325
  */
298
- onDeltaLocus(locus) {
326
+ onDeltaLocus(locus: any) {
299
327
  this.updateLocusInfo(locus);
300
328
  this.updateParticipants(locus.participants);
301
329
  this.isMeetingActive();
@@ -306,7 +334,7 @@ export default class LocusInfo extends EventsScope {
306
334
  * @returns {undefined}
307
335
  * @memberof LocusInfo
308
336
  */
309
- updateLocusInfo(locus) {
337
+ updateLocusInfo(locus: any) {
310
338
  this.updateControls(locus.controls);
311
339
  this.updateConversationUrl(locus.conversationUrl, locus.info);
312
340
  this.updateCreated(locus.created);
@@ -334,7 +362,7 @@ export default class LocusInfo extends EventsScope {
334
362
  * @returns {Array}
335
363
  * @memberof LocusInfo
336
364
  */
337
- getLocusPartner(participants, self) {
365
+ getLocusPartner(participants: Array<any>, self: any) {
338
366
  if (!participants || participants.length === 0) {
339
367
  return null;
340
368
  }
@@ -345,6 +373,7 @@ export default class LocusInfo extends EventsScope {
345
373
  self &&
346
374
  participant.identity !== self.identity &&
347
375
  (participants.length <= 2 || (participant.type === _USER_ && !participant.removed))
376
+ // @ts-ignore
348
377
  ) || this.partner
349
378
  );
350
379
  }
@@ -359,6 +388,7 @@ export default class LocusInfo extends EventsScope {
359
388
  this.parsedLocus.fullState.type === _CALL_ ||
360
389
  this.parsedLocus.fullState.type === _SIP_BRIDGE_
361
390
  ) {
391
+ // @ts-ignore
362
392
  const partner = this.getLocusPartner(this.participants, this.self);
363
393
 
364
394
  this.updateMeeting({partner});
@@ -444,6 +474,7 @@ export default class LocusInfo extends EventsScope {
444
474
  if (
445
475
  this.fullState &&
446
476
  (this.fullState.state === LOCUS.STATE.INACTIVE ||
477
+ // @ts-ignore
447
478
  this.fullState.state === LOCUS.STATE.TERMINATING)
448
479
  ) {
449
480
  LoggerProxy.logger.warn(
@@ -565,13 +596,13 @@ export default class LocusInfo extends EventsScope {
565
596
  * @param {Array} [participants] - The participants to update against.
566
597
  * @returns {void}
567
598
  */
568
- updateParticipantDeltas(participants = []) {
599
+ updateParticipantDeltas(participants: Array<any> = []) {
569
600
  // Used to find a participant within a participants collection.
570
601
  const findParticipant = (participant, collection) =>
571
602
  collection.find((item) => item.person.id === participant.person.id);
572
603
 
573
604
  // Generates an object that indicates which state properties have changed.
574
- const generateDelta = (prevState = {}, newState = {}) => {
605
+ const generateDelta = (prevState: any = {}, newState: any = {}) => {
575
606
  // Setup deltas.
576
607
  const deltas = {
577
608
  audioStatus: prevState.audioStatus !== newState.audioStatus,
@@ -614,7 +645,7 @@ export default class LocusInfo extends EventsScope {
614
645
  * @returns {Array} updatedParticipants
615
646
  * @memberof LocusInfo
616
647
  */
617
- updateParticipants(participants) {
648
+ updateParticipants(participants: object) {
618
649
  this.emitScoped(
619
650
  {
620
651
  file: 'locus-info',
@@ -636,7 +667,7 @@ export default class LocusInfo extends EventsScope {
636
667
  * @returns {undefined}
637
668
  * @memberof LocusInfo
638
669
  */
639
- updateControls(controls) {
670
+ updateControls(controls: object) {
640
671
  if (controls && !isEqual(this.controls, controls)) {
641
672
  this.parsedLocus.controls = ControlsUtils.parse(controls);
642
673
  const {
@@ -738,7 +769,7 @@ export default class LocusInfo extends EventsScope {
738
769
  * @returns {undefined}
739
770
  * @memberof LocusInfo
740
771
  */
741
- updateConversationUrl(conversationUrl, info) {
772
+ updateConversationUrl(conversationUrl: string, info: any) {
742
773
  if (conversationUrl && !isEqual(this.conversationUrl, conversationUrl)) {
743
774
  this.conversationUrl = conversationUrl;
744
775
  this.updateMeeting({conversationUrl});
@@ -758,7 +789,7 @@ export default class LocusInfo extends EventsScope {
758
789
  * @returns {undefined}
759
790
  * @memberof LocusInfo
760
791
  */
761
- updateCreated(created) {
792
+ updateCreated(created: object) {
762
793
  if (created && !isEqual(this.created, created)) {
763
794
  this.created = created;
764
795
  }
@@ -769,7 +800,7 @@ export default class LocusInfo extends EventsScope {
769
800
  * @returns {undefined}
770
801
  * @memberof LocusInfo
771
802
  */
772
- updateFullState(fullState) {
803
+ updateFullState(fullState: object) {
773
804
  if (fullState && !isEqual(this.fullState, fullState)) {
774
805
  const result = FullState.getFullState(this.fullState, fullState);
775
806
 
@@ -813,7 +844,7 @@ export default class LocusInfo extends EventsScope {
813
844
  * @memberof LocusInfo
814
845
  * emits internal event locus_info_update_host
815
846
  */
816
- updateHostInfo(host) {
847
+ updateHostInfo(host: object) {
817
848
  if (host && !isEqual(this.host, host)) {
818
849
  const parsedHosts = HostUtils.getHosts(this.host, host);
819
850
 
@@ -846,7 +877,7 @@ export default class LocusInfo extends EventsScope {
846
877
  * @returns {undefined}
847
878
  * @memberof LocusInfo
848
879
  */
849
- updateMeetingInfo(info, self) {
880
+ updateMeetingInfo(info: object, self?: object) {
850
881
  if (info && !isEqual(this.info, info)) {
851
882
  const roles = self ? SelfUtils.getRoles(self) : this.parsedLocus.self?.roles || [];
852
883
  const isJoined = SelfUtils.isJoined(self || this.parsedLocus.self);
@@ -894,7 +925,7 @@ export default class LocusInfo extends EventsScope {
894
925
  * @returns {undefined}
895
926
  * @memberof LocusInfo
896
927
  */
897
- updateEmbeddedApps(embeddedApps) {
928
+ updateEmbeddedApps(embeddedApps: object) {
898
929
  // don't do anything if the arrays of apps haven't changed significantly
899
930
  if (EmbeddedAppsUtils.areSimilar(this.embeddedApps, embeddedApps)) {
900
931
  return;
@@ -922,7 +953,7 @@ export default class LocusInfo extends EventsScope {
922
953
  * @memberof LocusInfo
923
954
  * emits internal event locus_info_update_media_shares
924
955
  */
925
- updateMediaShares(mediaShares) {
956
+ updateMediaShares(mediaShares: object) {
926
957
  if (mediaShares && !isEqual(this.mediaShares, mediaShares)) {
927
958
  const parsedMediaShares = MediaSharesUtils.getMediaShares(this.mediaShares, mediaShares);
928
959
 
@@ -948,7 +979,7 @@ export default class LocusInfo extends EventsScope {
948
979
  * @returns {undefined}
949
980
  * @memberof LocusInfo
950
981
  */
951
- updateParticipantsUrl(participantsUrl) {
982
+ updateParticipantsUrl(participantsUrl: string) {
952
983
  if (participantsUrl && !isEqual(this.participantsUrl, participantsUrl)) {
953
984
  this.participantsUrl = participantsUrl;
954
985
  }
@@ -959,7 +990,7 @@ export default class LocusInfo extends EventsScope {
959
990
  * @returns {undefined}
960
991
  * @memberof LocusInfo
961
992
  */
962
- updateReplace(replace) {
993
+ updateReplace(replace: object) {
963
994
  if (replace && !isEqual(this.replace, replace)) {
964
995
  this.replace = replace;
965
996
  }
@@ -973,8 +1004,10 @@ export default class LocusInfo extends EventsScope {
973
1004
  * @memberof LocusInfo
974
1005
  * emits internal events self_admitted_guest, self_unadmitted_guest, locus_info_update_self
975
1006
  */
976
- updateSelf(self, participants) {
1007
+ updateSelf(self: any, participants: Array<any>) {
1008
+ // @ts-ignore - check where this.self come from
977
1009
  if (self && !isEqual(this.self, self)) {
1010
+ // @ts-ignore
978
1011
  const parsedSelves = SelfUtils.getSelves(this.self, self, this.webex.internal.device.url);
979
1012
 
980
1013
  this.updateMeeting(parsedSelves.current);
@@ -1100,6 +1133,7 @@ export default class LocusInfo extends EventsScope {
1100
1133
  file: 'locus-info',
1101
1134
  function: 'updateSelf',
1102
1135
  },
1136
+ // @ts-ignore
1103
1137
  LOCUSINFO.EVENTS.MEDIA_INACTIVITY,
1104
1138
  SelfUtils.getMediaStatus(self.mediaSessions)
1105
1139
  );
@@ -1168,6 +1202,7 @@ export default class LocusInfo extends EventsScope {
1168
1202
  }
1169
1203
  );
1170
1204
  this.parsedLocus.self = parsedSelves.current;
1205
+ // @ts-ignore
1171
1206
  this.self = self;
1172
1207
  }
1173
1208
  else {
@@ -1181,7 +1216,7 @@ export default class LocusInfo extends EventsScope {
1181
1216
  * @returns {undefined}
1182
1217
  * emits internal event locus_info_update_url
1183
1218
  */
1184
- updateLocusUrl(url) {
1219
+ updateLocusUrl(url: string) {
1185
1220
  if (url && this.url !== url) {
1186
1221
  this.url = url;
1187
1222
  this.updateMeeting({locusUrl: url});
@@ -1201,7 +1236,7 @@ export default class LocusInfo extends EventsScope {
1201
1236
  * @returns {undefined}
1202
1237
  * @memberof LocusInfo
1203
1238
  */
1204
- updateAclUrl(aclUrl) {
1239
+ updateAclUrl(aclUrl: string) {
1205
1240
  if (aclUrl && !isEqual(this.aclUrl, aclUrl)) {
1206
1241
  this.aclUrl = aclUrl;
1207
1242
  }
@@ -1212,7 +1247,7 @@ export default class LocusInfo extends EventsScope {
1212
1247
  * @returns {undefined}
1213
1248
  * @memberof LocusInfo
1214
1249
  */
1215
- updateBasequence(baseSequence) {
1250
+ updateBasequence(baseSequence: number) {
1216
1251
  if (baseSequence && !isEqual(this.baseSequence, baseSequence)) {
1217
1252
  this.baseSequence = baseSequence;
1218
1253
  }
@@ -1223,7 +1258,7 @@ export default class LocusInfo extends EventsScope {
1223
1258
  * @returns {undefined}
1224
1259
  * @memberof LocusInfo
1225
1260
  */
1226
- updateSequence(sequence) {
1261
+ updateSequence(sequence: number) {
1227
1262
  if (sequence && !isEqual(this.sequence, sequence)) {
1228
1263
  this.sequence = sequence;
1229
1264
  }
@@ -1234,7 +1269,7 @@ export default class LocusInfo extends EventsScope {
1234
1269
  * @returns {undefined}
1235
1270
  * @memberof LocusInfo
1236
1271
  */
1237
- updateMemberShip(membership) {
1272
+ updateMemberShip(membership: object) {
1238
1273
  if (membership && !isEqual(this.membership, membership)) {
1239
1274
  this.membership = membership;
1240
1275
  }
@@ -1245,7 +1280,7 @@ export default class LocusInfo extends EventsScope {
1245
1280
  * @returns {undefined}
1246
1281
  * @memberof LocusInfo
1247
1282
  */
1248
- updateIdentifiers(identities) {
1283
+ updateIdentifiers(identities: Array<any>) {
1249
1284
  if (identities && !isEqual(this.identities, identities)) {
1250
1285
  this.identities = identities;
1251
1286
  }
@@ -1,10 +1,9 @@
1
-
2
1
  import {SELF_ROLES, DISPLAY_HINTS} from '../constants';
3
2
 
4
- const InfoUtils = {};
3
+ const InfoUtils: any = {};
5
4
 
6
5
  InfoUtils.parse = (info, roles, isJoined = true) => {
7
- const parsed = {
6
+ const parsed: any = {
8
7
  policy: InfoUtils.parsePolicy(info),
9
8
  moderator: InfoUtils.parseModerator(info),
10
9
  coHost: InfoUtils.parseCoHost(info),
@@ -30,6 +29,10 @@ InfoUtils.parse = (info, roles, isJoined = true) => {
30
29
  parsed.meetingNumber = info.meetingId;
31
30
  }
32
31
 
32
+ if (info.datachannelUrl) {
33
+ parsed.datachannelUrl = info.datachannelUrl;
34
+ }
35
+
33
36
  return parsed;
34
37
  };
35
38
 
@@ -70,7 +73,7 @@ InfoUtils.getInfos = (oldInfo, newInfo, roles, isJoined) => {
70
73
  previous = oldInfo;
71
74
  }
72
75
  const current = newInfo && InfoUtils.parse(newInfo, roles, isJoined);
73
- const updates = {};
76
+ const updates: any = {};
74
77
 
75
78
  if (current) {
76
79
  current.isLocked = InfoUtils.isLocked(current.policy);
@@ -1,13 +1,13 @@
1
1
  import {CONTENT, WHITEBOARD} from '../constants';
2
2
 
3
- const MediaSharesUtils = {};
3
+ const MediaSharesUtils: any = {};
4
4
 
5
5
  /**
6
6
  * parses the relevant values for mediaShares: contentId, disposition
7
7
  * @param {Object} mediaShares
8
8
  * @returns {undefined}
9
9
  */
10
- MediaSharesUtils.parse = (mediaShares) => {
10
+ MediaSharesUtils.parse = (mediaShares: object) => {
11
11
  if (mediaShares) {
12
12
  return {
13
13
  content: {
@@ -32,7 +32,7 @@ MediaSharesUtils.parse = (mediaShares) => {
32
32
  * @returns {Object}
33
33
  * previous: {Object} old share, current: {Object} new share,
34
34
  */
35
- MediaSharesUtils.getMediaShares = (oldShare, newShare) => {
35
+ MediaSharesUtils.getMediaShares = (oldShare: object, newShare: object) => {
36
36
  const previous = oldShare && MediaSharesUtils.parse(oldShare);
37
37
  const current = newShare && MediaSharesUtils.parse(newShare);
38
38
 
@@ -47,7 +47,7 @@ MediaSharesUtils.getMediaShares = (oldShare, newShare) => {
47
47
  * @param {Object} mediaShares
48
48
  * @returns {Boolean} disposition
49
49
  */
50
- MediaSharesUtils.getContentDisposition = (mediaShares) => {
50
+ MediaSharesUtils.getContentDisposition = (mediaShares: object) => {
51
51
  const contentFloor = MediaSharesUtils.extractContentFloor(mediaShares);
52
52
 
53
53
  return contentFloor ? contentFloor.disposition : null;
@@ -58,7 +58,7 @@ MediaSharesUtils.getContentDisposition = (mediaShares) => {
58
58
  * @param {Object} mediaShares
59
59
  * @returns {Boolean} disposition
60
60
  */
61
- MediaSharesUtils.getWhiteboardDisposition = (mediaShares) => {
61
+ MediaSharesUtils.getWhiteboardDisposition = (mediaShares: object) => {
62
62
  const whiteboardFloor = MediaSharesUtils.extractWhiteboardFloor(mediaShares);
63
63
 
64
64
  return whiteboardFloor ? whiteboardFloor.disposition : null;
@@ -69,7 +69,7 @@ MediaSharesUtils.getWhiteboardDisposition = (mediaShares) => {
69
69
  * @param {Object} mediaShares
70
70
  * @returns {Object}
71
71
  */
72
- MediaSharesUtils.extractContent = (mediaShares) => {
72
+ MediaSharesUtils.extractContent = (mediaShares: any) => {
73
73
  if (!mediaShares || !mediaShares.length) {
74
74
  return null;
75
75
  }
@@ -82,7 +82,7 @@ MediaSharesUtils.extractContent = (mediaShares) => {
82
82
  * @param {Object} mediaShares
83
83
  * @returns {Object}
84
84
  */
85
- MediaSharesUtils.extractWhiteboard = (mediaShares) => {
85
+ MediaSharesUtils.extractWhiteboard = (mediaShares: any) => {
86
86
  if (!mediaShares || !mediaShares.length) {
87
87
  return null;
88
88
  }
@@ -95,7 +95,7 @@ MediaSharesUtils.extractWhiteboard = (mediaShares) => {
95
95
  * @param {Object} mediaStream
96
96
  * @returns {Object}
97
97
  */
98
- MediaSharesUtils.extractFloor = (mediaStream) => {
98
+ MediaSharesUtils.extractFloor = (mediaStream: any) => {
99
99
  if (!mediaStream) {
100
100
  return null;
101
101
  }
@@ -108,7 +108,7 @@ MediaSharesUtils.extractFloor = (mediaStream) => {
108
108
  * @param {Object} mediaShares
109
109
  * @returns {Object}
110
110
  */
111
- MediaSharesUtils.extractContentFloor = (mediaShares) => {
111
+ MediaSharesUtils.extractContentFloor = (mediaShares: object) => {
112
112
  const content = MediaSharesUtils.extractContent(mediaShares);
113
113
 
114
114
  return MediaSharesUtils.extractFloor(content);
@@ -119,7 +119,7 @@ MediaSharesUtils.extractContentFloor = (mediaShares) => {
119
119
  * @param {Object} mediaShares
120
120
  * @returns {Object}
121
121
  */
122
- MediaSharesUtils.extractWhiteboardFloor = (mediaShares) => {
122
+ MediaSharesUtils.extractWhiteboardFloor = (mediaShares: object) => {
123
123
  const whiteboard = MediaSharesUtils.extractWhiteboard(mediaShares);
124
124
 
125
125
  return MediaSharesUtils.extractFloor(whiteboard);
@@ -130,7 +130,7 @@ MediaSharesUtils.extractWhiteboardFloor = (mediaShares) => {
130
130
  * @param {Object} mediaShares
131
131
  * @returns {Object}
132
132
  */
133
- MediaSharesUtils.getContentBeneficiaryId = (mediaShares) => {
133
+ MediaSharesUtils.getContentBeneficiaryId = (mediaShares: object) => {
134
134
  const contentFloor = MediaSharesUtils.extractContentFloor(mediaShares);
135
135
 
136
136
  if (!contentFloor || !contentFloor.beneficiary) {
@@ -145,7 +145,7 @@ MediaSharesUtils.getContentBeneficiaryId = (mediaShares) => {
145
145
  * @param {Object} mediaShares
146
146
  * @returns {Object}
147
147
  */
148
- MediaSharesUtils.getWhiteboardBeneficiaryId = (mediaShares) => {
148
+ MediaSharesUtils.getWhiteboardBeneficiaryId = (mediaShares: object) => {
149
149
  const whiteboardFloor = MediaSharesUtils.extractWhiteboardFloor(mediaShares);
150
150
 
151
151
  if (!whiteboardFloor || !whiteboardFloor.beneficiary) {
@@ -160,7 +160,7 @@ MediaSharesUtils.getWhiteboardBeneficiaryId = (mediaShares) => {
160
160
  * @param {Object} mediaShares
161
161
  * @returns {Object}
162
162
  */
163
- MediaSharesUtils.getWhiteboardResourceUrl = (mediaShares) => {
163
+ MediaSharesUtils.getWhiteboardResourceUrl = (mediaShares: object) => {
164
164
  const whiteboard = MediaSharesUtils.extractWhiteboard(mediaShares);
165
165
 
166
166
  if (!whiteboard || !whiteboard.resourceUrl) {