@webex/plugin-meetings 2.35.3 → 2.36.0

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 (220) 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.map +1 -1
  23. package/dist/common/errors/webex-meetings-error.js +5 -2
  24. package/dist/common/errors/webex-meetings-error.js.map +1 -1
  25. package/dist/common/events/events-scope.js.map +1 -1
  26. package/dist/common/events/events.js.map +1 -1
  27. package/dist/common/events/trigger-proxy.js.map +1 -1
  28. package/dist/common/events/util.js.map +1 -1
  29. package/dist/common/logs/logger-config.js.map +1 -1
  30. package/dist/common/logs/logger-proxy.js.map +1 -1
  31. package/dist/common/logs/request.js +3 -0
  32. package/dist/common/logs/request.js.map +1 -1
  33. package/dist/common/queue.js.map +1 -1
  34. package/dist/config.js.map +1 -1
  35. package/dist/constants.js.map +1 -1
  36. package/dist/locus-info/controlsUtils.js.map +1 -1
  37. package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
  38. package/dist/locus-info/fullState.js.map +1 -1
  39. package/dist/locus-info/hostUtils.js.map +1 -1
  40. package/dist/locus-info/index.js +43 -5
  41. package/dist/locus-info/index.js.map +1 -1
  42. package/dist/locus-info/infoUtils.js.map +1 -1
  43. package/dist/locus-info/mediaSharesUtils.js.map +1 -1
  44. package/dist/locus-info/parser.js +12 -3
  45. package/dist/locus-info/parser.js.map +1 -1
  46. package/dist/locus-info/selfUtils.js.map +1 -1
  47. package/dist/media/index.js.map +1 -1
  48. package/dist/media/properties.js +12 -0
  49. package/dist/media/properties.js.map +1 -1
  50. package/dist/media/util.js.map +1 -1
  51. package/dist/mediaQualityMetrics/config.js.map +1 -1
  52. package/dist/meeting/effectsState.js +8 -1
  53. package/dist/meeting/effectsState.js.map +1 -1
  54. package/dist/meeting/index.js +206 -46
  55. package/dist/meeting/index.js.map +1 -1
  56. package/dist/meeting/muteState.js +6 -0
  57. package/dist/meeting/muteState.js.map +1 -1
  58. package/dist/meeting/request.js +82 -24
  59. package/dist/meeting/request.js.map +1 -1
  60. package/dist/meeting/state.js.map +1 -1
  61. package/dist/meeting/util.js.map +1 -1
  62. package/dist/meeting-info/collection.js +4 -1
  63. package/dist/meeting-info/collection.js.map +1 -1
  64. package/dist/meeting-info/index.js +5 -0
  65. package/dist/meeting-info/index.js.map +1 -1
  66. package/dist/meeting-info/meeting-info-v2.js +14 -2
  67. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  68. package/dist/meeting-info/request.js +3 -0
  69. package/dist/meeting-info/request.js.map +1 -1
  70. package/dist/meeting-info/util.js.map +1 -1
  71. package/dist/meeting-info/utilv2.js.map +1 -1
  72. package/dist/meetings/collection.js +4 -1
  73. package/dist/meetings/collection.js.map +1 -1
  74. package/dist/meetings/index.js +72 -20
  75. package/dist/meetings/index.js.map +1 -1
  76. package/dist/meetings/request.js +4 -0
  77. package/dist/meetings/request.js.map +1 -1
  78. package/dist/meetings/util.js.map +1 -1
  79. package/dist/member/index.js +30 -7
  80. package/dist/member/index.js.map +1 -1
  81. package/dist/member/util.js +2 -1
  82. package/dist/member/util.js.map +1 -1
  83. package/dist/members/collection.js +1 -0
  84. package/dist/members/collection.js.map +1 -1
  85. package/dist/members/index.js +12 -1
  86. package/dist/members/index.js.map +1 -1
  87. package/dist/members/request.js +19 -9
  88. package/dist/members/request.js.map +1 -1
  89. package/dist/members/util.js.map +1 -1
  90. package/dist/metrics/config.js.map +1 -1
  91. package/dist/metrics/constants.js.map +1 -1
  92. package/dist/metrics/index.js +8 -0
  93. package/dist/metrics/index.js.map +1 -1
  94. package/dist/networkQualityMonitor/index.js +10 -2
  95. package/dist/networkQualityMonitor/index.js.map +1 -1
  96. package/dist/peer-connection-manager/index.js +11 -4
  97. package/dist/peer-connection-manager/index.js.map +1 -1
  98. package/dist/personal-meeting-room/index.js +11 -0
  99. package/dist/personal-meeting-room/index.js.map +1 -1
  100. package/dist/personal-meeting-room/request.js +2 -1
  101. package/dist/personal-meeting-room/request.js.map +1 -1
  102. package/dist/personal-meeting-room/util.js.map +1 -1
  103. package/dist/reachability/index.js +17 -7
  104. package/dist/reachability/index.js.map +1 -1
  105. package/dist/reachability/request.js +1 -0
  106. package/dist/reachability/request.js.map +1 -1
  107. package/dist/reactions/reactions.js +111 -0
  108. package/dist/reactions/reactions.js.map +1 -0
  109. package/dist/reactions/reactions.type.js +40 -0
  110. package/dist/reactions/reactions.type.js.map +1 -0
  111. package/dist/reconnection-manager/index.js +21 -2
  112. package/dist/reconnection-manager/index.js.map +1 -1
  113. package/dist/roap/collection.js +1 -0
  114. package/dist/roap/collection.js.map +1 -1
  115. package/dist/roap/handler.js +14 -2
  116. package/dist/roap/handler.js.map +1 -1
  117. package/dist/roap/index.js +11 -1
  118. package/dist/roap/index.js.map +1 -1
  119. package/dist/roap/request.js +7 -2
  120. package/dist/roap/request.js.map +1 -1
  121. package/dist/roap/state.js.map +1 -1
  122. package/dist/roap/turnDiscovery.js +9 -1
  123. package/dist/roap/turnDiscovery.js.map +1 -1
  124. package/dist/roap/util.js.map +1 -1
  125. package/dist/statsAnalyzer/global.js.map +1 -1
  126. package/dist/statsAnalyzer/index.js +19 -1
  127. package/dist/statsAnalyzer/index.js.map +1 -1
  128. package/dist/statsAnalyzer/mqaUtil.js +9 -3
  129. package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
  130. package/dist/transcription/index.js +10 -3
  131. package/dist/transcription/index.js.map +1 -1
  132. package/package.json +17 -17
  133. package/src/common/{browser-detection.js → browser-detection.ts} +1 -1
  134. package/src/common/collection.ts +6 -6
  135. package/src/common/{config.js → config.ts} +1 -1
  136. package/src/common/errors/{captcha-error.js → captcha-error.ts} +5 -1
  137. package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +6 -1
  138. package/src/common/errors/{join-meeting.js → join-meeting.ts} +6 -1
  139. package/src/common/errors/{media.js → media.ts} +5 -1
  140. package/src/common/errors/parameter.ts +3 -2
  141. package/src/common/errors/{password-error.js → password-error.ts} +5 -1
  142. package/src/common/errors/{permission.js → permission.ts} +5 -1
  143. package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
  144. package/src/common/errors/{reconnection.js → reconnection.ts} +5 -1
  145. package/src/common/errors/{stats.js → stats.ts} +5 -1
  146. package/src/common/errors/{webex-errors.js → webex-errors.ts} +1 -2
  147. package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +3 -1
  148. package/src/common/events/{events-scope.js → events-scope.ts} +1 -1
  149. package/src/common/events/{events.js → events.ts} +0 -0
  150. package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +1 -2
  151. package/src/common/events/{util.js → util.ts} +1 -1
  152. package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
  153. package/src/common/logs/{logger-proxy.js → logger-proxy.ts} +1 -1
  154. package/src/common/logs/{request.js → request.ts} +12 -2
  155. package/src/common/queue.ts +1 -2
  156. package/src/{config.js → config.ts} +1 -0
  157. package/src/constants.ts +1 -0
  158. package/src/locus-info/{controlsUtils.js → controlsUtils.ts} +4 -4
  159. package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
  160. package/src/locus-info/{fullState.js → fullState.ts} +1 -1
  161. package/src/locus-info/{hostUtils.js → hostUtils.ts} +5 -5
  162. package/src/locus-info/{index.js → index.ts} +67 -32
  163. package/src/locus-info/{infoUtils.js → infoUtils.ts} +3 -4
  164. package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +13 -13
  165. package/src/locus-info/{parser.js → parser.ts} +22 -12
  166. package/src/locus-info/{selfUtils.js → selfUtils.ts} +17 -19
  167. package/src/media/{index.js → index.ts} +108 -39
  168. package/src/media/{properties.js → properties.ts} +16 -4
  169. package/src/media/{util.js → util.ts} +2 -3
  170. package/src/mediaQualityMetrics/{config.js → config.ts} +1 -1
  171. package/src/meeting/{effectsState.js → effectsState.ts} +12 -6
  172. package/src/meeting/{index.js → index.ts} +365 -157
  173. package/src/meeting/{muteState.js → muteState.ts} +16 -11
  174. package/src/meeting/{request.js → request.ts} +147 -36
  175. package/src/meeting/{state.js → state.ts} +6 -6
  176. package/src/meeting/{util.js → util.ts} +4 -4
  177. package/src/meeting-info/{collection.js → collection.ts} +4 -1
  178. package/src/meeting-info/{index.js → index.ts} +10 -6
  179. package/src/meeting-info/{meeting-info-v2.js → meeting-info-v2.ts} +28 -10
  180. package/src/meeting-info/{request.js → request.ts} +6 -2
  181. package/src/meeting-info/{util.js → util.ts} +6 -5
  182. package/src/meeting-info/{utilv2.js → utilv2.ts} +8 -7
  183. package/src/meetings/{collection.js → collection.ts} +5 -2
  184. package/src/meetings/{index.js → index.ts} +88 -22
  185. package/src/meetings/{request.js → request.ts} +6 -1
  186. package/src/meetings/{util.js → util.ts} +5 -3
  187. package/src/member/{index.js → index.ts} +46 -15
  188. package/src/member/{util.js → util.ts} +17 -16
  189. package/src/members/{collection.js → collection.ts} +2 -1
  190. package/src/members/{index.js → index.ts} +39 -26
  191. package/src/members/{request.js → request.ts} +16 -5
  192. package/src/members/{util.js → util.ts} +7 -7
  193. package/src/metrics/{config.js → config.ts} +0 -2
  194. package/src/metrics/{constants.js → constants.ts} +0 -0
  195. package/src/metrics/{index.js → index.ts} +27 -8
  196. package/src/networkQualityMonitor/{index.js → index.ts} +18 -3
  197. package/src/peer-connection-manager/{index.js → index.ts} +72 -28
  198. package/src/personal-meeting-room/{index.js → index.ts} +17 -4
  199. package/src/personal-meeting-room/{request.js → request.ts} +3 -1
  200. package/src/personal-meeting-room/{util.js → util.ts} +1 -1
  201. package/src/reachability/{index.js → index.ts} +28 -17
  202. package/src/reachability/request.ts +4 -2
  203. package/src/reactions/reactions.ts +104 -0
  204. package/src/reactions/reactions.type.ts +36 -0
  205. package/src/reconnection-manager/{index.js → index.ts} +42 -13
  206. package/src/roap/{collection.js → collection.ts} +1 -0
  207. package/src/roap/{handler.js → handler.ts} +15 -4
  208. package/src/roap/{index.js → index.ts} +23 -10
  209. package/src/roap/{request.js → request.ts} +19 -3
  210. package/src/roap/{state.js → state.ts} +3 -2
  211. package/src/roap/turnDiscovery.ts +14 -5
  212. package/src/roap/{util.js → util.ts} +1 -2
  213. package/src/statsAnalyzer/{global.js → global.ts} +0 -0
  214. package/src/statsAnalyzer/{index.js → index.ts} +36 -17
  215. package/src/statsAnalyzer/{mqaUtil.js → mqaUtil.ts} +6 -1
  216. package/src/transcription/{index.js → index.ts} +16 -11
  217. package/test/integration/spec/space-meeting.js +1 -2
  218. package/test/unit/spec/meeting/index.js +113 -14
  219. package/test/unit/spec/meeting/request.js +25 -1
  220. package/test/unit/spec/roap/util.js +1 -1
@@ -1,5 +1,6 @@
1
1
  import uuid from 'uuid';
2
2
  import {cloneDeep, isEqual, pick, isString} from 'lodash';
3
+ // @ts-ignore - Fix this
3
4
  import {StatelessWebexPlugin} from '@webex/webex-core';
4
5
  import {Media as WebRTCMedia} from '@webex/internal-media-core';
5
6
 
@@ -76,13 +77,15 @@ import MediaError from '../common/errors/media';
76
77
  import {MeetingInfoV2PasswordError, MeetingInfoV2CaptchaError} from '../meeting-info/meeting-info-v2';
77
78
  import BrowserDetection from '../common/browser-detection';
78
79
  import RoapCollection from '../roap/collection';
80
+ import {SkinTones, Reactions} from '../reactions/reactions';
81
+ import {Reaction, ReactionType, SkinToneType} from '../reactions/reactions.type';
79
82
 
80
83
  import InMeetingActions from './in-meeting-actions';
81
84
 
82
85
 
83
86
  const {isBrowser} = BrowserDetection();
84
87
 
85
- const logRequest = (request, {header = '', success = '', failure = ''}) => {
88
+ const logRequest = (request: any, { header = '', success = '', failure = '' }) => {
86
89
  LoggerProxy.logger.info(header);
87
90
 
88
91
  return request
@@ -392,6 +395,81 @@ export const MEDIA_UPDATE_TYPE = {
392
395
  * @class Meeting
393
396
  */
394
397
  export default class Meeting extends StatelessWebexPlugin {
398
+ attrs: any;
399
+ audio: any;
400
+ conversationUrl: string;
401
+ correlationId: string;
402
+ destination: string;
403
+ destinationType: string;
404
+ deviceUrl: string;
405
+ effects: any;
406
+ hostId: string;
407
+ id: string;
408
+ locusUrl: string;
409
+ mediaConnections: any[];
410
+ meetingFiniteStateMachine: any;
411
+ meetingInfo: object;
412
+ meetingRequest: MeetingRequest;
413
+ members: Members;
414
+ options: object;
415
+ orgId: string;
416
+ owner: string;
417
+ partner: any;
418
+ policy: string;
419
+ reconnectionManager: ReconnectionManager;
420
+ resource: string;
421
+ roap: Roap;
422
+ roapSeq: number;
423
+ sipUri: string;
424
+ type: string;
425
+ userId: string;
426
+ video: any;
427
+ callEvents: any[];
428
+ deferJoin: Promise<any>;
429
+ dialInDeviceStatus: string;
430
+ dialInUrl: string;
431
+ dialOutDeviceStatus: string;
432
+ dialOutUrl: string;
433
+ fetchMeetingInfoTimeoutId: NodeJS.Timeout;
434
+ floorGrantPending: boolean;
435
+ hasJoinedOnce: boolean;
436
+ hasWebsocketConnected: boolean;
437
+ inMeetingActions: InMeetingActions;
438
+ isLocalShareLive: boolean;
439
+ isSharing: boolean;
440
+ keepAliveTimerId: NodeJS.Timeout;
441
+ lastVideoLayoutInfo: any;
442
+ locusInfo: any;
443
+ mediaProperties: MediaProperties;
444
+ meetingInfoFailureReason: string;
445
+ networkQualityMonitor: NetworkQualityMonitor;
446
+ networkStatus: string;
447
+ passwordStatus: string;
448
+ queuedMediaUpdates: any[];
449
+ recording: any;
450
+ requiredCaptcha: any;
451
+ shareStatus: string;
452
+ statsAnalyzer: StatsAnalyzer;
453
+ transcription: Transcription;
454
+ updateMediaConnections: (mediaConnections: any[]) => void;
455
+ endCallInitiateJoinReq: any;
456
+ endJoinReqResp: any;
457
+ endLocalSDPGenRemoteSDPRecvDelay: any;
458
+ joinedWith: any;
459
+ locusId: any;
460
+ startCallInitiateJoinReq: any;
461
+ startJoinReqResp: any;
462
+ startLocalSDPGenRemoteSDPRecvDelay: any;
463
+ wirelessShare: any;
464
+ guest: any;
465
+ meetingJoinUrl: any;
466
+ meetingNumber: any;
467
+ meetingState: any;
468
+ permissionToken: any;
469
+ resourceId: any;
470
+ resourceUrl: string;
471
+ selfId: string;
472
+ state: any;
395
473
  namespace = MEETINGS;
396
474
 
397
475
  /**
@@ -400,7 +478,7 @@ export default class Meeting extends StatelessWebexPlugin {
400
478
  * @constructor
401
479
  * @memberof Meeting
402
480
  */
403
- constructor(attrs, options) {
481
+ constructor(attrs: any, options: object) {
404
482
  super({}, options);
405
483
  /**
406
484
  * @instance
@@ -492,7 +570,8 @@ export default class Meeting extends StatelessWebexPlugin {
492
570
  * @public
493
571
  * @memberof Meeting
494
572
  */
495
- this.members = new Members({locusUrl: (attrs.locus && attrs.locus.url)}, {parent: this.webex});
573
+ // @ts-ignore - Fix type
574
+ this.members = new Members({locusUrl: attrs.locus && attrs.locus.url}, {parent: this.webex});
496
575
  /**
497
576
  * @instance
498
577
  * @type {Roap}
@@ -500,6 +579,7 @@ export default class Meeting extends StatelessWebexPlugin {
500
579
  * @private
501
580
  * @memberof Meeting
502
581
  */
582
+ // @ts-ignore - Fix type
503
583
  this.roap = new Roap({}, {parent: this.webex});
504
584
  /**
505
585
  * created later
@@ -656,7 +736,7 @@ export default class Meeting extends StatelessWebexPlugin {
656
736
  * @private
657
737
  * @memberof Meeting
658
738
  */
659
- this.updateMediaConnections = (mediaConnections) => {
739
+ this.updateMediaConnections = (mediaConnections: any[]) => {
660
740
  if (!isEqual(this.mediaConnections, mediaConnections)) {
661
741
  // grab last/latest item in the new mediaConnections information
662
742
  this.mediaConnections = mediaConnections.slice(-1);
@@ -689,7 +769,7 @@ export default class Meeting extends StatelessWebexPlugin {
689
769
  this.isSharing = false;
690
770
  /**
691
771
  * @instance
692
- * @type {Boolean}
772
+ * @type {string}
693
773
  * @readonly
694
774
  * @public
695
775
  * @memberof Meeting
@@ -729,7 +809,7 @@ export default class Meeting extends StatelessWebexPlugin {
729
809
  /**
730
810
  * There is a pending floor requested by the user
731
811
  * @instance
732
- * @type {floorGrantPending}
812
+ * @type {boolean}
733
813
  * @private
734
814
  * @memberof Meeting
735
815
  */
@@ -797,6 +877,7 @@ export default class Meeting extends StatelessWebexPlugin {
797
877
  * @private
798
878
  * @memberof Meeting
799
879
  */
880
+ // @ts-ignore - Fix type
800
881
  this.locusInfo = new LocusInfo(this.updateMeetingObject.bind(this), this.webex, this.id);
801
882
  // We had to add listeners first before setting up the locus instance
802
883
  /**
@@ -824,6 +905,7 @@ export default class Meeting extends StatelessWebexPlugin {
824
905
  * @private
825
906
  * @memberof Meeting
826
907
  */
908
+ // @ts-ignore - Fix type
827
909
  this.hasWebsocketConnected = this.webex.internal.mercury.connected;
828
910
 
829
911
  /**
@@ -910,9 +992,7 @@ export default class Meeting extends StatelessWebexPlugin {
910
992
  * @memberof Meeting
911
993
  * @returns {Promise}
912
994
  */
913
- async fetchMeetingInfo({
914
- password = null, captchaCode = null
915
- }) {
995
+ public async fetchMeetingInfo({ password = null, captchaCode = null }: { password?: string; captchaCode?: string }) {
916
996
  // when fetch meeting info is called directly by the client, we want to clear out the random timer for sdk to do it
917
997
  if (this.fetchMeetingInfoTimeoutId) {
918
998
  clearTimeout(this.fetchMeetingInfoTimeoutId);
@@ -954,6 +1034,7 @@ export default class Meeting extends StatelessWebexPlugin {
954
1034
  }
955
1035
  catch (err) {
956
1036
  if (err instanceof MeetingInfoV2PasswordError) {
1037
+ // @ts-ignore
957
1038
  LoggerProxy.logger.info(`Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ${this.destination} - password required (code=${err?.body?.code}).`);
958
1039
 
959
1040
  // when wbxappapi requires password it still populates partial meeting info in the response
@@ -972,6 +1053,7 @@ export default class Meeting extends StatelessWebexPlugin {
972
1053
  throw (new PasswordError());
973
1054
  }
974
1055
  else if (err instanceof MeetingInfoV2CaptchaError) {
1056
+ // @ts-ignore
975
1057
  LoggerProxy.logger.info(`Meeting:index#fetchMeetingInfo --> Info Unable to fetch meeting info for ${this.destination} - captcha required (code=${err?.body?.code}).`);
976
1058
 
977
1059
  this.meetingInfoFailureReason = (this.requiredCaptcha) ?
@@ -1001,7 +1083,7 @@ export default class Meeting extends StatelessWebexPlugin {
1001
1083
  * @memberof Meeting
1002
1084
  * @returns {Promise<{isPasswordValid: boolean, requiredCaptcha: boolean, failureReason: MEETING_INFO_FAILURE_REASON}>}
1003
1085
  */
1004
- verifyPassword(password, captchaCode) {
1086
+ public verifyPassword(password: string, captchaCode: string) {
1005
1087
  return this.fetchMeetingInfo({
1006
1088
  password, captchaCode
1007
1089
  })
@@ -1031,7 +1113,7 @@ export default class Meeting extends StatelessWebexPlugin {
1031
1113
  * @memberof Meeting
1032
1114
  * @returns {Promise}
1033
1115
  */
1034
- refreshCaptcha() {
1116
+ public refreshCaptcha() {
1035
1117
  if (!this.requiredCaptcha) {
1036
1118
  return Promise.reject(new Error('There is no captcha to refresh'));
1037
1119
  }
@@ -1061,7 +1143,7 @@ export default class Meeting extends StatelessWebexPlugin {
1061
1143
  * @private
1062
1144
  * @memberof Meeting
1063
1145
  */
1064
- setUpLocusInfoListeners() {
1146
+ private setUpLocusInfoListeners() {
1065
1147
  // meeting update listeners
1066
1148
  this.setUpLocusInfoSelfListener();
1067
1149
  this.setUpLocusInfoMeetingListener();
@@ -1079,14 +1161,13 @@ export default class Meeting extends StatelessWebexPlugin {
1079
1161
  this.setUpLocusInfoMediaInactiveListener();
1080
1162
  }
1081
1163
 
1082
-
1083
1164
  /**
1084
1165
  * Set up the locus info listener for meetings disconnected due to inactivity
1085
1166
  * @returns {undefined}
1086
1167
  * @private
1087
1168
  * @memberof Meeting
1088
1169
  */
1089
- setUpLocusInfoMediaInactiveListener() {
1170
+ private setUpLocusInfoMediaInactiveListener() {
1090
1171
  // User gets kicked off the meeting due to inactivity or user did a refresh
1091
1172
  this.locusInfo.on(EVENTS.DISCONNECT_DUE_TO_INACTIVITY, (res) => {
1092
1173
  // https:// jira-eng-gpk2.cisco.com/jira/browse/SPARK-240520
@@ -1114,6 +1195,7 @@ export default class Meeting extends StatelessWebexPlugin {
1114
1195
 
1115
1196
  LoggerProxy.logger.error(`Meeting:index#setUpLocusInfoMediaInactiveListener --> Meeting disconnected due to inactivity: ${res.reason}`);
1116
1197
 
1198
+ // @ts-ignore - config coming from registerPlugin
1117
1199
  if (this.config.reconnection.autoRejoin) {
1118
1200
  this.reconnect();
1119
1201
  }
@@ -1137,7 +1219,7 @@ export default class Meeting extends StatelessWebexPlugin {
1137
1219
  * @private
1138
1220
  * @memberof Meeting
1139
1221
  */
1140
- setUpLocusInfoAssignHostListener() {
1222
+ private setUpLocusInfoAssignHostListener() {
1141
1223
  this.locusInfo.on(EVENTS.LOCUS_INFO_CAN_ASSIGN_HOST, (payload) => {
1142
1224
  const changed = this.inMeetingActions.set({
1143
1225
  canAssignHost: payload.canAssignHost,
@@ -1163,7 +1245,7 @@ export default class Meeting extends StatelessWebexPlugin {
1163
1245
  * @private
1164
1246
  * @memberof Meeting
1165
1247
  */
1166
- setUpLocusFullStateListener() {
1248
+ private setUpLocusFullStateListener() {
1167
1249
  this.locusInfo.on(LOCUSINFO.EVENTS.FULL_STATE_MEETING_STATE_CHANGE, (payload) => {
1168
1250
  Trigger.trigger(
1169
1251
  this,
@@ -1194,7 +1276,13 @@ export default class Meeting extends StatelessWebexPlugin {
1194
1276
  * @returns {Object}
1195
1277
  * @memberof Meeting
1196
1278
  */
1197
- getAnalyzerMetricsPrePayload(options) {
1279
+ getAnalyzerMetricsPrePayload(options: {
1280
+ event: string;
1281
+ trackingId: string;
1282
+ locus: object;
1283
+ mediaConnections: Array<any>;
1284
+ errors: object;
1285
+ } | any) {
1198
1286
  if (options) {
1199
1287
  const {
1200
1288
  event,
@@ -1208,11 +1296,12 @@ export default class Meeting extends StatelessWebexPlugin {
1208
1296
  return null;
1209
1297
  }
1210
1298
 
1211
- const identifiers = {
1299
+ const identifiers: any = {
1212
1300
  correlationId: this.correlationId,
1213
1301
  userId: this.userId,
1214
1302
  deviceId: this.deviceUrl,
1215
1303
  orgId: this.orgId,
1304
+ // @ts-ignore fix type
1216
1305
  locusUrl: this.webex.internal.services.get('locus')
1217
1306
  };
1218
1307
 
@@ -1334,12 +1423,14 @@ export default class Meeting extends StatelessWebexPlugin {
1334
1423
  * @private
1335
1424
  * @memberof Meeting
1336
1425
  */
1337
- sendCallAnalyzerMetrics(options) {
1426
+ private sendCallAnalyzerMetrics(options: { event: string; trackingId: string; locus: object; errors: object }) {
1338
1427
  const payload = this.getAnalyzerMetricsPrePayload({
1428
+ // @ts-ignore - config coming from registerPlugin
1339
1429
  ...pick(this.config.metrics, ['clientType', 'subClientType']),
1340
1430
  ...options
1341
1431
  });
1342
1432
 
1433
+ // @ts-ignore - fix type
1343
1434
  return this.webex.internal.metrics.submitCallDiagnosticEvents(payload);
1344
1435
  }
1345
1436
 
@@ -1353,13 +1444,15 @@ export default class Meeting extends StatelessWebexPlugin {
1353
1444
  * @private
1354
1445
  * @memberof Meeting
1355
1446
  */
1356
- sendMediaQualityAnalyzerMetrics(options) {
1447
+ private sendMediaQualityAnalyzerMetrics(options: { event: string; trackingId: string; locus: object }) {
1357
1448
  const payload = this.getAnalyzerMetricsPrePayload({
1358
1449
  type: MQA_STATS.CA_TYPE,
1450
+ // @ts-ignore - config coming from registerPlugin
1359
1451
  ...pick(this.config.metrics, ['clientType', 'subClientType']),
1360
1452
  ...options
1361
1453
  });
1362
1454
 
1455
+ // @ts-ignore
1363
1456
  return this.webex.internal.metrics.submitCallDiagnosticEvents(payload);
1364
1457
  }
1365
1458
 
@@ -1370,7 +1463,7 @@ export default class Meeting extends StatelessWebexPlugin {
1370
1463
  * @returns {undefined}
1371
1464
  * @memberof Meeting
1372
1465
  */
1373
- setNetworkStatus(networkStatus) {
1466
+ private setNetworkStatus(networkStatus: string) {
1374
1467
  if (networkStatus === NETWORK_STATUS.DISCONNECTED) {
1375
1468
  Trigger.trigger(
1376
1469
  this,
@@ -1403,14 +1496,14 @@ export default class Meeting extends StatelessWebexPlugin {
1403
1496
  * @private
1404
1497
  * @memberof Meeting
1405
1498
  */
1406
- setUpLocusSelfListener() {
1499
+ private setUpLocusSelfListener() {
1407
1500
  this.locusInfo.on(EVENTS.LOCUS_INFO_UPDATE_SELF, (payload) => {
1408
1501
  this.members.locusSelfUpdate(payload);
1409
1502
  this.pstnUpdate(payload);
1410
1503
 
1411
1504
  // If user moved to a JOINED state and there is a pending floor grant trigger it
1412
1505
  if (this.floorGrantPending && payload.newSelf.state === MEETING_STATE.STATES.JOINED) {
1413
- this.share()
1506
+ this.requestScreenShareFloor()
1414
1507
  .then(() => { this.floorGrantPending = false; });
1415
1508
  }
1416
1509
  });
@@ -1423,7 +1516,7 @@ export default class Meeting extends StatelessWebexPlugin {
1423
1516
  * @private
1424
1517
  * @memberof Meeting
1425
1518
  */
1426
- pstnUpdate(payload) {
1519
+ private pstnUpdate(payload: any) {
1427
1520
  if (this.locusInfo.self) {
1428
1521
  const dialInPstnDevice = payload.newSelf?.pstnDevices.find((device) => device.url === this.dialInUrl);
1429
1522
  const dialOutPstnDevice = payload.newSelf?.pstnDevices.find((device) => device.url === this.dialOutUrl);
@@ -1478,7 +1571,7 @@ export default class Meeting extends StatelessWebexPlugin {
1478
1571
  * @private
1479
1572
  * @memberof Meeting
1480
1573
  */
1481
- setUpLocusHostListener() {
1574
+ private setUpLocusHostListener() {
1482
1575
  this.locusInfo.on(EVENTS.LOCUS_INFO_UPDATE_HOST, (payload) => {
1483
1576
  this.members.locusHostUpdate(payload);
1484
1577
  });
@@ -1492,13 +1585,12 @@ export default class Meeting extends StatelessWebexPlugin {
1492
1585
  * @private
1493
1586
  * @memberof Meeting
1494
1587
  */
1495
- setUpLocusParticipantsListener() {
1588
+ private setUpLocusParticipantsListener() {
1496
1589
  this.locusInfo.on(EVENTS.LOCUS_INFO_UPDATE_PARTICIPANTS, (payload) => {
1497
1590
  this.members.locusParticipantsUpdate(payload);
1498
1591
  });
1499
1592
  }
1500
1593
 
1501
-
1502
1594
  /**
1503
1595
  * Set up the locus info recording update listener
1504
1596
  * update recording value for the meeting
@@ -1517,7 +1609,7 @@ export default class Meeting extends StatelessWebexPlugin {
1517
1609
  * @private
1518
1610
  * @memberof Meeting
1519
1611
  */
1520
- setupLocusControlsListener() {
1612
+ private setupLocusControlsListener() {
1521
1613
  this.locusInfo.on(LOCUSINFO.EVENTS.CONTROLS_RECORDING_UPDATED,
1522
1614
  ({state, modifiedBy, lastModified}) => {
1523
1615
  let event;
@@ -1573,6 +1665,8 @@ export default class Meeting extends StatelessWebexPlugin {
1573
1665
 
1574
1666
  this.locusInfo.on(LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIBE_UPDATED,
1575
1667
  ({caption, transcribing}) => {
1668
+
1669
+ // @ts-ignore - config coming from registerPlugin
1576
1670
  if (transcribing && this.transcription && this.config.receiveTranscription) {
1577
1671
  this.receiveTranscription();
1578
1672
  }
@@ -1611,7 +1705,7 @@ export default class Meeting extends StatelessWebexPlugin {
1611
1705
  * @private
1612
1706
  * @memberof Meeting
1613
1707
  */
1614
- setUpLocusMediaSharesListener() {
1708
+ private setUpLocusMediaSharesListener() {
1615
1709
  // Will get triggered on local and remote share
1616
1710
  this.locusInfo.on(EVENTS.LOCUS_INFO_UPDATE_MEDIA_SHARES, (payload) => {
1617
1711
  const {content: contentShare, whiteboard: whiteboardShare} = payload.current;
@@ -1699,7 +1793,7 @@ export default class Meeting extends StatelessWebexPlugin {
1699
1793
  this,
1700
1794
  {
1701
1795
  file: 'meeting/index',
1702
- function: 'stopFloorRequest'
1796
+ function: 'localShare'
1703
1797
  },
1704
1798
  EVENT_TRIGGERS.MEETING_STOPPED_SHARING_LOCAL,
1705
1799
  {
@@ -1842,7 +1936,7 @@ export default class Meeting extends StatelessWebexPlugin {
1842
1936
  * @private
1843
1937
  * @memberof Meeting
1844
1938
  */
1845
- setUpLocusUrlListener() {
1939
+ private setUpLocusUrlListener() {
1846
1940
  this.locusInfo.on(EVENTS.LOCUS_INFO_UPDATE_URL, (payload) => {
1847
1941
  this.members.locusUrlUpdate(payload);
1848
1942
  this.locusUrl = payload;
@@ -1856,7 +1950,7 @@ export default class Meeting extends StatelessWebexPlugin {
1856
1950
  * @private
1857
1951
  * @memberof meeting
1858
1952
  */
1859
- setUpLocusInfoMeetingInfoListener() {
1953
+ private setUpLocusInfoMeetingInfoListener() {
1860
1954
  this.locusInfo.on(LOCUSINFO.EVENTS.MEETING_LOCKED, (payload) => {
1861
1955
  if (payload) {
1862
1956
  Trigger.trigger(
@@ -1934,7 +2028,7 @@ export default class Meeting extends StatelessWebexPlugin {
1934
2028
  * @private
1935
2029
  * @memberof meeting
1936
2030
  */
1937
- setUpLocusEmbeddedAppsListener() {
2031
+ private setUpLocusEmbeddedAppsListener() {
1938
2032
  this.locusInfo.on(LOCUSINFO.EVENTS.EMBEDDED_APPS_UPDATED, (embeddedApps) => {
1939
2033
  if (embeddedApps) {
1940
2034
  Trigger.trigger(
@@ -1956,7 +2050,7 @@ export default class Meeting extends StatelessWebexPlugin {
1956
2050
  * @private
1957
2051
  * @memberof Meeting
1958
2052
  */
1959
- setUpLocusInfoSelfListener() {
2053
+ private setUpLocusInfoSelfListener() {
1960
2054
  this.locusInfo.on(LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED, (payload) => {
1961
2055
  if (this.audio) {
1962
2056
  this.audio.handleServerLocalUnmuteRequired(this);
@@ -2054,6 +2148,7 @@ export default class Meeting extends StatelessWebexPlugin {
2054
2148
  }
2055
2149
  });
2056
2150
 
2151
+ // @ts-ignore - check if MEDIA_INACTIVITY exists
2057
2152
  this.locusInfo.on(LOCUSINFO.EVENTS.MEDIA_INACTIVITY, () => {
2058
2153
  Metrics.sendBehavioralMetric(
2059
2154
  BEHAVIORAL_METRICS.MEETING_MEDIA_INACTIVE,
@@ -2120,7 +2215,7 @@ export default class Meeting extends StatelessWebexPlugin {
2120
2215
  * @private
2121
2216
  * @memberof Meeting
2122
2217
  */
2123
- setUpLocusInfoMeetingListener() {
2218
+ private setUpLocusInfoMeetingListener() {
2124
2219
  this.locusInfo.on(EVENTS.REMOTE_RESPONSE, (payload) => {
2125
2220
  this.meetingFiniteStateMachine.remote(payload);
2126
2221
 
@@ -2128,6 +2223,7 @@ export default class Meeting extends StatelessWebexPlugin {
2128
2223
  this.leave({reason: payload.reason}).then(() => {
2129
2224
  LoggerProxy.logger.info('Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Attempting to leave meeting.');
2130
2225
  }).catch((error) => {
2226
+ // @ts-ignore
2131
2227
  LoggerProxy.logger.error(`Meeting:index#setUpLocusInfoMeetingListener --> REMOTE_RESPONSE. Issue with leave for meeting, meeting still in collection: ${this.meeting}, error: ${error}`);
2132
2228
  });
2133
2229
  }
@@ -2156,6 +2252,7 @@ export default class Meeting extends StatelessWebexPlugin {
2156
2252
  this.leave({reason: payload.reason}).then(() => {
2157
2253
  LoggerProxy.logger.warn('Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. The meeting has been left, but has not been destroyed, you should see a later event for leave.');
2158
2254
  }).catch((error) => {
2255
+ // @ts-ignore
2159
2256
  LoggerProxy.logger.error(`Meeting:index#setUpLocusInfoMeetingListener --> DESTROY_MEETING. Issue with leave for meeting, meeting still in collection: ${this.meeting}, error: ${error}`);
2160
2257
  });
2161
2258
  }
@@ -2187,7 +2284,7 @@ export default class Meeting extends StatelessWebexPlugin {
2187
2284
  * @memberof Meeting
2188
2285
  * // TODO: is this function necessary?
2189
2286
  */
2190
- updateMeetingObject(object) {
2287
+ private updateMeetingObject(object: object) {
2191
2288
  // Validate if these are valid meeting object property
2192
2289
  // TODO: add a check to make sure the value passed in the constructor
2193
2290
  // is not changed by any delta event
@@ -2209,7 +2306,14 @@ export default class Meeting extends StatelessWebexPlugin {
2209
2306
  * @public
2210
2307
  * @memberof Meeting
2211
2308
  */
2212
- invite(invitee, alertIfActive = true) {
2309
+ public invite(
2310
+ invitee: {
2311
+ emailAddress: string;
2312
+ email: string;
2313
+ phoneNumber: string;
2314
+ },
2315
+ alertIfActive: boolean = true
2316
+ ) {
2213
2317
  return this.members.addMember(invitee, alertIfActive);
2214
2318
  }
2215
2319
 
@@ -2221,7 +2325,7 @@ export default class Meeting extends StatelessWebexPlugin {
2221
2325
  * @public
2222
2326
  * @memberof Meeting
2223
2327
  */
2224
- cancelPhoneInvite(invitee) {
2328
+ public cancelPhoneInvite(invitee: { phoneNumber: string }) {
2225
2329
  return this.members.cancelPhoneInvite(invitee);
2226
2330
  }
2227
2331
 
@@ -2232,7 +2336,7 @@ export default class Meeting extends StatelessWebexPlugin {
2232
2336
  * @public
2233
2337
  * @memberof Meeting
2234
2338
  */
2235
- admit(memberIds) {
2339
+ public admit(memberIds: Array<any>) {
2236
2340
  return this.members.admitMembers(memberIds);
2237
2341
  }
2238
2342
 
@@ -2243,7 +2347,7 @@ export default class Meeting extends StatelessWebexPlugin {
2243
2347
  * @public
2244
2348
  * @memberof Meeting
2245
2349
  */
2246
- remove(memberId) {
2350
+ public remove(memberId: string) {
2247
2351
  return this.members.removeMember(memberId);
2248
2352
  }
2249
2353
 
@@ -2255,7 +2359,7 @@ export default class Meeting extends StatelessWebexPlugin {
2255
2359
  * @public
2256
2360
  * @memberof Meeting
2257
2361
  */
2258
- mute(memberId, mute = true) {
2362
+ public mute(memberId: string, mute: boolean = true) {
2259
2363
  return this.members.muteMember(memberId, mute);
2260
2364
  }
2261
2365
 
@@ -2267,7 +2371,7 @@ export default class Meeting extends StatelessWebexPlugin {
2267
2371
  * @public
2268
2372
  * @memberof Meeting
2269
2373
  */
2270
- transfer(memberId, moderator = true) {
2374
+ public transfer(memberId: string, moderator: boolean = true) {
2271
2375
  return this.members.transferHostToMember(memberId, moderator);
2272
2376
  }
2273
2377
 
@@ -2277,7 +2381,7 @@ export default class Meeting extends StatelessWebexPlugin {
2277
2381
  * @public
2278
2382
  * @memberof Meeting
2279
2383
  */
2280
- getMembers() {
2384
+ public getMembers() {
2281
2385
  return this.members;
2282
2386
  }
2283
2387
 
@@ -2287,7 +2391,7 @@ export default class Meeting extends StatelessWebexPlugin {
2287
2391
  * @public
2288
2392
  * @memberof Meeting
2289
2393
  */
2290
- isAudioConnected() {
2394
+ public isAudioConnected() {
2291
2395
  return !!this.audio;
2292
2396
  }
2293
2397
 
@@ -2297,7 +2401,7 @@ export default class Meeting extends StatelessWebexPlugin {
2297
2401
  * @public
2298
2402
  * @memberof Meeting
2299
2403
  */
2300
- isAudioMuted() {
2404
+ public isAudioMuted() {
2301
2405
  return this.audio && this.audio.isMuted();
2302
2406
  }
2303
2407
 
@@ -2307,7 +2411,7 @@ export default class Meeting extends StatelessWebexPlugin {
2307
2411
  * @public
2308
2412
  * @memberof Meeting
2309
2413
  */
2310
- isAudioSelf() {
2414
+ public isAudioSelf() {
2311
2415
  return this.audio && this.audio.isSelf();
2312
2416
  }
2313
2417
 
@@ -2317,7 +2421,7 @@ export default class Meeting extends StatelessWebexPlugin {
2317
2421
  * @public
2318
2422
  * @memberof Meeting
2319
2423
  */
2320
- isVideoConnected() {
2424
+ public isVideoConnected() {
2321
2425
  return !!this.video;
2322
2426
  }
2323
2427
 
@@ -2327,7 +2431,7 @@ export default class Meeting extends StatelessWebexPlugin {
2327
2431
  * @public
2328
2432
  * @memberof Meeting
2329
2433
  */
2330
- isVideoMuted() {
2434
+ public isVideoMuted() {
2331
2435
  return this.video && this.video.isMuted();
2332
2436
  }
2333
2437
 
@@ -2337,7 +2441,7 @@ export default class Meeting extends StatelessWebexPlugin {
2337
2441
  * @public
2338
2442
  * @memberof Meeting
2339
2443
  */
2340
- isVideoSelf() {
2444
+ public isVideoSelf() {
2341
2445
  return this.video && this.video.isSelf();
2342
2446
  }
2343
2447
 
@@ -2354,7 +2458,17 @@ export default class Meeting extends StatelessWebexPlugin {
2354
2458
  * @private
2355
2459
  * @memberof Meeting
2356
2460
  */
2357
- parseMeetingInfo(meetingInfo, destination = null) {
2461
+ parseMeetingInfo(
2462
+ meetingInfo: {
2463
+ body: {
2464
+ conversationUrl: string;
2465
+ locusUrl: string;
2466
+ sipUri: string;
2467
+ owner: object;
2468
+ };
2469
+ } | any,
2470
+ destination: object | string | null = null
2471
+ ) {
2358
2472
  const webexMeetingInfo = meetingInfo?.body;
2359
2473
  // We try to use as much info from Locus meeting object, stored in destination
2360
2474
 
@@ -2368,7 +2482,9 @@ export default class Meeting extends StatelessWebexPlugin {
2368
2482
  if (locusMeetingObject || (webexMeetingInfo && !(meetingInfo?.errors && meetingInfo?.errors.length > 0))) {
2369
2483
  this.conversationUrl = locusMeetingObject?.conversationUrl || webexMeetingInfo?.conversationUrl || this.conversationUrl;
2370
2484
  this.locusUrl = locusMeetingObject?.url || webexMeetingInfo?.locusUrl || this.locusUrl;
2485
+ // @ts-ignore - config coming from registerPlugin
2371
2486
  this.setSipUri(this.config.experimental.enableUnifiedMeetings ? locusMeetingObject?.info.sipUri || webexMeetingInfo?.sipUrl : locusMeetingObject?.info.sipUri || webexMeetingInfo?.sipMeetingUri || this.sipUri);
2487
+ // @ts-ignore - config coming from registerPlugin
2372
2488
  if (this.config.experimental.enableUnifiedMeetings) {
2373
2489
  this.meetingNumber = locusMeetingObject?.info.webExMeetingId || webexMeetingInfo?.meetingNumber;
2374
2490
  this.meetingJoinUrl = webexMeetingInfo?.meetingJoinUrl;
@@ -2388,7 +2504,7 @@ export default class Meeting extends StatelessWebexPlugin {
2388
2504
  * @private
2389
2505
  * @memberof Meeting
2390
2506
  */
2391
- parseLocus(locus) {
2507
+ private parseLocus(locus: { url: string; participants: Array<any>; self: object }) {
2392
2508
  if (locus) {
2393
2509
  this.locusUrl = locus.url;
2394
2510
  // TODO: move this to parse participants module
@@ -2415,7 +2531,7 @@ export default class Meeting extends StatelessWebexPlugin {
2415
2531
  * @private
2416
2532
  * @memberof Meeting
2417
2533
  */
2418
- setSipUri(sipUri) {
2534
+ setSipUri(sipUri: string) {
2419
2535
  // This can be tel no, device id or a sip uri, user Id
2420
2536
  this.sipUri = sipUri;
2421
2537
  }
@@ -2427,7 +2543,7 @@ export default class Meeting extends StatelessWebexPlugin {
2427
2543
  * @private
2428
2544
  * @memberof Meeting
2429
2545
  */
2430
- setRoapSeq(seq) {
2546
+ setRoapSeq(seq: number) {
2431
2547
  if (seq >= 0) {
2432
2548
  this.roapSeq = seq;
2433
2549
  }
@@ -2446,8 +2562,14 @@ export default class Meeting extends StatelessWebexPlugin {
2446
2562
  * @private
2447
2563
  * @memberof Meeting
2448
2564
  */
2449
- setLocus(locus) {
2450
- const mtgLocus = locus.locus || locus;
2565
+ private setLocus(locus: {
2566
+ mediaConnections: Array<any>;
2567
+ locusUrl: string;
2568
+ locusId: string;
2569
+ mediaId: string;
2570
+ host: object;
2571
+ } | any) {
2572
+ const mtgLocus: any = locus.locus || locus;
2451
2573
 
2452
2574
  // LocusInfo object saves the locus object
2453
2575
  // this.locus = mtgLocus;
@@ -2455,6 +2577,7 @@ export default class Meeting extends StatelessWebexPlugin {
2455
2577
  this.locusUrl = locus.locusUrl || locus.url;
2456
2578
  this.locusId = locus.locusId;
2457
2579
  this.selfId = locus.selfId;
2580
+ // @ts-ignore
2458
2581
  this.mediaId = locus.mediaId;
2459
2582
  this.hostId = mtgLocus.host ? mtgLocus.host.id : this.hostId;
2460
2583
  this.locusInfo.initialSetup(mtgLocus);
@@ -2468,7 +2591,7 @@ export default class Meeting extends StatelessWebexPlugin {
2468
2591
  * @public
2469
2592
  * @memberof Meeting
2470
2593
  */
2471
- setRemoteStream(pc) {
2594
+ public setRemoteStream(pc: any) {
2472
2595
  if (!pc) {
2473
2596
  return;
2474
2597
  }
@@ -2490,7 +2613,6 @@ export default class Meeting extends StatelessWebexPlugin {
2490
2613
  const mediaTrack = event.track;
2491
2614
  let trackMediaID = null;
2492
2615
 
2493
-
2494
2616
  // In case of safari some time the transceiver is not present for specific os version
2495
2617
  // sdk tries to determine the transceive using the track id present
2496
2618
  if (event.transceiver && event.transceiver.mid) {
@@ -2523,7 +2645,6 @@ export default class Meeting extends StatelessWebexPlugin {
2523
2645
  }
2524
2646
  }
2525
2647
 
2526
-
2527
2648
  switch (trackMediaID) {
2528
2649
  case MEDIA_ID.AUDIO_TRACK:
2529
2650
  eventType = EVENT_TYPES.REMOTE_AUDIO;
@@ -2572,7 +2693,7 @@ export default class Meeting extends StatelessWebexPlugin {
2572
2693
  * @public
2573
2694
  * @memberof Meeting
2574
2695
  */
2575
- uploadLogs(options = {file: 'meeting/index', function: 'uploadLogs'}) {
2696
+ public uploadLogs(options: object = { file: 'meeting/index', function: 'uploadLogs' }) {
2576
2697
  Trigger.trigger(
2577
2698
  this,
2578
2699
  options,
@@ -2581,7 +2702,6 @@ export default class Meeting extends StatelessWebexPlugin {
2581
2702
  );
2582
2703
  }
2583
2704
 
2584
-
2585
2705
  /**
2586
2706
  * Removes remote audio and video stream on the class instance and triggers an event
2587
2707
  * to developers
@@ -2590,7 +2710,7 @@ export default class Meeting extends StatelessWebexPlugin {
2590
2710
  * @memberof Meeting
2591
2711
  * @deprecated after v1.89.3
2592
2712
  */
2593
- unsetRemoteStream() {
2713
+ public unsetRemoteStream() {
2594
2714
  LoggerProxy.logger.warn('Meeting:index#unsetRemoteStream --> [DEPRECATION WARNING]: unsetRemoteStream has been deprecated after v1.89.3');
2595
2715
  this.mediaProperties.unsetRemoteMedia();
2596
2716
  }
@@ -2611,7 +2731,7 @@ export default class Meeting extends StatelessWebexPlugin {
2611
2731
  * @memberof Meeting
2612
2732
  * @deprecated after v1.89.3
2613
2733
  */
2614
- closeRemoteStream() {
2734
+ public closeRemoteStream() {
2615
2735
  LoggerProxy.logger.warn('Meeting:index#closeRemoteStream --> [DEPRECATION WARNING]: closeRemoteStream has been deprecated after v1.89.3');
2616
2736
  this.closeRemoteTracks();
2617
2737
  }
@@ -2635,7 +2755,7 @@ export default class Meeting extends StatelessWebexPlugin {
2635
2755
  * @returns {void}
2636
2756
  * @inner
2637
2757
  */
2638
- const triggerMediaStoppedEvent = (mediaType) => {
2758
+ const triggerMediaStoppedEvent = (mediaType: string) => {
2639
2759
  Trigger.trigger(
2640
2760
  this,
2641
2761
  {
@@ -2657,7 +2777,7 @@ export default class Meeting extends StatelessWebexPlugin {
2657
2777
  * @inner
2658
2778
  */
2659
2779
  // eslint-disable-next-line arrow-body-style
2660
- const stopTrack = (track, type) => {
2780
+ const stopTrack = (track: MediaStreamTrack, type: string) => {
2661
2781
  return Media.stopTracks(track)
2662
2782
  .then(() => {
2663
2783
  const isTrackStopped = track && track.readyState === ENDED;
@@ -2685,7 +2805,7 @@ export default class Meeting extends StatelessWebexPlugin {
2685
2805
  * @private
2686
2806
  * @memberof Meeting
2687
2807
  */
2688
- sendLocalMediaReadyEvent() {
2808
+ private sendLocalMediaReadyEvent() {
2689
2809
  Trigger.trigger(
2690
2810
  this,
2691
2811
  {
@@ -2708,7 +2828,7 @@ export default class Meeting extends StatelessWebexPlugin {
2708
2828
  * @private
2709
2829
  * @memberof Meeting
2710
2830
  */
2711
- setLocalAudioTrack(audioTrack, emitEvent = true) {
2831
+ private setLocalAudioTrack(audioTrack: MediaStreamTrack, emitEvent: boolean = true) {
2712
2832
  if (audioTrack) {
2713
2833
  const settings = audioTrack.getSettings();
2714
2834
 
@@ -2735,7 +2855,7 @@ export default class Meeting extends StatelessWebexPlugin {
2735
2855
  * @private
2736
2856
  * @memberof Meeting
2737
2857
  */
2738
- setLocalVideoTrack(videoTrack, emitEvent = true) {
2858
+ private setLocalVideoTrack(videoTrack: MediaStreamTrack, emitEvent: boolean = true) {
2739
2859
  if (videoTrack) {
2740
2860
  const {
2741
2861
  aspectRatio, frameRate, height, width, deviceId
@@ -2775,7 +2895,7 @@ export default class Meeting extends StatelessWebexPlugin {
2775
2895
  * @public
2776
2896
  * @memberof Meeting
2777
2897
  */
2778
- setLocalTracks(localStream) {
2898
+ public setLocalTracks(localStream: any) {
2779
2899
  if (localStream) {
2780
2900
  const {audioTrack, videoTrack} = MeetingUtil.getTrack(localStream);
2781
2901
 
@@ -2788,12 +2908,12 @@ export default class Meeting extends StatelessWebexPlugin {
2788
2908
 
2789
2909
  /**
2790
2910
  * Sets the local media stream on the class and emits an event to the developer
2791
- * @param {Stream} localShare the local media stream
2911
+ * @param {MediaStream} localShare the local media stream
2792
2912
  * @returns {undefined}
2793
2913
  * @public
2794
2914
  * @memberof Meeting
2795
2915
  */
2796
- setLocalShareTrack(localShare) {
2916
+ public setLocalShareTrack(localShare: MediaStream) {
2797
2917
  let settings = null;
2798
2918
 
2799
2919
  if (localShare) {
@@ -2837,7 +2957,7 @@ export default class Meeting extends StatelessWebexPlugin {
2837
2957
  * @public
2838
2958
  * @memberof Meeting
2839
2959
  */
2840
- closeLocalStream() {
2960
+ public closeLocalStream() {
2841
2961
  const {audioTrack, videoTrack} = this.mediaProperties;
2842
2962
 
2843
2963
  return Media.stopTracks(audioTrack)
@@ -2872,7 +2992,7 @@ export default class Meeting extends StatelessWebexPlugin {
2872
2992
  * @public
2873
2993
  * @memberof Meeting
2874
2994
  */
2875
- closeLocalShare() {
2995
+ public closeLocalShare() {
2876
2996
  const track = this.mediaProperties.shareTrack;
2877
2997
 
2878
2998
  return Media.stopTracks(track).then(() => {
@@ -2901,7 +3021,7 @@ export default class Meeting extends StatelessWebexPlugin {
2901
3021
  * @public
2902
3022
  * @memberof Meeting
2903
3023
  */
2904
- unsetLocalVideoTrack() {
3024
+ public unsetLocalVideoTrack() {
2905
3025
  this.mediaProperties.unsetLocalVideoTrack();
2906
3026
  }
2907
3027
 
@@ -2911,7 +3031,7 @@ export default class Meeting extends StatelessWebexPlugin {
2911
3031
  * @public
2912
3032
  * @memberof Meeting
2913
3033
  */
2914
- unsetLocalShareTrack() {
3034
+ public unsetLocalShareTrack() {
2915
3035
  this.mediaProperties.unsetLocalShareTrack();
2916
3036
  }
2917
3037
 
@@ -2921,9 +3041,10 @@ export default class Meeting extends StatelessWebexPlugin {
2921
3041
  * @public
2922
3042
  * @memberof Meeting
2923
3043
  */
2924
- setMercuryListener() {
3044
+ public setMercuryListener() {
2925
3045
  // Client will have a socket manager and handle reconnecting to mercury, when we reconnect to mercury
2926
3046
  // if the meeting has active peer connections, it should try to reconnect.
3047
+ // @ts-ignore
2927
3048
  this.webex.internal.mercury.on(ONLINE, () => {
2928
3049
  LoggerProxy.logger.info('Meeting:index#setMercuryListener --> Web socket online');
2929
3050
 
@@ -2943,6 +3064,7 @@ export default class Meeting extends StatelessWebexPlugin {
2943
3064
  this.hasWebsocketConnected = true;
2944
3065
  });
2945
3066
 
3067
+ // @ts-ignore
2946
3068
  this.webex.internal.mercury.on(OFFLINE, () => {
2947
3069
  LoggerProxy.logger.error('Meeting:index#setMercuryListener --> Web socket offline');
2948
3070
  Metrics.postEvent({
@@ -2965,7 +3087,7 @@ export default class Meeting extends StatelessWebexPlugin {
2965
3087
  * @public
2966
3088
  * @memberof Meeting
2967
3089
  */
2968
- closePeerConnections() {
3090
+ public closePeerConnections() {
2969
3091
  return PeerConnectionManager.close(this.mediaProperties.peerConnection);
2970
3092
  }
2971
3093
 
@@ -2977,9 +3099,11 @@ export default class Meeting extends StatelessWebexPlugin {
2977
3099
  * @public
2978
3100
  * @memberof Meeting
2979
3101
  */
2980
- unsetPeerConnections() {
3102
+ public unsetPeerConnections() {
2981
3103
  this.mediaProperties.unsetPeerConnection();
3104
+ // @ts-ignore - config coming from registerPlugin
2982
3105
  if (this.config.reconnection.detection) {
3106
+ // @ts-ignore
2983
3107
  this.webex.internal.mercury.off(ONLINE);
2984
3108
  }
2985
3109
  }
@@ -2991,7 +3115,7 @@ export default class Meeting extends StatelessWebexPlugin {
2991
3115
  * @private
2992
3116
  * @memberof Meeting
2993
3117
  */
2994
- setCorrelationId(id) {
3118
+ private setCorrelationId(id: string) {
2995
3119
  this.correlationId = id;
2996
3120
  }
2997
3121
 
@@ -3001,11 +3125,12 @@ export default class Meeting extends StatelessWebexPlugin {
3001
3125
  * @public
3002
3126
  * @memberof Meeting
3003
3127
  */
3004
- muteAudio() {
3128
+ public muteAudio() {
3005
3129
  if (!MeetingUtil.isUserInJoinedState(this.locusInfo)) {
3006
3130
  return Promise.reject(new UserNotJoinedError());
3007
3131
  }
3008
3132
 
3133
+ // @ts-ignore
3009
3134
  if (!this.mediaId) {
3010
3135
  // Happens when addMedia and mute are triggered in succession
3011
3136
  return Promise.reject(new NoMediaEstablishedYetError());
@@ -3052,11 +3177,12 @@ export default class Meeting extends StatelessWebexPlugin {
3052
3177
  * @public
3053
3178
  * @memberof Meeting
3054
3179
  */
3055
- unmuteAudio() {
3180
+ public unmuteAudio() {
3056
3181
  if (!MeetingUtil.isUserInJoinedState(this.locusInfo)) {
3057
3182
  return Promise.reject(new UserNotJoinedError());
3058
3183
  }
3059
3184
 
3185
+ // @ts-ignore
3060
3186
  if (!this.mediaId) {
3061
3187
  // Happens when addMedia and mute are triggered in succession
3062
3188
  return Promise.reject(new NoMediaEstablishedYetError());
@@ -3103,11 +3229,12 @@ export default class Meeting extends StatelessWebexPlugin {
3103
3229
  * @public
3104
3230
  * @memberof Meeting
3105
3231
  */
3106
- muteVideo() {
3232
+ public muteVideo() {
3107
3233
  if (!MeetingUtil.isUserInJoinedState(this.locusInfo)) {
3108
3234
  return Promise.reject(new UserNotJoinedError());
3109
3235
  }
3110
3236
 
3237
+ // @ts-ignore
3111
3238
  if (!this.mediaId) {
3112
3239
  // Happens when addMedia and mute are triggered in succession
3113
3240
  return Promise.reject(new NoMediaEstablishedYetError());
@@ -3153,11 +3280,12 @@ export default class Meeting extends StatelessWebexPlugin {
3153
3280
  * @public
3154
3281
  * @memberof Meeting
3155
3282
  */
3156
- unmuteVideo() {
3283
+ public unmuteVideo() {
3157
3284
  if (!MeetingUtil.isUserInJoinedState(this.locusInfo)) {
3158
3285
  return Promise.reject(new UserNotJoinedError());
3159
3286
  }
3160
3287
 
3288
+ // @ts-ignore
3161
3289
  if (!this.mediaId) {
3162
3290
  // Happens when addMedia and mute are triggered in succession
3163
3291
  return Promise.reject(new NoMediaEstablishedYetError());
@@ -3222,7 +3350,13 @@ export default class Meeting extends StatelessWebexPlugin {
3222
3350
  * video: 'videoDeviceId'
3223
3351
  * }})
3224
3352
  */
3225
- joinWithMedia(options = {}) {
3353
+ public joinWithMedia(
3354
+ options: {
3355
+ joinOptions?: any;
3356
+ mediaSettings: any;
3357
+ audioVideoOptions?: any;
3358
+ } = {} as any
3359
+ ) {
3226
3360
  // TODO: add validations for parameters
3227
3361
  const {mediaSettings, joinOptions, audioVideoOptions} = options;
3228
3362
 
@@ -3266,19 +3400,21 @@ export default class Meeting extends StatelessWebexPlugin {
3266
3400
  * @public
3267
3401
  * @memberof Meeting
3268
3402
  */
3269
- reconnect(options) {
3403
+ public reconnect(options?: object) {
3270
3404
  LoggerProxy.logger.log(`Meeting:index#reconnect --> attempting to reconnect meeting ${this.id}`);
3271
3405
 
3272
3406
  if (!this.reconnectionManager || !this.reconnectionManager.reconnect) {
3273
3407
  return Promise.reject(new ParameterError('Cannot reconnect, ReconnectionManager must first be defined.'));
3274
3408
  }
3275
3409
 
3410
+ // @ts-ignore - currentMediaStatus coming from SelfUtil
3276
3411
  if (!MeetingUtil.isMediaEstablished(this.currentMediaStatus)) {
3277
3412
  return Promise.reject(new ParameterError('Cannot reconnect, Media has not established to reconnect'));
3278
3413
  }
3279
3414
 
3280
3415
  try {
3281
3416
  LoggerProxy.logger.info('Meeting:index#reconnect --> Validating reconnect ability.');
3417
+ // @ts-ignore
3282
3418
  this.reconnectionManager.validate();
3283
3419
  }
3284
3420
  catch (error) {
@@ -3302,7 +3438,6 @@ export default class Meeting extends StatelessWebexPlugin {
3302
3438
  EVENT_TRIGGERS.MEETING_RECONNECTION_STARTING
3303
3439
  );
3304
3440
 
3305
-
3306
3441
  return this.reconnectionManager
3307
3442
  .reconnect(options)
3308
3443
  .then(() => {
@@ -3375,7 +3510,7 @@ export default class Meeting extends StatelessWebexPlugin {
3375
3510
  * @private
3376
3511
  * @returns {void}
3377
3512
  */
3378
- monitorTranscriptionSocketConnection() {
3513
+ private monitorTranscriptionSocketConnection() {
3379
3514
  this.transcription.onCloseSocket((event) => {
3380
3515
  LoggerProxy.logger.info(
3381
3516
  `Meeting:index#onCloseSocket -->
@@ -3413,7 +3548,7 @@ export default class Meeting extends StatelessWebexPlugin {
3413
3548
  * @private
3414
3549
  * @returns {Promise<void>} a promise to open the WebSocket connection
3415
3550
  */
3416
- async receiveTranscription() {
3551
+ private async receiveTranscription() {
3417
3552
  LoggerProxy.logger.info(
3418
3553
  `Meeting:index#receiveTranscription -->
3419
3554
  Attempting to generate a web socket url.`
@@ -3421,6 +3556,7 @@ export default class Meeting extends StatelessWebexPlugin {
3421
3556
 
3422
3557
  try {
3423
3558
  const {datachannelUrl} = this.locusInfo.info;
3559
+ // @ts-ignore - fix type
3424
3560
  const {body: {webSocketUrl}} = await this.request({
3425
3561
  method: HTTP_VERBS.POST,
3426
3562
  uri: datachannelUrl,
@@ -3434,6 +3570,7 @@ export default class Meeting extends StatelessWebexPlugin {
3434
3570
 
3435
3571
  this.transcription = new Transcription(
3436
3572
  webSocketUrl,
3573
+ // @ts-ignore - fix type
3437
3574
  this.webex.sessionId,
3438
3575
  this.members,
3439
3576
  );
@@ -3457,6 +3594,7 @@ export default class Meeting extends StatelessWebexPlugin {
3457
3594
  });
3458
3595
 
3459
3596
  this.monitorTranscriptionSocketConnection();
3597
+ // @ts-ignore - fix type
3460
3598
  this.transcription.connect(this.webex.credentials.supertoken.access_token);
3461
3599
  }
3462
3600
  catch (error) {
@@ -3489,12 +3627,11 @@ export default class Meeting extends StatelessWebexPlugin {
3489
3627
  * @private
3490
3628
  * @returns{void}
3491
3629
  */
3492
- triggerStopReceivingTranscriptionEvent() {
3630
+ private triggerStopReceivingTranscriptionEvent() {
3493
3631
  LoggerProxy.logger.info(`
3494
3632
  Meeting:index#stopReceivingTranscription -->
3495
3633
  closed transcription LLM web socket connection successfully.`);
3496
3634
 
3497
-
3498
3635
  Trigger.trigger(
3499
3636
  this,
3500
3637
  {
@@ -3517,7 +3654,8 @@ export default class Meeting extends StatelessWebexPlugin {
3517
3654
  * if joining as host on second loop, pass pin and pass moderator if joining as guest on second loop
3518
3655
  * Scenario D: Joining any other way (sip, pstn, conversationUrl, link just need to specify resourceId)
3519
3656
  */
3520
- join(options = {}) {
3657
+ public join(options: any = {}) {
3658
+ // @ts-ignore - fix type
3521
3659
  if (!this.webex.meetings.registered) {
3522
3660
  const errorMessage = 'Meeting:index#join --> Device not registered';
3523
3661
  const error = new Error(errorMessage);
@@ -3643,6 +3781,7 @@ export default class Meeting extends StatelessWebexPlugin {
3643
3781
  return join;
3644
3782
  }).then(async (join) => {
3645
3783
  if (isBrowser) {
3784
+ // @ts-ignore - config coming from registerPlugin
3646
3785
  if (this.config.receiveTranscription || options.receiveTranscription) {
3647
3786
  if (this.isTranscriptionSupported()) {
3648
3787
  await this.receiveTranscription();
@@ -3654,7 +3793,6 @@ export default class Meeting extends StatelessWebexPlugin {
3654
3793
  LoggerProxy.logger.error('Meeting:index#join --> Receving transcription is not supported on this platform');
3655
3794
  }
3656
3795
 
3657
-
3658
3796
  return join;
3659
3797
  })
3660
3798
  .catch((error) => {
@@ -3707,7 +3845,7 @@ export default class Meeting extends StatelessWebexPlugin {
3707
3845
  * @public
3708
3846
  * @memberof Meeting
3709
3847
  */
3710
- usePhoneAudio(phoneNumber) {
3848
+ public usePhoneAudio(phoneNumber: string) {
3711
3849
  if (!phoneNumber) {
3712
3850
  return this.dialInPstn();
3713
3851
  }
@@ -3722,7 +3860,7 @@ export default class Meeting extends StatelessWebexPlugin {
3722
3860
  * @private
3723
3861
  * @memberof Meeting
3724
3862
  */
3725
- isPhoneProvisioned(pstnStatus) {
3863
+ private isPhoneProvisioned(pstnStatus: string) {
3726
3864
  return [PSTN_STATUS.JOINED, PSTN_STATUS.CONNECTED, PSTN_STATUS.SUCCESS].includes(pstnStatus);
3727
3865
  }
3728
3866
 
@@ -3732,7 +3870,7 @@ export default class Meeting extends StatelessWebexPlugin {
3732
3870
  * @private
3733
3871
  * @memberof Meeting
3734
3872
  */
3735
- dialInPstn() {
3873
+ private dialInPstn() {
3736
3874
  if (this.isPhoneProvisioned(this.dialInDeviceStatus)) return Promise.resolve(); // prevent multiple dial in devices from being provisioned
3737
3875
 
3738
3876
  const {correlationId, locusUrl} = this;
@@ -3770,7 +3908,7 @@ export default class Meeting extends StatelessWebexPlugin {
3770
3908
  * @private
3771
3909
  * @memberof Meeting
3772
3910
  */
3773
- dialOutPstn(phoneNumber) {
3911
+ private dialOutPstn(phoneNumber: string) {
3774
3912
  if (this.isPhoneProvisioned(this.dialOutDeviceStatus)) return Promise.resolve(); // prevent multiple dial out devices from being provisioned
3775
3913
 
3776
3914
  const {correlationId, locusUrl} = this;
@@ -3809,7 +3947,7 @@ export default class Meeting extends StatelessWebexPlugin {
3809
3947
  * @memberof Meeting
3810
3948
  * @returns {Promise}
3811
3949
  */
3812
- disconnectPhoneAudio() {
3950
+ public disconnectPhoneAudio() {
3813
3951
  return Promise.all([
3814
3952
  this.isPhoneProvisioned(this.dialInDeviceStatus) ?
3815
3953
  MeetingUtil.disconnectPhoneAudio(this, this.dialInUrl) :
@@ -3827,7 +3965,7 @@ export default class Meeting extends StatelessWebexPlugin {
3827
3965
  * @public
3828
3966
  * @memberof Meeting
3829
3967
  */
3830
- moveTo(resourceId) {
3968
+ public moveTo(resourceId: string) {
3831
3969
  if (!resourceId) {
3832
3970
  throw new ParameterError('Cannot move call without a resourceId.');
3833
3971
  }
@@ -3862,7 +4000,7 @@ export default class Meeting extends StatelessWebexPlugin {
3862
4000
 
3863
4001
  try {
3864
4002
  if (this.isSharing) {
3865
- await this.stopFloorRequest();
4003
+ await this.releaseScreenShareFloor();
3866
4004
  }
3867
4005
  const mediaSettings = {
3868
4006
  mediaDirection: {
@@ -3887,6 +4025,7 @@ export default class Meeting extends StatelessWebexPlugin {
3887
4025
 
3888
4026
  // when a move to is intiated by the client , Locus delets the existing media node from the server as soon the DX answers the meeting
3889
4027
  // once the DX answers we establish connection back the media server with only receiveShare enabled
4028
+ // @ts-ignore - reconnectMedia does not accept any argument
3890
4029
  await this.reconnectionManager.reconnectMedia(mediaSettings)
3891
4030
  .then(() => {
3892
4031
  Metrics.sendBehavioralMetric(
@@ -3936,7 +4075,7 @@ export default class Meeting extends StatelessWebexPlugin {
3936
4075
  * @public
3937
4076
  * @memberof Meeting
3938
4077
  */
3939
- moveFrom(resourceId) {
4078
+ public moveFrom(resourceId: string) {
3940
4079
  // On moveFrom ask the developer to re capture it moveFrom then updateMedia
3941
4080
  if (!resourceId) {
3942
4081
  throw new ParameterError('Cannot move call without a resourceId.');
@@ -3983,10 +4122,10 @@ export default class Meeting extends StatelessWebexPlugin {
3983
4122
  * @memberof Meeting
3984
4123
  */
3985
4124
  getMediaStreams = (
3986
- mediaDirection,
4125
+ mediaDirection: any,
3987
4126
  // This return an OBJECT {video: {height, widght}}
3988
- audioVideo = VIDEO_RESOLUTIONS[this.mediaProperties.localQualityLevel],
3989
- sharePreferences
4127
+ audioVideo: any = VIDEO_RESOLUTIONS[this.mediaProperties.localQualityLevel],
4128
+ sharePreferences?: any
3990
4129
  ) => {
3991
4130
  if (
3992
4131
  mediaDirection &&
@@ -4063,6 +4202,7 @@ export default class Meeting extends StatelessWebexPlugin {
4063
4202
  },
4064
4203
  audioVideo,
4065
4204
  sharePreferences,
4205
+ // @ts-ignore - config coming from registerPlugin
4066
4206
  this.config
4067
4207
  )
4068
4208
  .catch((error) => {
@@ -4100,7 +4240,7 @@ export default class Meeting extends StatelessWebexPlugin {
4100
4240
  * @returns {Object}
4101
4241
  * @memberof Meetings
4102
4242
  */
4103
- getSupportedDevices = ({sendAudio = true, sendVideo = true}) => Media.getSupportedDevice({sendAudio, sendVideo});
4243
+ getSupportedDevices = ({ sendAudio = true, sendVideo = true }: { sendAudio: boolean; sendVideo: boolean }) => Media.getSupportedDevice({ sendAudio, sendVideo });
4104
4244
 
4105
4245
  /**
4106
4246
  * Get the devices from the Media module
@@ -4119,6 +4259,7 @@ export default class Meeting extends StatelessWebexPlugin {
4119
4259
  this.statsAnalyzer.on(StatsAnalyzerEvents.MEDIA_QUALITY, (options) => {
4120
4260
  // TODO: might have to send the same event to the developer
4121
4261
  // Add ip address info if geo hint is present
4262
+ // @ts-ignore fix type
4122
4263
  options.data.intervalMetadata.peerReflexiveIP = this.webex.meetings.geoHintInfo?.clientAddress || options.data.intervalMetadata.peerReflexiveIP || MQA_STATS.DEFAULT_IP;
4123
4264
  Metrics.postEvent({event: eventType.MEDIA_QUALITY, meeting: this, data: {intervalData: options.data, networkType: options.networkType}});
4124
4265
  });
@@ -4189,7 +4330,7 @@ export default class Meeting extends StatelessWebexPlugin {
4189
4330
  * @public
4190
4331
  * @memberof Meeting
4191
4332
  */
4192
- addMedia(options = {}) {
4333
+ addMedia(options: any = {}) {
4193
4334
  const LOG_HEADER = 'Meeting:index#addMedia -->';
4194
4335
 
4195
4336
  let turnDiscoverySkippedReason;
@@ -4203,6 +4344,7 @@ export default class Meeting extends StatelessWebexPlugin {
4203
4344
  return Promise.reject(new UserNotJoinedError());
4204
4345
  }
4205
4346
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
4347
+ // @ts-ignore - isUserUnadmitted coming from SelfUtil
4206
4348
  if (this.isUserUnadmitted && !this.wirelessShare) {
4207
4349
  return Promise.reject(new UserInLobbyError());
4208
4350
  }
@@ -4251,7 +4393,9 @@ export default class Meeting extends StatelessWebexPlugin {
4251
4393
  .then(() => Media.attachMedia(this.mediaProperties, {
4252
4394
  meetingId: this.id,
4253
4395
  remoteQualityLevel: this.mediaProperties.remoteQualityLevel,
4396
+ // @ts-ignore - config coming from registerPlugin
4254
4397
  enableRtx: this.config.enableRtx,
4398
+ // @ts-ignore - config coming from registerPlugin
4255
4399
  enableExtmap: this.config.enableExtmap,
4256
4400
  setStartLocalSDPGenRemoteSDPRecvDelay: this.setStartLocalSDPGenRemoteSDPRecvDelay.bind(this)
4257
4401
  }))
@@ -4265,9 +4409,12 @@ export default class Meeting extends StatelessWebexPlugin {
4265
4409
  LoggerProxy.logger.info(`${LOG_HEADER} PeerConnection Received from attachMedia `);
4266
4410
 
4267
4411
  this.setRemoteStream(peerConnection);
4412
+ // @ts-ignore - config coming from registerPlugin
4268
4413
  if (this.config.stats.enableStatsAnalyzer) {
4269
4414
  // TODO: ** Dont re create StatsAnalyzer on reconnect or rejoin
4415
+ // @ts-ignore - config coming from registerPlugin
4270
4416
  this.networkQualityMonitor = new NetworkQualityMonitor(this.config.stats);
4417
+ // @ts-ignore - config coming from registerPlugin
4271
4418
  this.statsAnalyzer = new StatsAnalyzer(this.config.stats, this.networkQualityMonitor);
4272
4419
  this.setupStatsAnalyzerEventHandlers();
4273
4420
  this.networkQualityMonitor.on(EVENT_TRIGGERS.NETWORK_QUALITY, this.sendNetworkQualityEvent.bind(this));
@@ -4290,7 +4437,7 @@ export default class Meeting extends StatelessWebexPlugin {
4290
4437
 
4291
4438
  throw error;
4292
4439
  })
4293
- .then(() => new Promise((resolve, reject) => {
4440
+ .then(() => new Promise<void>((resolve, reject) => {
4294
4441
  let timerCount = 0;
4295
4442
 
4296
4443
  // eslint-disable-next-line func-names
@@ -4333,7 +4480,7 @@ export default class Meeting extends StatelessWebexPlugin {
4333
4480
 
4334
4481
  if (mediaSettings && mediaSettings.sendShare && localShare) {
4335
4482
  if (this.state === MEETING_STATE.STATES.JOINED) {
4336
- return this.share();
4483
+ return this.requestScreenShareFloor();
4337
4484
  }
4338
4485
 
4339
4486
  // When the self state changes to JOINED then request the floor
@@ -4420,7 +4567,7 @@ export default class Meeting extends StatelessWebexPlugin {
4420
4567
  * @private
4421
4568
  * @memberof Meeting
4422
4569
  */
4423
- enqueueMediaUpdate(mediaUpdateType, options) {
4570
+ private enqueueMediaUpdate(mediaUpdateType: string, options: object) {
4424
4571
  return new Promise((resolve, reject) => {
4425
4572
  const queueItem = {
4426
4573
  pendingPromiseResolve: resolve, pendingPromiseReject: reject, mediaUpdateType, options
@@ -4438,6 +4585,7 @@ export default class Meeting extends StatelessWebexPlugin {
4438
4585
  * @memberof Meeting
4439
4586
  */
4440
4587
  mediaNegotiatedEvent = () => {
4588
+ // @ts-ignore - config coming from registerPlugin
4441
4589
  if (this.config.experimental.enableMediaNegotiatedEvent) {
4442
4590
  LoggerProxy.logger.info('Meeting:mediaNegotiatedEvent --> Media server negotiated');
4443
4591
  Trigger.trigger(
@@ -4497,7 +4645,13 @@ export default class Meeting extends StatelessWebexPlugin {
4497
4645
  * @public
4498
4646
  * @memberof Meeting
4499
4647
  */
4500
- updateMedia(options = {}) {
4648
+ public updateMedia(
4649
+ options: {
4650
+ localStream?: MediaStream;
4651
+ localShare?: MediaStream;
4652
+ mediaSettings?: any;
4653
+ } = {} as any
4654
+ ) {
4501
4655
  const LOG_HEADER = 'Meeting:index#updateMedia -->';
4502
4656
 
4503
4657
  if (!this.canUpdateMedia()) {
@@ -4514,7 +4668,9 @@ export default class Meeting extends StatelessWebexPlugin {
4514
4668
  .then(() => Media.updateMedia(this.mediaProperties, {
4515
4669
  meetingId: this.id,
4516
4670
  remoteQualityLevel: this.mediaProperties.remoteQualityLevel,
4671
+ // @ts-ignore - config coming from registerPlugin
4517
4672
  enableRtx: this.config.enableRtx,
4673
+ // @ts-ignore - config coming from registerPlugin
4518
4674
  enableExtmap: this.config.enableExtmap,
4519
4675
  })
4520
4676
  .then((peerConnection) => {
@@ -4557,7 +4713,7 @@ export default class Meeting extends StatelessWebexPlugin {
4557
4713
  // we actually get a OFFER from the server and a GLAR condition happens
4558
4714
  if (startShare) {
4559
4715
  // We are assuming that the clients are connected when doing an update
4560
- return this.share();
4716
+ return this.requestScreenShareFloor();
4561
4717
  }
4562
4718
 
4563
4719
  return Promise.resolve();
@@ -4574,7 +4730,7 @@ export default class Meeting extends StatelessWebexPlugin {
4574
4730
  * @public
4575
4731
  * @memberof Meeting
4576
4732
  */
4577
- async updateAudio(options) {
4733
+ public async updateAudio(options: { sendAudio: boolean; receiveAudio: boolean; stream: MediaStream }) {
4578
4734
  if (!this.canUpdateMedia()) {
4579
4735
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.AUDIO, options);
4580
4736
  }
@@ -4650,7 +4806,7 @@ export default class Meeting extends StatelessWebexPlugin {
4650
4806
  * @public
4651
4807
  * @memberof Meeting
4652
4808
  */
4653
- updateVideo(options) {
4809
+ public updateVideo(options: { sendVideo: boolean; receiveVideo: boolean; stream: MediaStream }) {
4654
4810
  if (!this.canUpdateMedia()) {
4655
4811
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.VIDEO, options);
4656
4812
  }
@@ -4698,7 +4854,7 @@ export default class Meeting extends StatelessWebexPlugin {
4698
4854
  * @private
4699
4855
  * @memberof Meeting
4700
4856
  */
4701
- checkForStopShare(sendShare, previousShareStatus) {
4857
+ private checkForStopShare(sendShare: boolean, previousShareStatus: boolean) {
4702
4858
  if (sendShare && !previousShareStatus) {
4703
4859
  // When user starts sharing
4704
4860
  return Promise.resolve(true);
@@ -4706,7 +4862,7 @@ export default class Meeting extends StatelessWebexPlugin {
4706
4862
 
4707
4863
  if (!sendShare && previousShareStatus) {
4708
4864
  // When user stops sharing
4709
- return this.stopFloorRequest()
4865
+ return this.releaseScreenShareFloor()
4710
4866
  .then(() => Promise.resolve(false));
4711
4867
  }
4712
4868
 
@@ -4722,7 +4878,7 @@ export default class Meeting extends StatelessWebexPlugin {
4722
4878
  * @public
4723
4879
  * @memberof Meeting
4724
4880
  */
4725
- updateShare(options) {
4881
+ public updateShare(options: { sendShare?: boolean; receiveShare?: boolean, stream?: any, skipSignalingCheck?: boolean }) {
4726
4882
  if (!options.skipSignalingCheck && !this.canUpdateMedia()) {
4727
4883
  return this.enqueueMediaUpdate(MEDIA_UPDATE_TYPE.SHARE, options);
4728
4884
  }
@@ -4758,7 +4914,7 @@ export default class Meeting extends StatelessWebexPlugin {
4758
4914
  })
4759
4915
  .then(() => {
4760
4916
  if (startShare) {
4761
- return this.share();
4917
+ return this.requestScreenShareFloor();
4762
4918
  }
4763
4919
 
4764
4920
  return Promise.resolve();
@@ -4768,7 +4924,7 @@ export default class Meeting extends StatelessWebexPlugin {
4768
4924
  this.mediaProperties.mediaDirection.receiveShare = receiveShare;
4769
4925
  })
4770
4926
  .catch((error) => {
4771
- this.unsetLocalShareTrack(stream);
4927
+ this.unsetLocalShareTrack();
4772
4928
  throw error;
4773
4929
  })
4774
4930
  .finally(() => {
@@ -4798,9 +4954,10 @@ export default class Meeting extends StatelessWebexPlugin {
4798
4954
  * @private
4799
4955
  * @memberof Meeting
4800
4956
  */
4801
- preMedia(localStream, localShare, mediaSettings) {
4957
+ private preMedia(localStream: MediaStream, localShare: MediaStream, mediaSettings: any) {
4802
4958
  // eslint-disable-next-line no-warning-comments
4803
4959
  // TODO wire into default config. There's currently an issue with the stateless plugin or how we register
4960
+ // @ts-ignore - config coming from registerPlugin
4804
4961
  this.mediaProperties.setMediaDirection(Object.assign(this.config.mediaSettings, mediaSettings));
4805
4962
  // add a setup a function move the create and setup media in future
4806
4963
  // TODO: delete old audio and video if stale
@@ -4818,7 +4975,7 @@ export default class Meeting extends StatelessWebexPlugin {
4818
4975
  * @public
4819
4976
  * @memberof Meeting
4820
4977
  */
4821
- acknowledge(type) {
4978
+ public acknowledge(type: string) {
4822
4979
  if (!type) {
4823
4980
  return Promise.reject(new ParameterError('Type must be set to acknowledge the meeting.'));
4824
4981
  }
@@ -4853,7 +5010,7 @@ export default class Meeting extends StatelessWebexPlugin {
4853
5010
  * @public
4854
5011
  * @memberof Meeting
4855
5012
  */
4856
- decline(reason) {
5013
+ public decline(reason: string) {
4857
5014
  return MeetingUtil.declineMeeting(this, reason).then((decline) => {
4858
5015
  this.meetingFiniteStateMachine.decline();
4859
5016
 
@@ -4873,7 +5030,7 @@ export default class Meeting extends StatelessWebexPlugin {
4873
5030
  * @public
4874
5031
  * @memberof Meeting
4875
5032
  */
4876
- leave(options = {}) {
5033
+ public leave(options: { resourceId?: string, reason?: any } = {} as any) {
4877
5034
  Metrics.postEvent({event: eventType.LEAVE, meeting: this, data: {trigger: trigger.USER_INTERACTION, canProceed: false}});
4878
5035
  const leaveReason = options.reason || MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST;
4879
5036
 
@@ -4950,7 +5107,7 @@ export default class Meeting extends StatelessWebexPlugin {
4950
5107
  * @public
4951
5108
  * @memberof Meeting
4952
5109
  */
4953
- startWhiteboardShare(channelUrl, resourceToken) {
5110
+ public startWhiteboardShare(channelUrl: string, resourceToken: string) {
4954
5111
  const whiteboard = this.locusInfo.mediaShares.find((element) => element.name === 'whiteboard');
4955
5112
 
4956
5113
  if (!channelUrl) {
@@ -4960,7 +5117,7 @@ export default class Meeting extends StatelessWebexPlugin {
4960
5117
  if (whiteboard) {
4961
5118
  Metrics.postEvent({event: eventType.WHITEBOARD_SHARE_INITIATED, meeting: this});
4962
5119
 
4963
- const body = {
5120
+ const body: any = {
4964
5121
  disposition: FLOOR_ACTION.GRANTED,
4965
5122
  personUrl: this.locusInfo.self.url,
4966
5123
  deviceUrl: this.deviceUrl,
@@ -5006,7 +5163,7 @@ export default class Meeting extends StatelessWebexPlugin {
5006
5163
  * @public
5007
5164
  * @memberof Meeting
5008
5165
  */
5009
- stopWhiteboardShare(channelUrl) {
5166
+ public stopWhiteboardShare(channelUrl: string) {
5010
5167
  const whiteboard = this.locusInfo.mediaShares.find((element) => element.name === 'whiteboard');
5011
5168
 
5012
5169
  if (whiteboard) {
@@ -5022,6 +5179,7 @@ export default class Meeting extends StatelessWebexPlugin {
5022
5179
  LoggerProxy.logger.error('Meeting:index#stopWhiteboardShare --> Error ', error);
5023
5180
 
5024
5181
  Metrics.sendBehavioralMetric(
5182
+ // @ts-ignore - check if STOP_WHITEBOARD_SHARE_FAILURE exists
5025
5183
  BEHAVIORAL_METRICS.STOP_WHITEBOARD_SHARE_FAILURE,
5026
5184
  {
5027
5185
  correlation_id: this.correlationId,
@@ -5042,12 +5200,12 @@ export default class Meeting extends StatelessWebexPlugin {
5042
5200
  }
5043
5201
 
5044
5202
  /**
5045
- * Start sharing content with server
5203
+ * Sends a request to Locus to obtain the screen share floor
5046
5204
  * @returns {Promise} see #meetingRequest.changeMeetingFloor
5047
5205
  * @private
5048
5206
  * @memberof Meeting
5049
5207
  */
5050
- share() {
5208
+ private requestScreenShareFloor() {
5051
5209
  const content = this.locusInfo.mediaShares.find((element) => element.name === CONTENT);
5052
5210
 
5053
5211
  if (content && (this.shareStatus !== SHARE_STATUS.LOCAL_SHARE_ACTIVE)) {
@@ -5093,7 +5251,7 @@ export default class Meeting extends StatelessWebexPlugin {
5093
5251
  */
5094
5252
  // Internal only, temporarily allows optional params
5095
5253
  // eslint-disable-next-line valid-jsdoc
5096
- stopShare(options = {}) {
5254
+ public stopShare(options = {}) {
5097
5255
  return this.updateShare({
5098
5256
  sendShare: false,
5099
5257
  receiveShare: this.mediaProperties.mediaDirection.receiveShare,
@@ -5102,12 +5260,12 @@ export default class Meeting extends StatelessWebexPlugin {
5102
5260
  }
5103
5261
 
5104
5262
  /**
5105
- * sends stops floor request
5263
+ * Sends a request to Locus to release the screen share floor.
5106
5264
  * @returns {Promise} see #meetingRequest.changeMeetingFloor
5107
5265
  * @private
5108
5266
  * @memberof Meeting
5109
5267
  */
5110
- stopFloorRequest() {
5268
+ private releaseScreenShareFloor() {
5111
5269
  const content = this.locusInfo.mediaShares.find((element) => element.name === CONTENT);
5112
5270
 
5113
5271
  if (content && (this.mediaProperties.mediaDirection.sendShare)) {
@@ -5129,7 +5287,7 @@ export default class Meeting extends StatelessWebexPlugin {
5129
5287
  resourceUrl: this.resourceUrl
5130
5288
  })
5131
5289
  .catch((error) => {
5132
- LoggerProxy.logger.error('Meeting:index#stopFloorRequest --> Error ', error);
5290
+ LoggerProxy.logger.error('Meeting:index#releaseScreenShareFloor --> Error ', error);
5133
5291
 
5134
5292
  Metrics.sendBehavioralMetric(
5135
5293
  BEHAVIORAL_METRICS.STOP_FLOOR_REQUEST_FAILURE,
@@ -5157,7 +5315,7 @@ export default class Meeting extends StatelessWebexPlugin {
5157
5315
  * @public
5158
5316
  * @memberof Meeting
5159
5317
  */
5160
- startRecording() {
5318
+ public startRecording() {
5161
5319
  return MeetingUtil.startRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5162
5320
  }
5163
5321
 
@@ -5167,7 +5325,7 @@ export default class Meeting extends StatelessWebexPlugin {
5167
5325
  * @public
5168
5326
  * @memberof Meeting
5169
5327
  */
5170
- stopRecording() {
5328
+ public stopRecording() {
5171
5329
  return MeetingUtil.stopRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5172
5330
  }
5173
5331
 
@@ -5177,7 +5335,7 @@ export default class Meeting extends StatelessWebexPlugin {
5177
5335
  * @public
5178
5336
  * @memberof Meeting
5179
5337
  */
5180
- pauseRecording() {
5338
+ public pauseRecording() {
5181
5339
  return MeetingUtil.pauseRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5182
5340
  }
5183
5341
 
@@ -5187,7 +5345,7 @@ export default class Meeting extends StatelessWebexPlugin {
5187
5345
  * @public
5188
5346
  * @memberof Meeting
5189
5347
  */
5190
- resumeRecording() {
5348
+ public resumeRecording() {
5191
5349
  return MeetingUtil.resumeRecording(this.meetingRequest, this.locusUrl, this.locusInfo);
5192
5350
  }
5193
5351
 
@@ -5197,7 +5355,7 @@ export default class Meeting extends StatelessWebexPlugin {
5197
5355
  * @public
5198
5356
  * @memberof Meeting
5199
5357
  */
5200
- lockMeeting() {
5358
+ public lockMeeting() {
5201
5359
  return MeetingUtil.lockMeeting(this.inMeetingActions, this.meetingRequest, this.locusUrl);
5202
5360
  }
5203
5361
 
@@ -5207,7 +5365,7 @@ export default class Meeting extends StatelessWebexPlugin {
5207
5365
  * @public
5208
5366
  * @memberof Meeting
5209
5367
  */
5210
- unlockMeeting() {
5368
+ public unlockMeeting() {
5211
5369
  return MeetingUtil.unlockMeeting(this.inMeetingActions, this.meetingRequest, this.locusUrl);
5212
5370
  }
5213
5371
 
@@ -5218,7 +5376,7 @@ export default class Meeting extends StatelessWebexPlugin {
5218
5376
  * @private
5219
5377
  * @memberof Meeting
5220
5378
  */
5221
- rejectWithErrorLog(message) {
5379
+ private rejectWithErrorLog(message: string) {
5222
5380
  LoggerProxy.logger.error(message);
5223
5381
 
5224
5382
  return Promise.reject(new Error(message));
@@ -5231,7 +5389,7 @@ export default class Meeting extends StatelessWebexPlugin {
5231
5389
  * @public
5232
5390
  * @memberof Meeting
5233
5391
  */
5234
- sendDTMF(tones) {
5392
+ public sendDTMF(tones: string) {
5235
5393
  if (this.locusInfo && this.locusInfo.self) {
5236
5394
  if (this.locusInfo.self.enableDTMF) {
5237
5395
  return this.meetingRequest
@@ -5262,7 +5420,19 @@ export default class Meeting extends StatelessWebexPlugin {
5262
5420
  * @public
5263
5421
  * @memberof Meeting
5264
5422
  */
5265
- changeVideoLayout(layoutType, renderInfo = {}) {
5423
+ public changeVideoLayout(
5424
+ layoutType?: string,
5425
+ renderInfo: {
5426
+ main: {
5427
+ width: number;
5428
+ height: number;
5429
+ };
5430
+ content: {
5431
+ width: number;
5432
+ height: number;
5433
+ };
5434
+ } = {} as any
5435
+ ) {
5266
5436
  const {main, content} = renderInfo;
5267
5437
  const {mediaDirection, remoteShare, remoteVideoTrack} = this.mediaProperties;
5268
5438
 
@@ -5358,7 +5528,7 @@ export default class Meeting extends StatelessWebexPlugin {
5358
5528
  * @param {String} level {LOW|MEDIUM|HIGH}
5359
5529
  * @returns {Promise<MediaStream>} localStream
5360
5530
  */
5361
- setLocalVideoQuality(level) {
5531
+ setLocalVideoQuality(level: string) {
5362
5532
  LoggerProxy.logger.log(`Meeting:index#setLocalVideoQuality --> Setting quality to ${level}`);
5363
5533
 
5364
5534
  if (!VIDEO_RESOLUTIONS[level]) {
@@ -5408,7 +5578,7 @@ export default class Meeting extends StatelessWebexPlugin {
5408
5578
  * @param {String} level {LOW|MEDIUM|HIGH}
5409
5579
  * @returns {Promise}
5410
5580
  */
5411
- setRemoteQualityLevel(level) {
5581
+ setRemoteQualityLevel(level: string) {
5412
5582
  LoggerProxy.logger.log(`Meeting:index#setRemoteQualityLevel --> Setting quality to ${level}`);
5413
5583
 
5414
5584
  if (!QUALITY_LEVELS[level]) {
@@ -5438,7 +5608,7 @@ export default class Meeting extends StatelessWebexPlugin {
5438
5608
  * @returns {Promise}
5439
5609
  * @deprecated After FHD support
5440
5610
  */
5441
- setMeetingQuality(level) {
5611
+ setMeetingQuality(level: string) {
5442
5612
  LoggerProxy.logger.log(`Meeting:index#setMeetingQuality --> Setting quality to ${level}`);
5443
5613
 
5444
5614
  if (!QUALITY_LEVELS[level]) {
@@ -5502,7 +5672,13 @@ export default class Meeting extends StatelessWebexPlugin {
5502
5672
  * @param {Boolean} options.sharePreferences.highFrameRate if shareConstraints isn't provided, set default values based off of this boolean
5503
5673
  * @returns {Promise}
5504
5674
  */
5505
- shareScreen(options = {}) {
5675
+ shareScreen(
5676
+ options: {
5677
+ sendAudio: boolean;
5678
+ sendShare: boolean;
5679
+ sharePreferences: { shareConstraints: MediaTrackConstraints };
5680
+ } = {} as any
5681
+ ) {
5506
5682
  LoggerProxy.logger.log('Meeting:index#shareScreen --> Getting local share');
5507
5683
 
5508
5684
  const shareConstraints = {
@@ -5511,6 +5687,7 @@ export default class Meeting extends StatelessWebexPlugin {
5511
5687
  ...options
5512
5688
  };
5513
5689
 
5690
+ // @ts-ignore - config coming from registerPlugin
5514
5691
  return Media.getDisplayMedia(shareConstraints, this.config)
5515
5692
  .then((shareStream) => this.updateShare({
5516
5693
  sendShare: true,
@@ -5548,7 +5725,7 @@ export default class Meeting extends StatelessWebexPlugin {
5548
5725
  * @param {MediaStream} localShare
5549
5726
  * @returns {undefined}
5550
5727
  */
5551
- handleShareTrackEnded(localShare) {
5728
+ private handleShareTrackEnded(localShare: MediaStream) {
5552
5729
  if (this.wirelessShare) {
5553
5730
  this.leave({reason: MEETING_REMOVED_REASON.USER_ENDED_SHARE_STREAMS});
5554
5731
  }
@@ -5588,7 +5765,7 @@ export default class Meeting extends StatelessWebexPlugin {
5588
5765
  * @private
5589
5766
  * @memberof Meeting
5590
5767
  */
5591
- sendNetworkQualityEvent(res) {
5768
+ private sendNetworkQualityEvent(res: any) {
5592
5769
  Trigger.trigger(
5593
5770
  this,
5594
5771
  {
@@ -5610,7 +5787,7 @@ export default class Meeting extends StatelessWebexPlugin {
5610
5787
  * @private
5611
5788
  * @returns {undefined}
5612
5789
  */
5613
- handleMediaLogging({audioTrack, videoTrack}) {
5790
+ private handleMediaLogging({ audioTrack, videoTrack }: any) {
5614
5791
  MeetingUtil.handleVideoLogging(videoTrack);
5615
5792
  MeetingUtil.handleAudioLogging(audioTrack);
5616
5793
  }
@@ -5619,7 +5796,7 @@ export default class Meeting extends StatelessWebexPlugin {
5619
5796
  * @param {string} typeMedia 'audio' or 'video'
5620
5797
  * @returns {undefined}
5621
5798
  */
5622
- setStartSetupDelay(typeMedia) {
5799
+ setStartSetupDelay(typeMedia: string) {
5623
5800
  this[`startSetupDelay${typeMedia}`] = performance.now();
5624
5801
  this[`endSetupDelay${typeMedia}`] = undefined;
5625
5802
  }
@@ -5628,7 +5805,7 @@ export default class Meeting extends StatelessWebexPlugin {
5628
5805
  * @param {string} typeMedia 'audio' or 'video'
5629
5806
  * @returns {undefined}
5630
5807
  */
5631
- setEndSetupDelay(typeMedia) {
5808
+ setEndSetupDelay(typeMedia: string) {
5632
5809
  this[`endSetupDelay${typeMedia}`] = performance.now();
5633
5810
  }
5634
5811
 
@@ -5636,7 +5813,7 @@ export default class Meeting extends StatelessWebexPlugin {
5636
5813
  * @param {string} typeMedia 'audio' or 'video'
5637
5814
  * @returns {string} duration between start and end of setup
5638
5815
  */
5639
- getSetupDelayDuration(typeMedia) {
5816
+ getSetupDelayDuration(typeMedia: string) {
5640
5817
  const start = this[`startSetupDelay${typeMedia}`];
5641
5818
  const end = this[`endSetupDelay${typeMedia}`];
5642
5819
 
@@ -5647,7 +5824,7 @@ export default class Meeting extends StatelessWebexPlugin {
5647
5824
  * @param {string} typeMedia 'audio' or 'video'
5648
5825
  * @returns {undefined}
5649
5826
  */
5650
- setStartSendingMediaDelay(typeMedia) {
5827
+ setStartSendingMediaDelay(typeMedia: string) {
5651
5828
  this[`startSendingMediaDelay${typeMedia}`] = performance.now();
5652
5829
  this[`endSendingMediaDelay${typeMedia}`] = undefined;
5653
5830
  }
@@ -5656,7 +5833,7 @@ export default class Meeting extends StatelessWebexPlugin {
5656
5833
  * @param {string} typeMedia 'audio' or 'video'
5657
5834
  * @returns {undefined}
5658
5835
  */
5659
- setEndSendingMediaDelay(typeMedia) {
5836
+ setEndSendingMediaDelay(typeMedia: string) {
5660
5837
  this[`endSendingMediaDelay${typeMedia}`] = performance.now();
5661
5838
  }
5662
5839
 
@@ -5664,7 +5841,7 @@ export default class Meeting extends StatelessWebexPlugin {
5664
5841
  * @param {string} typeMedia 'audio' or 'video'
5665
5842
  * @returns {string} duration between join response and first media tx
5666
5843
  */
5667
- getSendingMediaDelayDuration(typeMedia) {
5844
+ getSendingMediaDelayDuration(typeMedia: string) {
5668
5845
  const start = this[`startSendingMediaDelay${typeMedia}`];
5669
5846
  const end = this[`endSendingMediaDelay${typeMedia}`];
5670
5847
 
@@ -5675,7 +5852,7 @@ export default class Meeting extends StatelessWebexPlugin {
5675
5852
  *
5676
5853
  * @returns {undefined}
5677
5854
  */
5678
- setStartLocalSDPGenRemoteSDPRecvDelay() {
5855
+ setStartLocalSDPGenRemoteSDPRecvDelay() {
5679
5856
  if (!this.startLocalSDPGenRemoteSDPRecvDelay) {
5680
5857
  this.startLocalSDPGenRemoteSDPRecvDelay = performance.now();
5681
5858
  this.endLocalSDPGenRemoteSDPRecvDelay = undefined;
@@ -5801,7 +5978,7 @@ export default class Meeting extends StatelessWebexPlugin {
5801
5978
  * @public
5802
5979
  * @memberof Meeting
5803
5980
  */
5804
- endMeetingForAll() {
5981
+ public endMeetingForAll() {
5805
5982
  Metrics.postEvent({event: eventType.LEAVE, meeting: this, data: {trigger: trigger.USER_INTERACTION, canProceed: false}});
5806
5983
 
5807
5984
  LoggerProxy.logger.log('Meeting:index#endMeetingForAll --> End meeting for All');
@@ -5886,7 +6063,7 @@ export default class Meeting extends StatelessWebexPlugin {
5886
6063
  * @public
5887
6064
  * @memberof Meeting
5888
6065
  */
5889
- isBnrEnabled() {
6066
+ public isBnrEnabled() {
5890
6067
  return this.effects && this.effects.isBnrEnabled();
5891
6068
  }
5892
6069
 
@@ -5897,7 +6074,7 @@ export default class Meeting extends StatelessWebexPlugin {
5897
6074
  * @param {MedaiStreamTrack} audioTrack from updateAudio
5898
6075
  * @memberof Meeting
5899
6076
  */
5900
- async internal_enableBNR(audioTrack) {
6077
+ private async internal_enableBNR(audioTrack: any) {
5901
6078
  try {
5902
6079
  LoggerProxy.logger.info('Meeting:index#internal_enableBNR. Internal enable BNR called');
5903
6080
  const bnrAudioTrack = await WebRTCMedia.Effects.BNR.enableBNR(audioTrack);
@@ -5918,7 +6095,7 @@ export default class Meeting extends StatelessWebexPlugin {
5918
6095
  * @public
5919
6096
  * @memberof Meeting
5920
6097
  */
5921
- enableBNR() {
6098
+ public enableBNR() {
5922
6099
  if (typeof this.mediaProperties === 'undefined' || typeof this.mediaProperties.audioTrack === 'undefined') {
5923
6100
  return Promise.reject(new Error("Meeting doesn't have an audioTrack attached"));
5924
6101
  }
@@ -5953,7 +6130,7 @@ export default class Meeting extends StatelessWebexPlugin {
5953
6130
  * @public
5954
6131
  * @memberof Meeting
5955
6132
  */
5956
- disableBNR() {
6133
+ public disableBNR() {
5957
6134
  if (typeof this.mediaProperties === 'undefined' || typeof this.mediaProperties.audioTrack === 'undefined') {
5958
6135
  return Promise.reject(new Error("Meeting doesn't have an audioTrack attached"));
5959
6136
  }
@@ -6036,4 +6213,35 @@ export default class Meeting extends StatelessWebexPlugin {
6036
6213
  clearInterval(this.keepAliveTimerId);
6037
6214
  this.keepAliveTimerId = null;
6038
6215
  };
6216
+
6217
+ /**
6218
+ * Send a reaction inside the meeting.
6219
+ *
6220
+ * @param {ReactionType} reactionType - type of reaction to be sent. Example: "thumbs_up"
6221
+ * @param {SkinToneType} skinToneType - skin tone for the reaction. Example: "medium_dark"
6222
+ * @returns {Promise}
6223
+ * @public
6224
+ * @memberof Meeting
6225
+ */
6226
+ public sendReaction(reactionType: ReactionType, skinToneType?: SkinToneType) {
6227
+ const reactionChannelUrl = this.locusInfo?.controls?.reactions?.reactionChannelUrl as string;
6228
+ const participantId = this.members.selfId;
6229
+
6230
+ const reactionData = Reactions[reactionType];
6231
+
6232
+ if (!reactionData) {
6233
+ return Promise.reject(new Error(`${reactionType} is not a valid reaction.`));
6234
+ }
6235
+ const skinToneData = SkinTones[skinToneType] || SkinTones.normal;
6236
+ const reaction: Reaction = {
6237
+ ...reactionData,
6238
+ tone: skinToneData
6239
+ };
6240
+
6241
+ if (reactionChannelUrl) {
6242
+ return this.meetingRequest.sendReaction({reactionChannelUrl, reaction, participantId});
6243
+ }
6244
+
6245
+ return Promise.reject(new Error('Error sending reaction, service url not found.'));
6246
+ }
6039
6247
  }