@webex/plugin-meetings 3.12.0-next.121 → 3.12.0-next.123
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/aiEnableRequest/index.js +1 -1
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +10 -2
- package/dist/breakouts/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +9 -7
- package/dist/locus-info/index.js.map +1 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +1 -1
- package/src/breakouts/index.ts +12 -1
- package/src/locus-info/index.ts +1 -0
- package/test/unit/spec/breakouts/index.ts +32 -1
- package/test/unit/spec/locus-info/index.js +28 -0
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
package/src/breakouts/index.ts
CHANGED
|
@@ -158,6 +158,8 @@ const Breakouts = WebexPlugin.extend({
|
|
|
158
158
|
this.listenToCurrentSessionTypeChange();
|
|
159
159
|
this.listenToBreakoutRosters();
|
|
160
160
|
this.listenToBreakoutHelp();
|
|
161
|
+
// LLM may connect after locusUrlUpdate has already run, so re-check the broadcast subscription on connect
|
|
162
|
+
this.listenTo(this.webex.internal.llm, 'online', () => this.listenToBroadcastMessages());
|
|
161
163
|
// @ts-ignore
|
|
162
164
|
this.breakoutRequest = new BreakoutRequest({webex: this.webex});
|
|
163
165
|
},
|
|
@@ -264,7 +266,16 @@ const Breakouts = WebexPlugin.extend({
|
|
|
264
266
|
* @returns {void}
|
|
265
267
|
*/
|
|
266
268
|
listenToBroadcastMessages() {
|
|
267
|
-
|
|
269
|
+
// Only subscribe when the connected LLM session belongs to this meeting's locus. locusUrl is
|
|
270
|
+
// populated before the socket emits 'online', so it is reliable even on the first connection
|
|
271
|
+
// where the owner meeting id has not been tagged yet.
|
|
272
|
+
const isLLMForThisMeeting = this.webex.internal.llm.getLocusUrl() === this.locusUrl;
|
|
273
|
+
|
|
274
|
+
if (
|
|
275
|
+
!this.webex.internal.llm.isConnected() ||
|
|
276
|
+
!isLLMForThisMeeting ||
|
|
277
|
+
this.hasSubscribedToMessage
|
|
278
|
+
) {
|
|
268
279
|
return;
|
|
269
280
|
}
|
|
270
281
|
|
package/src/locus-info/index.ts
CHANGED
|
@@ -88,6 +88,7 @@ describe('plugin-meetings', () => {
|
|
|
88
88
|
webex = new MockWebex({});
|
|
89
89
|
webex.internal.llm.on = sinon.stub();
|
|
90
90
|
webex.internal.llm.isConnected = sinon.stub();
|
|
91
|
+
webex.internal.llm.getLocusUrl = sinon.stub().returns('newUrl');
|
|
91
92
|
webex.internal.mercury.on = sinon.stub();
|
|
92
93
|
breakouts = new Breakouts({}, {parent: webex});
|
|
93
94
|
breakouts.groupId = 'groupId';
|
|
@@ -649,6 +650,15 @@ describe('plugin-meetings', () => {
|
|
|
649
650
|
assert.notCalled(breakouts.listenTo);
|
|
650
651
|
});
|
|
651
652
|
|
|
653
|
+
it('do not subscribe message if the connected llm does not belong to this meeting', () => {
|
|
654
|
+
webex.internal.llm.isConnected = sinon.stub().returns(true);
|
|
655
|
+
webex.internal.llm.getLocusUrl = sinon.stub().returns('anotherMeetingLocusUrl');
|
|
656
|
+
breakouts.listenTo = sinon.stub();
|
|
657
|
+
breakouts.locusUrlUpdate('newUrl');
|
|
658
|
+
assert.equal(breakouts.locusUrl, 'newUrl');
|
|
659
|
+
assert.notCalled(breakouts.listenTo);
|
|
660
|
+
});
|
|
661
|
+
|
|
652
662
|
it('do not subscribe message if already done', () => {
|
|
653
663
|
webex.internal.llm.isConnected = sinon.stub().returns(true);
|
|
654
664
|
breakouts.hasSubscribedToMessage = true;
|
|
@@ -661,7 +671,9 @@ describe('plugin-meetings', () => {
|
|
|
661
671
|
it('triggers message event when a message received', () => {
|
|
662
672
|
webex.internal.llm.isConnected = sinon.stub().returns(true);
|
|
663
673
|
breakouts.locusUrlUpdate('newUrl');
|
|
664
|
-
const call = webex.internal.llm.on
|
|
674
|
+
const call = webex.internal.llm.on
|
|
675
|
+
.getCalls()
|
|
676
|
+
.find((c) => c.args[0] === 'event:breakout.message');
|
|
665
677
|
const callback = call.args[1];
|
|
666
678
|
|
|
667
679
|
assert.equal(call.args[0], 'event:breakout.message');
|
|
@@ -689,6 +701,25 @@ describe('plugin-meetings', () => {
|
|
|
689
701
|
sessionId: 'sessionId',
|
|
690
702
|
});
|
|
691
703
|
});
|
|
704
|
+
|
|
705
|
+
it('re-checks the subscription when the llm emits online', () => {
|
|
706
|
+
const onlineCall = webex.internal.llm.on
|
|
707
|
+
.getCalls()
|
|
708
|
+
.find((c) => c.args[0] === 'online');
|
|
709
|
+
assert.exists(onlineCall, 'expected an online listener to be registered');
|
|
710
|
+
const onlineHandler = onlineCall.args[1];
|
|
711
|
+
|
|
712
|
+
webex.internal.llm.isConnected = sinon.stub().returns(true);
|
|
713
|
+
webex.internal.llm.getLocusUrl = sinon.stub().returns(breakouts.locusUrl);
|
|
714
|
+
|
|
715
|
+
onlineHandler.call(breakouts);
|
|
716
|
+
|
|
717
|
+
const call = webex.internal.llm.on
|
|
718
|
+
.getCalls()
|
|
719
|
+
.find((c) => c.args[0] === 'event:breakout.message');
|
|
720
|
+
assert.exists(call, 'expected broadcast message subscription after online');
|
|
721
|
+
assert.isTrue(breakouts.hasSubscribedToMessage);
|
|
722
|
+
});
|
|
692
723
|
});
|
|
693
724
|
|
|
694
725
|
describe('#updateCanManageBreakouts', () => {
|
|
@@ -2448,6 +2448,7 @@ describe('plugin-meetings', () => {
|
|
|
2448
2448
|
|
|
2449
2449
|
selfWithLocalUnmuteRequired.controls.audio.muted = false;
|
|
2450
2450
|
selfWithLocalUnmuteRequired.controls.audio.localAudioUnmuteRequired = true;
|
|
2451
|
+
selfWithLocalUnmuteRequired.controls.audio.meta = {modifiedBy: 'host-uuid-123'};
|
|
2451
2452
|
|
|
2452
2453
|
locusInfo.emitScoped = sinon.stub();
|
|
2453
2454
|
locusInfo.updateSelf(selfWithLocalUnmuteRequired);
|
|
@@ -2462,6 +2463,33 @@ describe('plugin-meetings', () => {
|
|
|
2462
2463
|
{
|
|
2463
2464
|
muted: false,
|
|
2464
2465
|
unmuteAllowed: true,
|
|
2466
|
+
modifiedBy: 'host-uuid-123',
|
|
2467
|
+
}
|
|
2468
|
+
);
|
|
2469
|
+
});
|
|
2470
|
+
|
|
2471
|
+
it('should set modifiedBy to null on LOCAL_UNMUTE_REQUIRED when it is unavailable', () => {
|
|
2472
|
+
locusInfo.webex.internal.device.url = self.deviceUrl;
|
|
2473
|
+
locusInfo.updateSelf(self);
|
|
2474
|
+
const selfWithLocalUnmuteRequired = cloneDeep(self);
|
|
2475
|
+
|
|
2476
|
+
selfWithLocalUnmuteRequired.controls.audio.muted = false;
|
|
2477
|
+
selfWithLocalUnmuteRequired.controls.audio.localAudioUnmuteRequired = true;
|
|
2478
|
+
|
|
2479
|
+
locusInfo.emitScoped = sinon.stub();
|
|
2480
|
+
locusInfo.updateSelf(selfWithLocalUnmuteRequired);
|
|
2481
|
+
|
|
2482
|
+
assert.calledWith(
|
|
2483
|
+
locusInfo.emitScoped,
|
|
2484
|
+
{
|
|
2485
|
+
file: 'locus-info',
|
|
2486
|
+
function: 'updateSelf',
|
|
2487
|
+
},
|
|
2488
|
+
LOCUSINFO.EVENTS.LOCAL_UNMUTE_REQUIRED,
|
|
2489
|
+
{
|
|
2490
|
+
muted: false,
|
|
2491
|
+
unmuteAllowed: true,
|
|
2492
|
+
modifiedBy: null,
|
|
2465
2493
|
}
|
|
2466
2494
|
);
|
|
2467
2495
|
});
|