@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,7 +1,8 @@
1
-
2
1
  import '@webex/internal-plugin-mercury';
3
2
  import '@webex/internal-plugin-conversation';
3
+ // @ts-ignore
4
4
  import {WebexPlugin} from '@webex/webex-core';
5
+ import {MediaConnection as MC} from '@webex/internal-media-core';
5
6
 
6
7
  import 'webrtc-adapter';
7
8
 
@@ -51,7 +52,33 @@ import CaptchaError from '../common/errors/captcha-error';
51
52
  import MeetingCollection from './collection';
52
53
  import MeetingsUtil from './util';
53
54
 
55
+ let mediaLogger;
56
+
57
+ class MediaLogger {
58
+ info(...args) {
59
+ LoggerProxy.logger.info(...args);
60
+ }
61
+
62
+ log(...args) {
63
+ LoggerProxy.logger.log(...args);
64
+ }
65
+
66
+ error(...args) {
67
+ LoggerProxy.logger.error(...args);
68
+ }
69
+
70
+ warn(...args) {
71
+ LoggerProxy.logger.warn(...args);
72
+ }
54
73
 
74
+ trace(...args) {
75
+ LoggerProxy.logger.trace(...args);
76
+ }
77
+
78
+ debug(...args) {
79
+ LoggerProxy.logger.debug(...args);
80
+ }
81
+ }
55
82
  /**
56
83
  * Meetings Ready Event
57
84
  * Emitted when the meetings instance on webex is ready
@@ -105,6 +132,17 @@ import MeetingsUtil from './util';
105
132
  * @class
106
133
  */
107
134
  export default class Meetings extends WebexPlugin {
135
+ loggerRequest: any;
136
+ media: any;
137
+ meetingCollection: any;
138
+ personalMeetingRoom: any;
139
+ preferredWebexSite: any;
140
+ reachability: any;
141
+ registered: any;
142
+ request: any;
143
+ geoHintInfo: any;
144
+ meetingInfo: any;
145
+
108
146
  namespace = MEETINGS;
109
147
 
110
148
  /**
@@ -123,6 +161,7 @@ export default class Meetings extends WebexPlugin {
123
161
  * @private
124
162
  * @memberof Meetings
125
163
  */
164
+ // @ts-ignore
126
165
  this.request = new Request({}, {parent: this.webex});
127
166
  /**
128
167
  * Log upload request helper
@@ -131,6 +170,7 @@ export default class Meetings extends WebexPlugin {
131
170
  * @private
132
171
  * @memberof Meetings
133
172
  */
173
+ // @ts-ignore
134
174
  this.loggerRequest = new LoggerRequest({webex: this.webex});
135
175
  this.meetingCollection = new MeetingCollection();
136
176
  /**
@@ -196,13 +236,14 @@ export default class Meetings extends WebexPlugin {
196
236
  * @private
197
237
  * @memberof Meetings
198
238
  */
199
- handleLocusEvent(data, useRandomDelayForInfo = false) {
239
+ private handleLocusEvent(data: { locusUrl: string; locus: any }, useRandomDelayForInfo: boolean = false) {
200
240
  let meeting = null;
201
241
 
202
242
  // getting meeting by correlationId. This will happen for the new event
203
243
  // Either the locus
204
244
  // TODO : Add check for the callBack Address
205
245
  meeting = this.meetingCollection.getByKey(LOCUS_URL, data.locusUrl) ||
246
+ // @ts-ignore
206
247
  this.meetingCollection.getByKey(CORRELATION_ID, MeetingsUtil.checkForCorrelationId(this.webex.internal.device.url, data.locus)) ||
207
248
  this.meetingCollection.getByKey(SIP_URI, data.locus.self && data.locus.self.callbackInfo && data.locus.self.callbackInfo.callbackAddress) ||
208
249
  (data.locus.info?.isUnifiedSpaceMeeting ? undefined : this.meetingCollection.getByKey(CONVERSATION_URL, data.locus.conversationUrl));
@@ -300,7 +341,7 @@ export default class Meetings extends WebexPlugin {
300
341
  * @private
301
342
  * @memberof Meetings
302
343
  */
303
- handleLocusMercury(envelope) {
344
+ private handleLocusMercury(envelope: { data: any }) {
304
345
  const {data} = envelope;
305
346
  const {eventType} = data;
306
347
 
@@ -316,7 +357,7 @@ export default class Meetings extends WebexPlugin {
316
357
  * @private
317
358
  * @memberof Meetings
318
359
  */
319
- handleMercuryOffline() {
360
+ private handleMercuryOffline() {
320
361
  Trigger.trigger(
321
362
  this,
322
363
  {
@@ -334,18 +375,22 @@ export default class Meetings extends WebexPlugin {
334
375
  * @private
335
376
  * @memberof Meetings
336
377
  */
337
- listenForEvents() {
378
+ private listenForEvents() {
379
+ // @ts-ignore
338
380
  this.webex.internal.mercury.on(LOCUSEVENT.LOCUS_MERCURY, (envelope) => {
339
381
  this.handleLocusMercury(envelope);
340
382
  });
383
+ // @ts-ignore
341
384
  this.webex.internal.mercury.on(ROAP.ROAP_MERCURY, (envelope) => {
342
385
  MeetingsUtil.handleRoapMercury(envelope, this.meetingCollection);
343
386
  });
344
387
 
388
+ // @ts-ignore
345
389
  this.webex.internal.mercury.on(ONLINE, () => {
346
390
  this.syncMeetings();
347
391
  });
348
392
 
393
+ // @ts-ignore
349
394
  this.webex.internal.mercury.on(OFFLINE, () => {
350
395
  this.handleMercuryOffline();
351
396
  });
@@ -357,9 +402,12 @@ export default class Meetings extends WebexPlugin {
357
402
  * @private
358
403
  * @memberof Meetings
359
404
  */
360
- stopListeningForEvents() {
405
+ private stopListeningForEvents() {
406
+ // @ts-ignore
361
407
  this.webex.internal.mercury.off(LOCUSEVENT.LOCUS_MERCURY);
408
+ // @ts-ignore
362
409
  this.webex.internal.mercury.off(ROAP.ROAP_MERCURY);
410
+ // @ts-ignore
363
411
  this.webex.internal.mercury.off(ONLINE);
364
412
  }
365
413
 
@@ -368,12 +416,19 @@ export default class Meetings extends WebexPlugin {
368
416
  * @private
369
417
  * @memberof Meetings
370
418
  */
371
- onReady() {
419
+ private onReady() {
420
+ // @ts-ignore
372
421
  this.webex.once(READY, () => {
422
+ // @ts-ignore
373
423
  StaticConfig.set(this.config);
424
+ // @ts-ignore
374
425
  LoggerConfig.set(this.config.logging);
426
+ // @ts-ignore
375
427
  LoggerProxy.set(this.webex.logger);
376
428
 
429
+ mediaLogger = new MediaLogger();
430
+ MC.setLogger(mediaLogger);
431
+
377
432
  /**
378
433
  * The MeetingInfo object to interact with server
379
434
  * @instance
@@ -381,7 +436,9 @@ export default class Meetings extends WebexPlugin {
381
436
  * @private
382
437
  * @memberof Meetings
383
438
  */
439
+ // @ts-ignore
384
440
  this.meetingInfo = this.config.experimental.enableUnifiedMeetings ? new MeetingInfoV2(this.webex) : new MeetingInfo(this.webex);
441
+ // @ts-ignore
385
442
  this.personalMeetingRoom = new PersonalMeetingRoom({meetingInfo: this.meetingInfo}, {parent: this.webex});
386
443
 
387
444
  Trigger.trigger(
@@ -394,6 +451,7 @@ export default class Meetings extends WebexPlugin {
394
451
  );
395
452
 
396
453
  MeetingsUtil.checkH264Support({disableNotifications: true});
454
+ // @ts-ignore
397
455
  Metrics.initialSetup(this.meetingCollection, this.webex);
398
456
  });
399
457
  }
@@ -405,12 +463,15 @@ export default class Meetings extends WebexPlugin {
405
463
  * @memberof Meetings
406
464
  * @returns {undefined}
407
465
  */
408
- _toggleUnifiedMeetings(changeState) {
466
+ private _toggleUnifiedMeetings(changeState: boolean) {
409
467
  if (typeof changeState !== 'boolean') {
410
468
  return;
411
469
  }
470
+ // @ts-ignore
412
471
  if (this.config?.experimental?.enableUnifiedMeetings !== changeState) {
472
+ // @ts-ignore
413
473
  this.config.experimental.enableUnifiedMeetings = changeState;
474
+ // @ts-ignore
414
475
  this.meetingInfo = changeState ? new MeetingInfoV2(this.webex) : new MeetingInfo(this.webex);
415
476
  }
416
477
  }
@@ -422,10 +483,11 @@ export default class Meetings extends WebexPlugin {
422
483
  * @memberof Meetings
423
484
  * @returns {undefined}
424
485
  */
425
- _toggleTurnDiscovery(enable) {
486
+ private _toggleTurnDiscovery(enable: boolean) {
426
487
  if (typeof enable !== 'boolean') {
427
488
  return;
428
489
  }
490
+ // @ts-ignore
429
491
  this.config.experimental.enableTurnDiscovery = enable;
430
492
  }
431
493
 
@@ -436,11 +498,13 @@ export default class Meetings extends WebexPlugin {
436
498
  * @memberof Meetings
437
499
  * @returns {undefined}
438
500
  */
439
- _toggleAdhocMeetings(changeState) {
501
+ private _toggleAdhocMeetings(changeState: boolean) {
440
502
  if (typeof changeState !== 'boolean') {
441
503
  return;
442
504
  }
505
+ // @ts-ignore
443
506
  if (this.config?.experimental?.enableAdhocMeetings !== changeState) {
507
+ // @ts-ignore
444
508
  this.config.experimental.enableAdhocMeetings = changeState;
445
509
  }
446
510
  }
@@ -453,7 +517,8 @@ export default class Meetings extends WebexPlugin {
453
517
  * @public
454
518
  * @memberof Meetings
455
519
  */
456
- register() {
520
+ public register() {
521
+ // @ts-ignore
457
522
  if (!this.webex.canAuthorize) {
458
523
  LoggerProxy.logger.error('Meetings:index#register --> ERROR, Unable to register, SDK cannot authorize');
459
524
 
@@ -473,8 +538,11 @@ export default class Meetings extends WebexPlugin {
473
538
  this.startReachability().catch((error) => {
474
539
  LoggerProxy.logger.error(`Meetings:index#register --> GDM error, ${error.message}`);
475
540
  }),
541
+ // @ts-ignore
476
542
  this.webex.internal.device.register()
543
+ // @ts-ignore
477
544
  .then(() => LoggerProxy.logger.info(`Meetings:index#register --> INFO, Device registered ${this.webex.internal.device.url}`))
545
+ // @ts-ignore
478
546
  .then(() => this.webex.internal.mercury.connect()),
479
547
  MeetingsUtil.checkH264Support.call(this)
480
548
  ]).then(() => {
@@ -524,7 +592,9 @@ export default class Meetings extends WebexPlugin {
524
592
 
525
593
  this.stopListeningForEvents();
526
594
 
595
+ // @ts-ignore
527
596
  return this.webex.internal.mercury.disconnect()
597
+ // @ts-ignore
528
598
  .then(() => this.webex.internal.device.unregister())
529
599
  .then(() => {
530
600
  Trigger.trigger(
@@ -551,7 +621,17 @@ export default class Meetings extends WebexPlugin {
551
621
  * @param {String} [options.orgId] org id
552
622
  * @returns {String} feedback ID logs were submitted under
553
623
  */
554
- uploadLogs(options = {}) {
624
+ uploadLogs(
625
+ options: {
626
+ callStart?: string;
627
+ feedbackId?: string;
628
+ locusId?: string;
629
+ correlationId?: string;
630
+ meetingId?: string;
631
+ userId?: string;
632
+ orgId?: string;
633
+ } = {}
634
+ ) {
555
635
  LoggerProxy.logger.info('Meetings:index#uploadLogs --> uploading logs');
556
636
 
557
637
  return this.loggerRequest.uploadLogs(options)
@@ -569,6 +649,8 @@ export default class Meetings extends WebexPlugin {
569
649
  details: uploadResult
570
650
  }
571
651
  );
652
+
653
+ return uploadResult;
572
654
  })
573
655
  .catch((uploadError) => {
574
656
  LoggerProxy.logger.error('Meetings:index#uploadLogs --> Unable to upload logs for meeting', uploadError);
@@ -588,6 +670,7 @@ export default class Meetings extends WebexPlugin {
588
670
  Metrics.sendBehavioralMetric(
589
671
  BEHAVIORAL_METRICS.UPLOAD_LOGS_FAILURE,
590
672
  {
673
+ // @ts-ignore - seems like typo
591
674
  meetingId: options.meetingsId,
592
675
  reason: uploadError.message,
593
676
  stack: uploadError.stack,
@@ -604,6 +687,7 @@ export default class Meetings extends WebexPlugin {
604
687
  * @memberof Meetings
605
688
  */
606
689
  setReachability() {
690
+ // @ts-ignore
607
691
  this.reachability = new Reachability(this.webex);
608
692
  }
609
693
 
@@ -658,7 +742,6 @@ export default class Meetings extends WebexPlugin {
658
742
  });
659
743
  }
660
744
 
661
-
662
745
  /**
663
746
  * gets the personal meeting room instance, for saved PMR values for this user
664
747
  * @returns {PersonalMeetingRoom}
@@ -678,7 +761,7 @@ export default class Meetings extends WebexPlugin {
678
761
  * @private
679
762
  * @memberof Meetings
680
763
  */
681
- destroy(meeting, reason) {
764
+ private destroy(meeting: Meeting, reason: object) {
682
765
  MeetingUtil.cleanUp(meeting);
683
766
  this.meetingCollection.delete(meeting.id);
684
767
  Trigger.trigger(
@@ -704,7 +787,7 @@ export default class Meetings extends WebexPlugin {
704
787
  * @public
705
788
  * @memberof Meetings
706
789
  */
707
- create(destination, type = null, useRandomDelayForInfo = false) {
790
+ public create(destination: string, type: string = null, useRandomDelayForInfo: boolean = false) {
708
791
  // TODO: type should be from a dictionary
709
792
 
710
793
  // Validate meeting information based on the provided destination and
@@ -716,7 +799,7 @@ export default class Meetings extends WebexPlugin {
716
799
  .catch((error) => {
717
800
  LoggerProxy.logger.info(`Meetings:index#create --> INFO, unable to determine info options: ${error.message}`);
718
801
  })
719
- .then((options = {}) => {
802
+ .then((options: any = {}) => {
720
803
  // Normalize the destination.
721
804
  const targetDest = options.destination || destination;
722
805
 
@@ -746,11 +829,12 @@ export default class Meetings extends WebexPlugin {
746
829
  if (!meeting) {
747
830
  // Create a meeting based on the normalized destination and type.
748
831
  return this.createMeeting(targetDest, type, useRandomDelayForInfo)
749
- .then((createdMeeting) => {
832
+ .then((createdMeeting: any) => {
750
833
  // If the meeting was successfully created.
751
834
  if (createdMeeting && createdMeeting.on) {
752
835
  // Create a destruction event for the meeting.
753
836
  createdMeeting.on(EVENTS.DESTROY_MEETING, (payload) => {
837
+ // @ts-ignore
754
838
  if (this.config.autoUploadLogs) {
755
839
  this.uploadLogs({
756
840
  callStart: createdMeeting.locusInfo?.fullState?.lastActive,
@@ -766,6 +850,7 @@ export default class Meetings extends WebexPlugin {
766
850
  });
767
851
 
768
852
  createdMeeting.on(EVENTS.REQUEST_UPLOAD_LOGS, (meetingInstance) => {
853
+ // @ts-ignore
769
854
  if (this.config.autoUploadLogs) {
770
855
  this.uploadLogs({
771
856
  callStart: meetingInstance?.locusInfo?.fullState?.lastActive,
@@ -799,19 +884,22 @@ export default class Meetings extends WebexPlugin {
799
884
  * @private
800
885
  * @memberof Meetings
801
886
  */
802
- async createMeeting(destination, type = null, useRandomDelayForInfo = false) {
887
+ private async createMeeting(destination: any, type: string = null, useRandomDelayForInfo: boolean = false) {
803
888
  const meeting = new Meeting(
804
889
  {
890
+ // @ts-ignore
805
891
  userId: this.webex.internal.device.userId,
892
+ // @ts-ignore
806
893
  deviceUrl: this.webex.internal.device.url,
894
+ // @ts-ignore
807
895
  orgId: this.webex.internal.device.orgId,
808
- roapSeq: 0,
809
896
  locus: type === _LOCUS_ID_ ? destination : null, // pass the locus object if present
810
897
  meetingInfoProvider: this.meetingInfo,
811
898
  destination,
812
899
  destinationType: type,
813
900
  },
814
901
  {
902
+ // @ts-ignore
815
903
  parent: this.webex
816
904
  }
817
905
  );
@@ -835,6 +923,7 @@ export default class Meetings extends WebexPlugin {
835
923
  waitingTime = Math.round(Math.random() * maxWaitingTime);
836
924
  }
837
925
  const isMeetingActive = !!destination.fullState?.active;
926
+ // @ts-ignore
838
927
  const {enableUnifiedMeetings} = this.config.experimental;
839
928
 
840
929
  if (enableUnifiedMeetings && !isMeetingActive && useRandomDelayForInfo && waitingTime > 0) {
@@ -911,7 +1000,7 @@ export default class Meetings extends WebexPlugin {
911
1000
  * @public
912
1001
  * @memberof Meetings
913
1002
  */
914
- getMeetingByType(type, value) {
1003
+ public getMeetingByType(type: string, value: object) {
915
1004
  return this.meetingCollection.getByKey(type, value);
916
1005
  }
917
1006
 
@@ -924,7 +1013,12 @@ export default class Meetings extends WebexPlugin {
924
1013
  * @public
925
1014
  * @memberof Meetings
926
1015
  */
927
- getAllMeetings(options = {}) {
1016
+ public getAllMeetings(
1017
+ options: {
1018
+ startDate: object;
1019
+ endDate: object;
1020
+ } = {} as any
1021
+ ) {
928
1022
  // Options may include other parameters to filter this collection
929
1023
  // of meetings.
930
1024
  return this.meetingCollection.getAll(options);
@@ -936,7 +1030,7 @@ export default class Meetings extends WebexPlugin {
936
1030
  * @public
937
1031
  * @memberof Meetings
938
1032
  */
939
- syncMeetings() {
1033
+ public syncMeetings() {
940
1034
  return this.request.getActiveMeetings().then((locusArray) => {
941
1035
  const activeLocusUrl = [];
942
1036
 
@@ -955,8 +1049,10 @@ export default class Meetings extends WebexPlugin {
955
1049
  // Some time the mercury event is missed after mercury reconnect
956
1050
  // if sync returns no locus then clear all the meetings
957
1051
  for (const meeting of Object.values(meetingsCollection)) {
1052
+ // @ts-ignore
958
1053
  if (!activeLocusUrl.includes(meeting.locusUrl)) {
959
1054
  // destroy function also uploads logs
1055
+ // @ts-ignore
960
1056
  this.destroy(meeting, MEETING_REMOVED_REASON.NO_MEETINGS_TO_SYNC);
961
1057
  }
962
1058
  }
@@ -1,3 +1,4 @@
1
+ // @ts-ignore
1
2
  import {StatelessWebexPlugin} from '@webex/webex-core';
2
3
 
3
4
  import LoggerProxy from '../common/logs/logger-proxy';
@@ -16,6 +17,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
16
17
  * @returns {Array} return locus array
17
18
  */
18
19
  getActiveMeetings() {
20
+ // @ts-ignore
19
21
  return this.request({
20
22
  api: API.LOCUS,
21
23
  resource: RESOURCE.LOCI
@@ -31,6 +33,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
31
33
  * @returns {Promise<object>} geoHintInfo
32
34
  */
33
35
  fetchGeoHint() {
36
+ // @ts-ignore
34
37
  return this.webex.internal.services.fetchClientRegionInfo();
35
38
  }
36
39
 
@@ -39,6 +42,7 @@ export default class MeetingRequest extends StatelessWebexPlugin {
39
42
  * @returns {Promise<object>} getMeetingPreferences
40
43
  */
41
44
  getMeetingPreferences() {
45
+ // @ts-ignore
42
46
  return this.webex.internal.services.getMeetingPreferences();
43
47
  }
44
48
 
@@ -50,8 +54,9 @@ export default class MeetingRequest extends StatelessWebexPlugin {
50
54
  * @param {object} responseBody determine the locus and fetch them if a remoteUrl is given
51
55
  * @returns {Promise} returns locusObject array
52
56
  */
53
- determineRedirections(responseBody) {
57
+ determineRedirections(responseBody: any) {
54
58
  if (responseBody.remoteLocusClusterUrls && responseBody.remoteLocusClusterUrls.length) {
59
+ // @ts-ignore
55
60
  return Promise.all(responseBody.remoteLocusClusterUrls.map((url) => this.request({
56
61
  method: HTTP_VERBS.GET,
57
62
  url,
@@ -6,7 +6,8 @@ import {
6
6
  _CREATED_,
7
7
  LOCUSEVENT,
8
8
  CORRELATION_ID,
9
- EVENT_TRIGGERS
9
+ EVENT_TRIGGERS,
10
+ ROAP
10
11
  } from '../constants';
11
12
  import LoggerProxy from '../common/logs/logger-proxy';
12
13
  import Trigger from '../common/events/trigger-proxy';
@@ -29,7 +30,7 @@ import Trigger from '../common/events/trigger-proxy';
29
30
  * @memberof MeetingsUtil
30
31
  */
31
32
 
32
- const MeetingsUtil = {};
33
+ const MeetingsUtil: any = {};
33
34
 
34
35
  MeetingsUtil.getMeetingAddedType = (type) => (type === _LOCUS_ID_ ? _INCOMING_ : _CREATED_);
35
36
 
@@ -41,7 +42,27 @@ MeetingsUtil.handleRoapMercury = (envelope, meetingCollection) => {
41
42
  const meeting = meetingCollection.getByKey(CORRELATION_ID, data.correlationId);
42
43
 
43
44
  if (meeting) {
44
- meeting.roap.roapEvent(data);
45
+ const {
46
+ seq, messageType, tieBreaker, errorType, errorCause
47
+ } = data.message;
48
+
49
+ if (messageType === ROAP.ROAP_TYPES.TURN_DISCOVERY_RESPONSE) {
50
+ // turn discovery is not part of normal roap protocol and so we are not handling it
51
+ // through the usual roap state machine
52
+ meeting.roap.turnDiscovery.handleTurnDiscoveryResponse(data.message);
53
+ }
54
+ else {
55
+ const roapMessage = {
56
+ seq,
57
+ messageType,
58
+ sdp: data.message.sdps?.length > 0 ? data.message.sdps[0] : undefined,
59
+ tieBreaker,
60
+ errorType,
61
+ errorCause
62
+ };
63
+
64
+ meeting.mediaProperties.webrtcMediaConnection.roapMessageReceived(roapMessage);
65
+ }
45
66
  }
46
67
  }
47
68
  };
@@ -103,7 +124,6 @@ MeetingsUtil.hasH264Codec = async () => {
103
124
  return hasCodec;
104
125
  };
105
126
 
106
-
107
127
  /**
108
128
  * Notifies the user whether or not the H.264
109
129
  * codec is present. Will continuously check
@@ -115,7 +135,10 @@ MeetingsUtil.hasH264Codec = async () => {
115
135
  * @param {boolean} options.disableNotifications Default is false. Boolean to enable/disable notification and events
116
136
  * @returns {undefined}
117
137
  */
118
- MeetingsUtil.checkH264Support = async function checkH264Support(options) {
138
+ MeetingsUtil.checkH264Support = async function checkH264Support(options: {
139
+ firstChecked: number;
140
+ disableNotifications: boolean;
141
+ }) {
119
142
  const {hasH264Codec} = MeetingsUtil;
120
143
  const {firstChecked, disableNotifications} = options || {};
121
144
  const delay = 5e3; // ms
@@ -8,12 +8,35 @@ import {
8
8
  _IN_MEETING_
9
9
  } from '../constants';
10
10
 
11
- import MemberUtil from './util.js';
11
+ import MemberUtil from './util';
12
12
 
13
13
  /**
14
14
  * @class Member
15
15
  */
16
16
  export default class Member {
17
+ associatedUser: any;
18
+ id: any;
19
+ isAudioMuted: any;
20
+ isContentSharing: any;
21
+ isDevice: any;
22
+ isGuest: any;
23
+ isHandRaised: any;
24
+ isHost: any;
25
+ isInLobby: any;
26
+ isInMeeting: any;
27
+ isModerator: any;
28
+ isModeratorAssignmentProhibited: any;
29
+ isMutable: any;
30
+ isNotAdmitted: any;
31
+ isRecording: any;
32
+ isRemovable: any;
33
+ isSelf: any;
34
+ isUser: any;
35
+ isVideoMuted: any;
36
+ name: any;
37
+ participant: any;
38
+ status: any;
39
+ type: any;
17
40
  namespace = MEETINGS;
18
41
 
19
42
  /**
@@ -26,8 +49,16 @@ export default class Member {
26
49
  * @returns {Member}
27
50
  * @memberof Member
28
51
  */
29
- constructor(participant, options = {}) {
30
- /**
52
+ constructor(
53
+ participant: object,
54
+ options: {
55
+ selfId: string;
56
+ hostId: string;
57
+ contentSharingId: string;
58
+ type: string;
59
+ } | any = {}
60
+ ) {
61
+ /**
31
62
  * The server participant object
32
63
  * @instance
33
64
  * @type {Object}
@@ -206,7 +237,7 @@ export default class Member {
206
237
  * @private
207
238
  * @memberof Member
208
239
  */
209
- processParticipant(participant) {
240
+ private processParticipant(participant: object) {
210
241
  this.participant = participant;
211
242
  if (participant) {
212
243
  this.id = MemberUtil.extractId(participant);
@@ -233,7 +264,7 @@ export default class Member {
233
264
  * @private
234
265
  * @memberof Member
235
266
  */
236
- processParticipantOptions(participant, options) {
267
+ private processParticipantOptions(participant: object, options: any) {
237
268
  if (participant && options) {
238
269
  this.processIsSelf(participant, options.selfId);
239
270
  this.processIsHost(participant, options.hostId);
@@ -249,7 +280,7 @@ export default class Member {
249
280
  * @private
250
281
  * @memberof Member
251
282
  */
252
- processMember() {
283
+ private processMember() {
253
284
  // must occur after self, guest, meeting, and type properties are calculated
254
285
  this.isRemovable = MemberUtil.isRemovable(this.isSelf, this.isGuest, this.isInMeeting, this.type);
255
286
  // must occur after self, device, meeting, mute status, and type properties are calculated
@@ -263,7 +294,7 @@ export default class Member {
263
294
  * @private
264
295
  * @memberof Member
265
296
  */
266
- processStatus(participant) {
297
+ private processStatus(participant: object) {
267
298
  this.status = MemberUtil.extractStatus(participant);
268
299
  switch (this.status) {
269
300
  case _IN_LOBBY_:
@@ -291,7 +322,7 @@ export default class Member {
291
322
  * @public
292
323
  * @memberof Member
293
324
  */
294
- setIsContentSharing(flag) {
325
+ public setIsContentSharing(flag: boolean) {
295
326
  this.isContentSharing = flag;
296
327
  }
297
328
 
@@ -302,7 +333,7 @@ export default class Member {
302
333
  * @public
303
334
  * @memberof Member
304
335
  */
305
- setIsHost(flag) {
336
+ public setIsHost(flag: boolean) {
306
337
  this.isHost = flag;
307
338
  }
308
339
 
@@ -313,7 +344,7 @@ export default class Member {
313
344
  * @public
314
345
  * @memberof Member
315
346
  */
316
- setIsSelf(flag) {
347
+ public setIsSelf(flag: boolean) {
317
348
  this.isSelf = flag;
318
349
  }
319
350
 
@@ -325,7 +356,7 @@ export default class Member {
325
356
  * @public
326
357
  * @memberof Member
327
358
  */
328
- processIsContentSharing(participant, sharingId) {
359
+ public processIsContentSharing(participant: object, sharingId: string) {
329
360
  if (MemberUtil.isUser(participant)) {
330
361
  this.isContentSharing = MemberUtil.isSame(participant, sharingId);
331
362
  }
@@ -342,7 +373,7 @@ export default class Member {
342
373
  * @public
343
374
  * @memberof Member
344
375
  */
345
- processIsRecording(participant, recordingId) {
376
+ public processIsRecording(participant: object, recordingId: string) {
346
377
  this.isRecording = MemberUtil.isSame(participant, recordingId);
347
378
  }
348
379
 
@@ -354,7 +385,7 @@ export default class Member {
354
385
  * @private
355
386
  * @memberof Member
356
387
  */
357
- processIsSelf(participant, selfId) {
388
+ private processIsSelf(participant: object, selfId: string) {
358
389
  if (MemberUtil.isUser(participant)) {
359
390
  this.isSelf = MemberUtil.isSame(participant, selfId);
360
391
  }
@@ -372,7 +403,7 @@ export default class Member {
372
403
  * @private
373
404
  * @memberof Member
374
405
  */
375
- processIsHost(participant, hostId) {
406
+ private processIsHost(participant: object, hostId: string) {
376
407
  if (MemberUtil.isUser(participant)) {
377
408
  this.isHost = MemberUtil.isSame(participant, hostId);
378
409
  }
@@ -388,7 +419,7 @@ export default class Member {
388
419
  * @private
389
420
  * @memberof Member
390
421
  */
391
- processType(type) {
422
+ private processType(type: string) {
392
423
  this.type = type;
393
424
  }
394
425
  }