@webex/plugin-meetings 3.10.0-next.8 → 3.10.0-webex-services-ready.1
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/annotation/annotation.types.js.map +1 -1
- package/dist/annotation/constants.js.map +1 -1
- package/dist/annotation/index.js +19 -22
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +6 -6
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/collection.js.map +1 -1
- package/dist/breakouts/edit-lock-error.js +9 -11
- package/dist/breakouts/edit-lock-error.js.map +1 -1
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +126 -127
- package/dist/breakouts/index.js.map +1 -1
- package/dist/breakouts/request.js +6 -8
- package/dist/breakouts/request.js.map +1 -1
- package/dist/breakouts/utils.js.map +1 -1
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +1 -2
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +9 -11
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +10 -12
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-forbidden-error.js +10 -12
- package/dist/common/errors/join-forbidden-error.js.map +1 -1
- package/dist/common/errors/join-meeting.js +10 -12
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/join-webinar-error.js +9 -11
- package/dist/common/errors/join-webinar-error.js.map +1 -1
- package/dist/common/errors/media.js +9 -11
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/multistream-not-supported-error.js +9 -11
- package/dist/common/errors/multistream-not-supported-error.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +9 -11
- package/dist/common/errors/no-meeting-info.js.map +1 -1
- package/dist/common/errors/parameter.js +11 -14
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +9 -11
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -11
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +32 -38
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -1
- package/dist/common/errors/reconnection-not-started.js +5 -6
- package/dist/common/errors/reconnection-not-started.js.map +1 -1
- package/dist/common/errors/reconnection.js +9 -11
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +9 -11
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +20 -29
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +9 -12
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +9 -10
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +9 -10
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +17 -17
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +1 -2
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +0 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +11 -8
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +1 -2
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +1 -2
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +20 -0
- package/dist/hashTree/constants.js.map +1 -0
- package/dist/hashTree/hashTree.js +515 -0
- package/dist/hashTree/hashTree.js.map +1 -0
- package/dist/hashTree/hashTreeParser.js +1266 -0
- package/dist/hashTree/hashTreeParser.js.map +1 -0
- package/dist/hashTree/types.js +21 -0
- package/dist/hashTree/types.js.map +1 -0
- package/dist/hashTree/utils.js +48 -0
- package/dist/hashTree/utils.js.map +1 -0
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +6 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/locusRouteToken.js +6 -8
- package/dist/interceptors/locusRouteToken.js.map +1 -1
- package/dist/interpretation/collection.js.map +1 -1
- package/dist/interpretation/index.js +1 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/interpretation/siLanguage.js.map +1 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +551 -94
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +3 -4
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js +7 -0
- package/dist/locus-info/types.js.map +1 -0
- package/dist/media/MediaConnectionAwaiter.js +1 -2
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +0 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +15 -17
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js.map +1 -1
- package/dist/meeting/brbState.js +8 -9
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/connectionStateHandler.js +10 -13
- package/dist/meeting/connectionStateHandler.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1555 -1527
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +13 -17
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +11 -12
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +101 -104
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/type.js.map +1 -1
- package/dist/meeting/util.js +24 -23
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +3 -3
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/collection.js +7 -10
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +1 -2
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +135 -146
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +36 -37
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +30 -31
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +6 -8
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +179 -141
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +6 -8
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +25 -23
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +1 -2
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +6 -3
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +18 -21
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +8 -11
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +3 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +3 -4
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -2
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +34 -45
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +8 -9
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +12 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +1 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +122 -123
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +29 -30
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/personal-meeting-room/index.js +16 -19
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +7 -10
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +56 -373
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +203 -205
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -1
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/reachabilityPeerConnection.js +445 -0
- package/dist/reachability/reachabilityPeerConnection.js.map +1 -0
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/constants.js.map +1 -1
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +178 -176
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +1 -2
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +12 -15
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +24 -26
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +75 -76
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js.map +1 -1
- package/dist/transcription/index.js +4 -5
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/constants.d.ts +26 -21
- package/dist/types/hashTree/constants.d.ts +8 -0
- package/dist/types/hashTree/hashTree.d.ts +129 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +260 -0
- package/dist/types/hashTree/types.d.ts +25 -0
- package/dist/types/hashTree/utils.d.ts +9 -0
- package/dist/types/locus-info/index.d.ts +91 -42
- package/dist/types/locus-info/types.d.ts +46 -0
- package/dist/types/meeting/index.d.ts +22 -9
- package/dist/types/meetings/index.d.ts +9 -2
- package/dist/types/metrics/constants.d.ts +2 -0
- package/dist/types/reachability/clusterReachability.d.ts +10 -88
- package/dist/types/reachability/reachability.types.d.ts +12 -1
- package/dist/types/reachability/reachabilityPeerConnection.d.ts +111 -0
- package/dist/webinar/collection.js +1 -2
- package/dist/webinar/collection.js.map +1 -1
- package/dist/webinar/index.js +148 -158
- package/dist/webinar/index.js.map +1 -1
- package/package.json +22 -21
- package/src/constants.ts +13 -1
- package/src/hashTree/constants.ts +9 -0
- package/src/hashTree/hashTree.ts +463 -0
- package/src/hashTree/hashTreeParser.ts +1161 -0
- package/src/hashTree/types.ts +30 -0
- package/src/hashTree/utils.ts +42 -0
- package/src/locus-info/index.ts +556 -85
- package/src/locus-info/types.ts +48 -0
- package/src/meeting/index.ts +58 -26
- package/src/meeting/util.ts +1 -0
- package/src/meetings/index.ts +104 -51
- package/src/metrics/constants.ts +2 -0
- package/src/reachability/clusterReachability.ts +50 -347
- package/src/reachability/reachability.types.ts +15 -1
- package/src/reachability/reachabilityPeerConnection.ts +416 -0
- package/test/unit/spec/hashTree/hashTree.ts +655 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +1532 -0
- package/test/unit/spec/hashTree/utils.ts +103 -0
- package/test/unit/spec/locus-info/index.js +667 -1
- package/test/unit/spec/meeting/index.js +91 -20
- package/test/unit/spec/meeting/utils.js +77 -0
- package/test/unit/spec/meetings/index.js +71 -26
- package/test/unit/spec/reachability/clusterReachability.ts +281 -138
|
@@ -1849,7 +1849,7 @@ describe('plugin-meetings', () => {
|
|
|
1849
1849
|
setCorrelationIdSpy = sinon.spy(meeting, 'setCorrelationId');
|
|
1850
1850
|
meeting.setLocus = sinon.stub().returns(true);
|
|
1851
1851
|
webex.meetings.registered = true;
|
|
1852
|
-
|
|
1852
|
+
sinon.stub(meeting, 'updateLLMConnection').returns(Promise.resolve());
|
|
1853
1853
|
});
|
|
1854
1854
|
|
|
1855
1855
|
describe('successful', () => {
|
|
@@ -2040,7 +2040,7 @@ describe('plugin-meetings', () => {
|
|
|
2040
2040
|
const defer = new Defer();
|
|
2041
2041
|
|
|
2042
2042
|
meeting.config.enableAutomaticLLM = true;
|
|
2043
|
-
meeting.updateLLMConnection
|
|
2043
|
+
meeting.updateLLMConnection.returns(defer.promise);
|
|
2044
2044
|
|
|
2045
2045
|
const result = await meeting.join();
|
|
2046
2046
|
|
|
@@ -2051,7 +2051,7 @@ describe('plugin-meetings', () => {
|
|
|
2051
2051
|
|
|
2052
2052
|
it('should call updateLLMConnection as part of joining if config value is set', async () => {
|
|
2053
2053
|
meeting.config.enableAutomaticLLM = true;
|
|
2054
|
-
meeting.updateLLMConnection
|
|
2054
|
+
meeting.updateLLMConnection.resolves();
|
|
2055
2055
|
|
|
2056
2056
|
await meeting.join();
|
|
2057
2057
|
|
|
@@ -2059,7 +2059,7 @@ describe('plugin-meetings', () => {
|
|
|
2059
2059
|
});
|
|
2060
2060
|
|
|
2061
2061
|
it('should not call updateLLMConnection as part of joining if config value is not set', async () => {
|
|
2062
|
-
meeting.updateLLMConnection
|
|
2062
|
+
meeting.updateLLMConnection.resolves();
|
|
2063
2063
|
await meeting.join();
|
|
2064
2064
|
|
|
2065
2065
|
assert.notCalled(meeting.updateLLMConnection);
|
|
@@ -2069,7 +2069,7 @@ describe('plugin-meetings', () => {
|
|
|
2069
2069
|
const defer = new Defer();
|
|
2070
2070
|
|
|
2071
2071
|
meeting.config.enableAutomaticLLM = true;
|
|
2072
|
-
meeting.updateLLMConnection
|
|
2072
|
+
meeting.updateLLMConnection.returns(defer.promise);
|
|
2073
2073
|
|
|
2074
2074
|
const result = await meeting.join();
|
|
2075
2075
|
|
|
@@ -2095,6 +2095,42 @@ describe('plugin-meetings', () => {
|
|
|
2095
2095
|
]);
|
|
2096
2096
|
}
|
|
2097
2097
|
});
|
|
2098
|
+
|
|
2099
|
+
it('handles Locus LLM events', async () => {
|
|
2100
|
+
const locusInfoParseStub = sinon.stub(meeting.locusInfo, 'parse');
|
|
2101
|
+
sinon.stub(meeting, 'isJoined').returns(true);
|
|
2102
|
+
|
|
2103
|
+
// Set up llm.on stub to capture the registered listener when updateLLMConnection is called
|
|
2104
|
+
let locusLLMEventListener;
|
|
2105
|
+
meeting.webex.internal.llm.on = sinon.stub().callsFake((eventName, callback) => {
|
|
2106
|
+
if (eventName === 'event:locus.state_message') {
|
|
2107
|
+
locusLLMEventListener = callback;
|
|
2108
|
+
}
|
|
2109
|
+
});
|
|
2110
|
+
meeting.webex.internal.llm.off = sinon.stub();
|
|
2111
|
+
|
|
2112
|
+
// we need the real meeting.updateLLMConnection not the mock
|
|
2113
|
+
meeting.updateLLMConnection.restore();
|
|
2114
|
+
|
|
2115
|
+
// Call updateLLMConnection to register the listener
|
|
2116
|
+
await meeting.updateLLMConnection();
|
|
2117
|
+
|
|
2118
|
+
// Verify the listener was registered and we captured it
|
|
2119
|
+
assert.isDefined(locusLLMEventListener, 'LLM event listener should be registered');
|
|
2120
|
+
|
|
2121
|
+
// Now trigger the event
|
|
2122
|
+
const eventData = {
|
|
2123
|
+
eventType: 'locus.state_message',
|
|
2124
|
+
stateElementsMessage: {
|
|
2125
|
+
header: {messageId: 'msg-1'},
|
|
2126
|
+
elements: [],
|
|
2127
|
+
},
|
|
2128
|
+
};
|
|
2129
|
+
|
|
2130
|
+
locusLLMEventListener({data: eventData});
|
|
2131
|
+
|
|
2132
|
+
assert.calledOnceWithExactly(locusInfoParseStub, meeting, eventData);
|
|
2133
|
+
});
|
|
2098
2134
|
});
|
|
2099
2135
|
|
|
2100
2136
|
describe('refreshPermissionToken', () => {
|
|
@@ -4749,6 +4785,7 @@ describe('plugin-meetings', () => {
|
|
|
4749
4785
|
id: 'fake locus from mocked join request',
|
|
4750
4786
|
locusUrl: 'fake locus url',
|
|
4751
4787
|
mediaId: 'fake media id',
|
|
4788
|
+
locus: {fullState: {}},
|
|
4752
4789
|
});
|
|
4753
4790
|
sinon.stub(meeting.meetingRequest, 'joinMeeting').resolves({
|
|
4754
4791
|
headers: {
|
|
@@ -12291,16 +12328,26 @@ describe('plugin-meetings', () => {
|
|
|
12291
12328
|
assert.notCalled(webex.internal.llm.disconnectLLM);
|
|
12292
12329
|
assert.calledWith(webex.internal.llm.registerAndConnect, 'a url', 'a datachannel url');
|
|
12293
12330
|
assert.equal(result, 'something');
|
|
12294
|
-
assert.
|
|
12331
|
+
assert.calledWithExactly(
|
|
12295
12332
|
meeting.webex.internal.llm.off,
|
|
12296
12333
|
'event:relay.event',
|
|
12297
12334
|
meeting.processRelayEvent
|
|
12298
12335
|
);
|
|
12299
|
-
assert.
|
|
12336
|
+
assert.calledWithExactly(
|
|
12337
|
+
meeting.webex.internal.llm.off,
|
|
12338
|
+
'event:locus.state_message',
|
|
12339
|
+
meeting.processLocusLLMEvent
|
|
12340
|
+
);
|
|
12341
|
+
assert.calledWithExactly(
|
|
12300
12342
|
meeting.webex.internal.llm.on,
|
|
12301
12343
|
'event:relay.event',
|
|
12302
12344
|
meeting.processRelayEvent
|
|
12303
12345
|
);
|
|
12346
|
+
assert.calledWithExactly(
|
|
12347
|
+
meeting.webex.internal.llm.on,
|
|
12348
|
+
'event:locus.state_message',
|
|
12349
|
+
meeting.processLocusLLMEvent
|
|
12350
|
+
);
|
|
12304
12351
|
});
|
|
12305
12352
|
|
|
12306
12353
|
it('disconnects if first if the locus url has changed', async () => {
|
|
@@ -12328,15 +12375,25 @@ describe('plugin-meetings', () => {
|
|
|
12328
12375
|
'event:relay.event',
|
|
12329
12376
|
meeting.processRelayEvent
|
|
12330
12377
|
);
|
|
12331
|
-
assert.
|
|
12332
|
-
|
|
12378
|
+
assert.calledWithExactly(
|
|
12379
|
+
meeting.webex.internal.llm.off,
|
|
12380
|
+
'event:locus.state_message',
|
|
12381
|
+
meeting.processLocusLLMEvent
|
|
12382
|
+
);
|
|
12383
|
+
assert.callCount(meeting.webex.internal.llm.off, 4);
|
|
12384
|
+
assert.calledWithExactly(
|
|
12333
12385
|
meeting.webex.internal.llm.on,
|
|
12334
12386
|
'event:relay.event',
|
|
12335
12387
|
meeting.processRelayEvent
|
|
12336
12388
|
);
|
|
12389
|
+
assert.calledWithExactly(
|
|
12390
|
+
meeting.webex.internal.llm.on,
|
|
12391
|
+
'event:locus.state_message',
|
|
12392
|
+
meeting.processLocusLLMEvent
|
|
12393
|
+
);
|
|
12337
12394
|
});
|
|
12338
12395
|
|
|
12339
|
-
it('disconnects
|
|
12396
|
+
it('disconnects it first if the data channel url has changed', async () => {
|
|
12340
12397
|
meeting.joinedWith = {state: 'JOINED'};
|
|
12341
12398
|
webex.internal.llm.isConnected.returns(true);
|
|
12342
12399
|
webex.internal.llm.getLocusUrl.returns('a url');
|
|
@@ -12361,12 +12418,21 @@ describe('plugin-meetings', () => {
|
|
|
12361
12418
|
'event:relay.event',
|
|
12362
12419
|
meeting.processRelayEvent
|
|
12363
12420
|
);
|
|
12364
|
-
assert.
|
|
12365
|
-
|
|
12421
|
+
assert.calledWithExactly(
|
|
12422
|
+
meeting.webex.internal.llm.off,
|
|
12423
|
+
'event:locus.state_message',
|
|
12424
|
+
meeting.processLocusLLMEvent
|
|
12425
|
+
);
|
|
12426
|
+
assert.calledWithExactly(
|
|
12366
12427
|
meeting.webex.internal.llm.on,
|
|
12367
12428
|
'event:relay.event',
|
|
12368
12429
|
meeting.processRelayEvent
|
|
12369
12430
|
);
|
|
12431
|
+
assert.calledWithExactly(
|
|
12432
|
+
meeting.webex.internal.llm.on,
|
|
12433
|
+
'event:locus.state_message',
|
|
12434
|
+
meeting.processLocusLLMEvent
|
|
12435
|
+
);
|
|
12370
12436
|
});
|
|
12371
12437
|
|
|
12372
12438
|
it('disconnects when the state is not JOINED', async () => {
|
|
@@ -12381,11 +12447,16 @@ describe('plugin-meetings', () => {
|
|
|
12381
12447
|
assert.calledWith(webex.internal.llm.disconnectLLM, undefined);
|
|
12382
12448
|
assert.notCalled(webex.internal.llm.registerAndConnect);
|
|
12383
12449
|
assert.equal(result, undefined);
|
|
12384
|
-
assert.
|
|
12450
|
+
assert.calledWithExactly(
|
|
12385
12451
|
meeting.webex.internal.llm.off,
|
|
12386
12452
|
'event:relay.event',
|
|
12387
12453
|
meeting.processRelayEvent
|
|
12388
12454
|
);
|
|
12455
|
+
assert.calledWithExactly(
|
|
12456
|
+
meeting.webex.internal.llm.off,
|
|
12457
|
+
'event:locus.state_message',
|
|
12458
|
+
meeting.processLocusLLMEvent
|
|
12459
|
+
);
|
|
12389
12460
|
});
|
|
12390
12461
|
|
|
12391
12462
|
it('connect ps data channel if ps started in webinar', async () => {
|
|
@@ -12411,22 +12482,22 @@ describe('plugin-meetings', () => {
|
|
|
12411
12482
|
});
|
|
12412
12483
|
|
|
12413
12484
|
it('should read the locus object, set on the meeting and return null', () => {
|
|
12485
|
+
const dataSets = {someFakeStuff: 'dataSet'};
|
|
12486
|
+
|
|
12414
12487
|
meeting.setLocus({
|
|
12415
12488
|
mediaConnections: [test1],
|
|
12416
12489
|
locusUrl: url1,
|
|
12417
12490
|
locusId: uuid1,
|
|
12418
12491
|
selfId: uuid2,
|
|
12419
12492
|
mediaId: uuid3,
|
|
12420
|
-
host: {id: uuid4},
|
|
12493
|
+
locus: {host: {id: uuid4}},
|
|
12494
|
+
dataSets,
|
|
12421
12495
|
});
|
|
12422
12496
|
assert.calledOnce(meeting.locusInfo.initialSetup);
|
|
12423
12497
|
assert.calledWith(meeting.locusInfo.initialSetup, {
|
|
12424
|
-
|
|
12425
|
-
|
|
12426
|
-
|
|
12427
|
-
selfId: uuid2,
|
|
12428
|
-
mediaId: uuid3,
|
|
12429
|
-
host: {id: uuid4},
|
|
12498
|
+
trigger: 'join-response',
|
|
12499
|
+
locus: {host: {id: uuid4}},
|
|
12500
|
+
dataSets,
|
|
12430
12501
|
});
|
|
12431
12502
|
assert.equal(meeting.mediaConnections, test1);
|
|
12432
12503
|
assert.equal(meeting.locusUrl, url1);
|
|
@@ -1433,5 +1433,82 @@ describe('plugin-meetings', () => {
|
|
|
1433
1433
|
});
|
|
1434
1434
|
});
|
|
1435
1435
|
});
|
|
1436
|
+
|
|
1437
|
+
describe('#parseLocusJoin', () => {
|
|
1438
|
+
let response;
|
|
1439
|
+
|
|
1440
|
+
beforeEach(() => {
|
|
1441
|
+
response = {
|
|
1442
|
+
body: {
|
|
1443
|
+
locus: {
|
|
1444
|
+
url: 'https://locus-a.wbx2.com/locus/api/v1/loci/12345',
|
|
1445
|
+
self: {
|
|
1446
|
+
id: 'selfId123',
|
|
1447
|
+
},
|
|
1448
|
+
},
|
|
1449
|
+
dataSets: [{name: 'dataset1', url: 'http://dataset.com'}],
|
|
1450
|
+
mediaConnections: [
|
|
1451
|
+
{mediaId: 'mediaId456'},
|
|
1452
|
+
{someOtherField: 'value'},
|
|
1453
|
+
],
|
|
1454
|
+
},
|
|
1455
|
+
};
|
|
1456
|
+
});
|
|
1457
|
+
|
|
1458
|
+
it('works as expected', () => {
|
|
1459
|
+
const result = MeetingUtil.parseLocusJoin(response);
|
|
1460
|
+
|
|
1461
|
+
assert.deepEqual(result, {
|
|
1462
|
+
locus: response.body.locus,
|
|
1463
|
+
dataSets: response.body.dataSets,
|
|
1464
|
+
mediaConnections: response.body.mediaConnections,
|
|
1465
|
+
locusUrl: 'https://locus-a.wbx2.com/locus/api/v1/loci/12345',
|
|
1466
|
+
locusId: '12345',
|
|
1467
|
+
selfId: 'selfId123',
|
|
1468
|
+
mediaId: 'mediaId456',
|
|
1469
|
+
});
|
|
1470
|
+
});
|
|
1471
|
+
|
|
1472
|
+
it('extracts mediaId from the last mediaConnection that has it', () => {
|
|
1473
|
+
response.body.mediaConnections = [
|
|
1474
|
+
{someField: 'noMediaId'},
|
|
1475
|
+
{mediaId: 'firstMediaId'},
|
|
1476
|
+
{mediaId: 'secondMediaId'},
|
|
1477
|
+
];
|
|
1478
|
+
|
|
1479
|
+
const result = MeetingUtil.parseLocusJoin(response);
|
|
1480
|
+
|
|
1481
|
+
// Note: the implementation uses forEach which doesn't break,
|
|
1482
|
+
// so it will use the last mediaId found, not the first
|
|
1483
|
+
assert.equal(result.mediaId, 'secondMediaId');
|
|
1484
|
+
});
|
|
1485
|
+
|
|
1486
|
+
it('handles empty mediaConnections array', () => {
|
|
1487
|
+
response.body.mediaConnections = [];
|
|
1488
|
+
|
|
1489
|
+
const result = MeetingUtil.parseLocusJoin(response);
|
|
1490
|
+
|
|
1491
|
+
assert.deepEqual(result, {
|
|
1492
|
+
locus: response.body.locus,
|
|
1493
|
+
dataSets: response.body.dataSets,
|
|
1494
|
+
mediaConnections: [],
|
|
1495
|
+
locusUrl: 'https://locus-a.wbx2.com/locus/api/v1/loci/12345',
|
|
1496
|
+
locusId: '12345',
|
|
1497
|
+
selfId: 'selfId123',
|
|
1498
|
+
});
|
|
1499
|
+
assert.isUndefined(result.mediaId);
|
|
1500
|
+
});
|
|
1501
|
+
|
|
1502
|
+
it('handles mediaConnections without mediaId', () => {
|
|
1503
|
+
response.body.mediaConnections = [
|
|
1504
|
+
{someField: 'value1'},
|
|
1505
|
+
{anotherField: 'value2'},
|
|
1506
|
+
];
|
|
1507
|
+
|
|
1508
|
+
const result = MeetingUtil.parseLocusJoin(response);
|
|
1509
|
+
|
|
1510
|
+
assert.isUndefined(result.mediaId);
|
|
1511
|
+
});
|
|
1512
|
+
});
|
|
1436
1513
|
});
|
|
1437
1514
|
});
|
|
@@ -914,7 +914,11 @@ describe('plugin-meetings', () => {
|
|
|
914
914
|
'LOCUS_ID'
|
|
915
915
|
);
|
|
916
916
|
assert.calledWith(initialSetup, {
|
|
917
|
-
|
|
917
|
+
trigger: 'get-loci-response',
|
|
918
|
+
locus: {
|
|
919
|
+
url: url1,
|
|
920
|
+
},
|
|
921
|
+
hashTreeMessage: undefined
|
|
918
922
|
});
|
|
919
923
|
});
|
|
920
924
|
});
|
|
@@ -1415,21 +1419,53 @@ describe('plugin-meetings', () => {
|
|
|
1415
1419
|
);
|
|
1416
1420
|
assert.calledOnce(initialSetup);
|
|
1417
1421
|
assert.calledWith(initialSetup, {
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
+
trigger: 'locus-message',
|
|
1423
|
+
locus: {
|
|
1424
|
+
id: uuid1,
|
|
1425
|
+
replaces: [
|
|
1426
|
+
{
|
|
1427
|
+
locusUrl: 'http:locusUrl',
|
|
1428
|
+
},
|
|
1429
|
+
],
|
|
1430
|
+
self: {
|
|
1431
|
+
callBackInfo: {
|
|
1432
|
+
callbackAddress: uri1,
|
|
1433
|
+
},
|
|
1434
|
+
devices: [],
|
|
1422
1435
|
},
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
callBackInfo: {
|
|
1426
|
-
callbackAddress: uri1,
|
|
1436
|
+
info: {
|
|
1437
|
+
webExMeetingId,
|
|
1427
1438
|
},
|
|
1428
|
-
devices: [],
|
|
1429
1439
|
},
|
|
1440
|
+
hashTreeMessage: undefined
|
|
1441
|
+
});
|
|
1442
|
+
});
|
|
1443
|
+
it('should setup the meeting from a hash tree event', async () => {
|
|
1444
|
+
const locus = {
|
|
1445
|
+
id: uuid1,
|
|
1446
|
+
self: {},
|
|
1430
1447
|
info: {
|
|
1431
1448
|
webExMeetingId,
|
|
1432
1449
|
},
|
|
1450
|
+
};
|
|
1451
|
+
const hashTreeMessage = {something: 'hashTreeData'};
|
|
1452
|
+
await webex.meetings.handleLocusEvent({
|
|
1453
|
+
locus,
|
|
1454
|
+
eventType: 'locus.state_message',
|
|
1455
|
+
locusUrl: url1,
|
|
1456
|
+
stateElementsMessage: hashTreeMessage,
|
|
1457
|
+
});
|
|
1458
|
+
assert.calledWith(webex.meetings.meetingCollection.getByKey, 'locusUrl', url1);
|
|
1459
|
+
assert.calledWith(
|
|
1460
|
+
webex.meetings.meetingCollection.getByKey,
|
|
1461
|
+
'meetingNumber',
|
|
1462
|
+
webExMeetingId
|
|
1463
|
+
);
|
|
1464
|
+
assert.calledOnce(initialSetup);
|
|
1465
|
+
assert.calledWith(initialSetup, {
|
|
1466
|
+
trigger: 'locus-message',
|
|
1467
|
+
locus,
|
|
1468
|
+
hashTreeMessage,
|
|
1433
1469
|
});
|
|
1434
1470
|
});
|
|
1435
1471
|
it('should setup the meeting by difference event without replaces', async () => {
|
|
@@ -1458,16 +1494,20 @@ describe('plugin-meetings', () => {
|
|
|
1458
1494
|
);
|
|
1459
1495
|
assert.calledOnce(initialSetup);
|
|
1460
1496
|
assert.calledWith(initialSetup, {
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1497
|
+
trigger: 'locus-message',
|
|
1498
|
+
locus: {
|
|
1499
|
+
id: uuid1,
|
|
1500
|
+
self: {
|
|
1501
|
+
callBackInfo: {
|
|
1502
|
+
callbackAddress: uri1,
|
|
1503
|
+
},
|
|
1504
|
+
devices: [],
|
|
1505
|
+
},
|
|
1506
|
+
info: {
|
|
1507
|
+
webExMeetingId,
|
|
1465
1508
|
},
|
|
1466
|
-
devices: [],
|
|
1467
|
-
},
|
|
1468
|
-
info: {
|
|
1469
|
-
webExMeetingId,
|
|
1470
1509
|
},
|
|
1510
|
+
hashTreeMessage: undefined
|
|
1471
1511
|
});
|
|
1472
1512
|
});
|
|
1473
1513
|
|
|
@@ -1530,16 +1570,20 @@ describe('plugin-meetings', () => {
|
|
|
1530
1570
|
);
|
|
1531
1571
|
assert.calledOnce(initialSetup);
|
|
1532
1572
|
assert.calledWith(initialSetup, {
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1573
|
+
trigger: 'locus-message',
|
|
1574
|
+
locus: {
|
|
1575
|
+
id: uuid1,
|
|
1576
|
+
self: {
|
|
1577
|
+
callBackInfo: {
|
|
1578
|
+
callbackAddress: uri1,
|
|
1579
|
+
},
|
|
1580
|
+
devices: [],
|
|
1581
|
+
},
|
|
1582
|
+
info: {
|
|
1583
|
+
webExMeetingId,
|
|
1537
1584
|
},
|
|
1538
|
-
devices: [],
|
|
1539
|
-
},
|
|
1540
|
-
info: {
|
|
1541
|
-
webExMeetingId,
|
|
1542
1585
|
},
|
|
1586
|
+
hashTreeMessage: undefined
|
|
1543
1587
|
});
|
|
1544
1588
|
});
|
|
1545
1589
|
|
|
@@ -3087,6 +3131,7 @@ describe('plugin-meetings', () => {
|
|
|
3087
3131
|
},
|
|
3088
3132
|
});
|
|
3089
3133
|
assert.calledWith(webex.meetings.handleLocusEvent, {
|
|
3134
|
+
eventType: LOCUSEVENT.SDK_NO_EVENT,
|
|
3090
3135
|
locus: breakoutLocus,
|
|
3091
3136
|
locusUrl: breakoutLocus.url,
|
|
3092
3137
|
});
|