@webex/plugin-meetings 3.7.0-next.43 → 3.7.0-next.45

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.
package/src/constants.ts CHANGED
@@ -104,6 +104,7 @@ export const _ON_HOLD_LOBBY_ = 'ON_HOLD_LOBBY';
104
104
  export const _MEETING_LINK_ = 'MEETING_LINK';
105
105
  export const _MEETING_UUID_ = 'MEETING_UUID';
106
106
  export const _MEETING_ = 'MEETING';
107
+ export const _SPACE_SHARE_ = 'SPACE_SHARE';
107
108
  export const _MEETING_CENTER_ = 'MEETING_CENTER';
108
109
  export const _MEETING_ID_ = 'MEETING_ID';
109
110
 
@@ -10,6 +10,7 @@ import {
10
10
  _SIP_BRIDGE_,
11
11
  MEETING_STATE,
12
12
  _MEETING_,
13
+ _SPACE_SHARE_,
13
14
  LOCUSINFO,
14
15
  LOCUS,
15
16
  _LEFT_,
@@ -489,7 +490,8 @@ export default class LocusInfo extends EventsScope {
489
490
  isMeetingActive() {
490
491
  if (
491
492
  this.parsedLocus.fullState.type === _CALL_ ||
492
- this.parsedLocus.fullState.type === _SIP_BRIDGE_
493
+ this.parsedLocus.fullState.type === _SIP_BRIDGE_ ||
494
+ this.parsedLocus.fullState.type === _SPACE_SHARE_
493
495
  ) {
494
496
  // @ts-ignore
495
497
  const partner = this.getLocusPartner(this.participants, this.self);
@@ -699,6 +699,20 @@ export default class Meetings extends WebexPlugin {
699
699
  });
700
700
  }
701
701
 
702
+ /**
703
+ * API to change log upload interval. Setting the factor to 0 will disable periodic log uploads.
704
+ *
705
+ * @param {number} factor new factor value
706
+ * @returns {void}
707
+ */
708
+ private _setLogUploadIntervalMultiplicationFactor(factor: number) {
709
+ if (typeof factor !== 'number') {
710
+ return;
711
+ }
712
+ // @ts-ignore
713
+ this.config.logUploadIntervalMultiplicationFactor = factor;
714
+ }
715
+
702
716
  /**
703
717
  * API to toggle unified meetings
704
718
  * @param {Boolean} changeState
@@ -1,6 +1,6 @@
1
1
  import 'jsdom-global/register';
2
2
  import sinon from 'sinon';
3
- import {cloneDeep} from 'lodash';
3
+ import {cloneDeep, forEach} from 'lodash';
4
4
  import {assert} from '@webex/test-helper-chai';
5
5
  import MockWebex from '@webex/test-helper-mock-webex';
6
6
  import testUtils from '../../../utils/testUtils';
@@ -23,6 +23,8 @@ import {
23
23
  LOCUS,
24
24
  MEETING_STATE,
25
25
  _MEETING_,
26
+ _SIP_BRIDGE_,
27
+ _SPACE_SHARE_,
26
28
  } from '../../../../src/constants';
27
29
 
28
30
  import {self, selfWithInactivity} from './selfConstant';
@@ -102,7 +104,11 @@ describe('plugin-meetings', () => {
102
104
  },
103
105
  entryExitTone: {enabled: true, mode: 'foo'},
104
106
  video: {enabled: true},
105
- videoLayout: {overrideDefault: true, lockAttendeeViewOnStageOnly:false, stageParameters: {}},
107
+ videoLayout: {
108
+ overrideDefault: true,
109
+ lockAttendeeViewOnStageOnly: false,
110
+ stageParameters: {},
111
+ },
106
112
  webcastControl: {streaming: false},
107
113
  practiceSession: {enabled: true},
108
114
  };
@@ -529,7 +535,7 @@ describe('plugin-meetings', () => {
529
535
  manualCaptionControl: {enabled: false},
530
536
  };
531
537
 
532
- locusInfo.updateControls({manualCaptionControl: { enabled: true, }});
538
+ locusInfo.updateControls({manualCaptionControl: {enabled: true}});
533
539
 
534
540
  assert.calledWith(
535
541
  locusInfo.emitScoped,
@@ -2636,65 +2642,69 @@ describe('plugin-meetings', () => {
2636
2642
  });
2637
2643
 
2638
2644
  describe('#isMeetingActive', () => {
2639
- it('sends client event correctly for state = inactive', () => {
2640
- locusInfo.parsedLocus = {
2641
- fullState: {
2642
- type: _CALL_,
2643
- },
2644
- };
2645
-
2646
- locusInfo.fullState = {
2647
- state: LOCUS.STATE.INACTIVE,
2648
- };
2649
-
2650
- locusInfo.isMeetingActive();
2651
-
2652
- assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
2653
- name: 'client.call.remote-ended',
2654
- options: {
2655
- meetingId: locusInfo.meetingId,
2656
- },
2657
- });
2658
- });
2659
-
2660
- it('sends client event correctly for state = PARTNER_LEFT', () => {
2661
- locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT});
2662
- locusInfo.parsedLocus = {
2663
- fullState: {
2664
- type: _CALL_,
2665
- },
2666
- self: {
2667
- state: MEETING_STATE.STATES.DECLINED,
2668
- },
2669
- };
2670
- locusInfo.isMeetingActive();
2671
-
2672
- assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
2673
- name: 'client.call.remote-ended',
2674
- options: {
2675
- meetingId: locusInfo.meetingId,
2676
- },
2677
- });
2678
- });
2679
-
2680
- it('sends client event correctly for state = SELF_LEFT', () => {
2681
- locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT});
2682
- locusInfo.parsedLocus = {
2683
- fullState: {
2684
- type: _CALL_,
2685
- },
2686
- self: {
2687
- state: MEETING_STATE.STATES.LEFT,
2688
- },
2689
- };
2645
+ forEach([_CALL_, _SIP_BRIDGE_, _SPACE_SHARE_], (type) => {
2646
+ describe(`type = ${type}`, () => {
2647
+ it('sends client event correctly for state = inactive', () => {
2648
+ locusInfo.parsedLocus = {
2649
+ fullState: {
2650
+ type: type,
2651
+ },
2652
+ };
2653
+
2654
+ locusInfo.fullState = {
2655
+ state: LOCUS.STATE.INACTIVE,
2656
+ };
2657
+
2658
+ locusInfo.isMeetingActive();
2659
+
2660
+ assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
2661
+ name: 'client.call.remote-ended',
2662
+ options: {
2663
+ meetingId: locusInfo.meetingId,
2664
+ },
2665
+ });
2666
+ });
2690
2667
 
2691
- locusInfo.isMeetingActive();
2668
+ it('sends client event correctly for state = PARTNER_LEFT', () => {
2669
+ locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT});
2670
+ locusInfo.parsedLocus = {
2671
+ fullState: {
2672
+ type: type,
2673
+ },
2674
+ self: {
2675
+ state: MEETING_STATE.STATES.DECLINED,
2676
+ },
2677
+ };
2678
+ locusInfo.isMeetingActive();
2679
+
2680
+ assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
2681
+ name: 'client.call.remote-ended',
2682
+ options: {
2683
+ meetingId: locusInfo.meetingId,
2684
+ },
2685
+ });
2686
+ });
2692
2687
 
2693
- assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
2694
- name: 'client.call.remote-ended',
2695
- options: {
2696
- meetingId: locusInfo.meetingId,
2697
- },
2688
+ it('sends client event correctly for state = SELF_LEFT', () => {
2689
+ locusInfo.getLocusPartner = sinon.stub().returns({state: MEETING_STATE.STATES.LEFT});
2690
+ locusInfo.parsedLocus = {
2691
+ fullState: {
2692
+ type: type,
2693
+ },
2694
+ self: {
2695
+ state: MEETING_STATE.STATES.LEFT,
2696
+ },
2697
+ };
2698
+
2699
+ locusInfo.isMeetingActive();
2700
+
2701
+ assert.calledWith(webex.internal.newMetrics.submitClientEvent, {
2702
+ name: 'client.call.remote-ended',
2703
+ options: {
2704
+ meetingId: locusInfo.meetingId,
2705
+ },
2706
+ });
2707
+ });
2698
2708
  });
2699
2709
  });
2700
2710
 
@@ -268,6 +268,33 @@ describe('plugin-meetings', () => {
268
268
  });
269
269
  });
270
270
 
271
+ describe('#_setLogUploadIntervalMultiplicationFactor', () => {
272
+ it('should have _setLogUploadIntervalMultiplicationFactor', () => {
273
+ assert.equal(typeof webex.meetings._setLogUploadIntervalMultiplicationFactor, 'function');
274
+ });
275
+
276
+ describe('success', () => {
277
+ it('should update the config', () => {
278
+ const someValue = 1.23;
279
+
280
+ webex.meetings._setLogUploadIntervalMultiplicationFactor(someValue);
281
+ assert.equal(webex.meetings.config.logUploadIntervalMultiplicationFactor, someValue);
282
+ });
283
+ });
284
+
285
+ describe('failure', () => {
286
+ it('should not accept non-number input', () => {
287
+ const logUploadIntervalMultiplicationFactor = webex.meetings.config.logUploadIntervalMultiplicationFactor;
288
+
289
+ webex.meetings._setLogUploadIntervalMultiplicationFactor('test');
290
+ assert.equal(
291
+ webex.meetings.config.logUploadIntervalMultiplicationFactor,
292
+ logUploadIntervalMultiplicationFactor
293
+ );
294
+ });
295
+ });
296
+ });
297
+
271
298
  describe('#_toggleUnifiedMeetings', () => {
272
299
  it('should have toggleUnifiedMeetings', () => {
273
300
  assert.equal(typeof webex.meetings._toggleUnifiedMeetings, 'function');