@webex/plugin-meetings 3.7.0-next.42 → 3.7.0-next.44
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/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +2 -1
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +1 -1
- package/dist/locus-info/index.js.map +1 -1
- package/dist/meetings/index.js +7 -5
- package/dist/meetings/index.js.map +1 -1
- package/dist/types/constants.d.ts +1 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/constants.ts +1 -0
- package/src/locus-info/index.ts +3 -1
- package/src/meetings/index.ts +6 -3
- package/test/unit/spec/locus-info/index.js +70 -60
- package/test/unit/spec/meetings/index.js +11 -11
package/src/locus-info/index.ts
CHANGED
|
@@ -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);
|
package/src/meetings/index.ts
CHANGED
|
@@ -856,9 +856,12 @@ export default class Meetings extends WebexPlugin {
|
|
|
856
856
|
);
|
|
857
857
|
}),
|
|
858
858
|
'deviceRegister'
|
|
859
|
-
).then(
|
|
860
|
-
|
|
861
|
-
|
|
859
|
+
).then(() =>
|
|
860
|
+
this.executeRegistrationStep(
|
|
861
|
+
// @ts-ignore
|
|
862
|
+
() => this.webex.internal.mercury.connect(),
|
|
863
|
+
'mercuryConnect'
|
|
864
|
+
)
|
|
862
865
|
),
|
|
863
866
|
this.executeRegistrationStep(
|
|
864
867
|
() => Promise.resolve(MeetingsUtil.checkH264Support.call(this)),
|
|
@@ -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: {
|
|
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: {
|
|
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
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
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
|
-
|
|
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
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
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
|
|
|
@@ -376,21 +376,21 @@ describe('plugin-meetings', () => {
|
|
|
376
376
|
assert.isTrue(webex.meetings.registered);
|
|
377
377
|
});
|
|
378
378
|
|
|
379
|
-
it('rejects when SDK canAuthorize is false', () => {
|
|
379
|
+
it('rejects when SDK canAuthorize is false', async () => {
|
|
380
380
|
webex.canAuthorize = false;
|
|
381
|
-
assert.isRejected(webex.meetings.register());
|
|
381
|
+
await assert.isRejected(webex.meetings.register());
|
|
382
382
|
});
|
|
383
383
|
|
|
384
|
-
it('rejects when device.register fails', () => {
|
|
384
|
+
it('rejects when device.register fails', async () => {
|
|
385
385
|
webex.canAuthorize = true;
|
|
386
386
|
webex.internal.device.register = sinon.stub().returns(Promise.reject());
|
|
387
|
-
assert.isRejected(webex.meetings.register());
|
|
387
|
+
await assert.isRejected(webex.meetings.register());
|
|
388
388
|
});
|
|
389
389
|
|
|
390
|
-
it('rejects when mercury.connect fails', () => {
|
|
390
|
+
it('rejects when mercury.connect fails', async () => {
|
|
391
391
|
webex.canAuthorize = true;
|
|
392
392
|
webex.internal.mercury.connect = sinon.stub().returns(Promise.reject());
|
|
393
|
-
assert.isRejected(webex.meetings.register());
|
|
393
|
+
await assert.isRejected(webex.meetings.register());
|
|
394
394
|
});
|
|
395
395
|
|
|
396
396
|
it('resolves immediately if already registered', async () => {
|
|
@@ -500,7 +500,7 @@ describe('plugin-meetings', () => {
|
|
|
500
500
|
checkH264Support: true,
|
|
501
501
|
});
|
|
502
502
|
|
|
503
|
-
await clock.tick(
|
|
503
|
+
await clock.tick(6000);
|
|
504
504
|
await webex.internal.mercury.connect;
|
|
505
505
|
assert.deepEqual(webex.meetings.registrationStatus, {
|
|
506
506
|
fetchWebexSite: true,
|
|
@@ -535,16 +535,16 @@ describe('plugin-meetings', () => {
|
|
|
535
535
|
});
|
|
536
536
|
});
|
|
537
537
|
|
|
538
|
-
it('rejects when device.unregister fails', () => {
|
|
538
|
+
it('rejects when device.unregister fails', async () => {
|
|
539
539
|
webex.meetings.registered = true;
|
|
540
540
|
webex.internal.device.unregister = sinon.stub().returns(Promise.reject());
|
|
541
|
-
assert.isRejected(webex.meetings.unregister());
|
|
541
|
+
await assert.isRejected(webex.meetings.unregister());
|
|
542
542
|
});
|
|
543
543
|
|
|
544
|
-
it('rejects when mercury.disconnect fails', () => {
|
|
544
|
+
it('rejects when mercury.disconnect fails', async () => {
|
|
545
545
|
webex.meetings.registered = true;
|
|
546
546
|
webex.internal.mercury.disconnect = sinon.stub().returns(Promise.reject());
|
|
547
|
-
assert.isRejected(webex.meetings.unregister());
|
|
547
|
+
await assert.isRejected(webex.meetings.unregister());
|
|
548
548
|
});
|
|
549
549
|
|
|
550
550
|
it('resolves immediately if not registered', (done) => {
|