@webex/plugin-meetings 3.11.0 → 3.12.0-llmrefactor.2
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/AGENTS.md +9 -0
- package/dist/aiEnableRequest/index.js +197 -0
- package/dist/aiEnableRequest/index.js.map +1 -0
- package/dist/aiEnableRequest/utils.js +36 -0
- package/dist/aiEnableRequest/utils.js.map +1 -0
- package/dist/annotation/index.js +60 -15
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.js +8 -3
- package/dist/breakouts/breakout.js.map +1 -1
- package/dist/breakouts/events.js +29 -14
- package/dist/breakouts/events.js.map +1 -1
- package/dist/breakouts/index.js +128 -7
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +49 -5
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +8 -3
- package/dist/config.js.map +1 -1
- package/dist/constants.js +60 -11
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +11 -1
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/index.js +67 -29
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.js +91 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/hashTree/constants.js +16 -2
- package/dist/hashTree/constants.js.map +1 -1
- package/dist/hashTree/hashTree.js +18 -0
- package/dist/hashTree/hashTree.js.map +1 -1
- package/dist/hashTree/hashTreeParser.js +1655 -538
- package/dist/hashTree/hashTreeParser.js.map +1 -1
- package/dist/hashTree/types.js +4 -2
- package/dist/hashTree/types.js.map +1 -1
- package/dist/hashTree/utils.js +52 -0
- package/dist/hashTree/utils.js.map +1 -1
- package/dist/index.js +18 -2
- package/dist/index.js.map +1 -1
- package/dist/interceptors/constant.js +12 -0
- package/dist/interceptors/constant.js.map +1 -0
- package/dist/interceptors/dataChannelAuthToken.js +332 -0
- package/dist/interceptors/dataChannelAuthToken.js.map +1 -0
- package/dist/interceptors/index.js +7 -0
- package/dist/interceptors/index.js.map +1 -1
- package/dist/interceptors/locusRetry.js +23 -8
- package/dist/interceptors/locusRetry.js.map +1 -1
- package/dist/interceptors/utils.js +27 -0
- package/dist/interceptors/utils.js.map +1 -0
- package/dist/interpretation/index.js +11 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/interpretation.types.js +7 -0
- package/dist/interpretation/interpretation.types.js.map +1 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +9 -4
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +914 -212
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +36 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/selfUtils.js +1 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/locus-info/types.js +19 -0
- package/dist/locus-info/types.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +72 -3
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.js +8 -2
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +8 -7
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +11 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +2287 -1118
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +229 -82
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +10 -1
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +55 -2
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +168 -5
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +2 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +369 -162
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +6 -1
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.js +39 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +116 -18
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +20 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +40 -0
- package/dist/member/util.js.map +1 -1
- package/dist/members/index.js +101 -43
- package/dist/members/index.js.map +1 -1
- package/dist/members/util.js +8 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +12 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/codec/constants.js +63 -0
- package/dist/multistream/codec/constants.js.map +1 -0
- package/dist/multistream/mediaRequestManager.js +64 -68
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +9 -0
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +11 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +116 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +139 -93
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +2 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/util.js +45 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +0 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/index.js +1 -3
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +8 -1
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/types/aiEnableRequest/index.d.ts +5 -0
- package/dist/types/aiEnableRequest/utils.d.ts +2 -0
- package/dist/types/annotation/index.d.ts +19 -0
- package/dist/types/common/errors/webex-errors.d.ts +32 -2
- package/dist/types/config.d.ts +6 -2
- package/dist/types/constants.d.ts +35 -1
- package/dist/types/controls-options-manager/constants.d.ts +6 -1
- package/dist/types/controls-options-manager/index.d.ts +16 -0
- package/dist/types/hashTree/constants.d.ts +3 -0
- package/dist/types/hashTree/hashTree.d.ts +7 -0
- package/dist/types/hashTree/hashTreeParser.d.ts +315 -30
- package/dist/types/hashTree/types.d.ts +3 -0
- package/dist/types/hashTree/utils.d.ts +24 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/interceptors/constant.d.ts +5 -0
- package/dist/types/interceptors/dataChannelAuthToken.d.ts +43 -0
- package/dist/types/interceptors/index.d.ts +2 -1
- package/dist/types/interceptors/locusRetry.d.ts +4 -4
- package/dist/types/interceptors/utils.d.ts +1 -0
- package/dist/types/interpretation/interpretation.types.d.ts +10 -0
- package/dist/types/locus-info/index.d.ts +126 -15
- package/dist/types/locus-info/infoUtils.d.ts +8 -0
- package/dist/types/locus-info/types.d.ts +28 -1
- package/dist/types/media/MediaConnectionAwaiter.d.ts +20 -2
- package/dist/types/media/properties.d.ts +8 -3
- package/dist/types/meeting/in-meeting-actions.d.ts +10 -0
- package/dist/types/meeting/index.d.ts +271 -16
- package/dist/types/meeting/locusMediaRequest.d.ts +12 -0
- package/dist/types/meeting/request.d.ts +17 -1
- package/dist/types/meeting/request.type.d.ts +5 -0
- package/dist/types/meeting/util.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +42 -20
- package/dist/types/meetings/meetings.types.d.ts +15 -0
- package/dist/types/meetings/request.d.ts +14 -0
- package/dist/types/member/index.d.ts +2 -0
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/member/util.d.ts +14 -0
- package/dist/types/members/index.d.ts +15 -2
- package/dist/types/members/util.d.ts +1 -5
- package/dist/types/metrics/constants.d.ts +11 -0
- package/dist/types/multistream/codec/constants.d.ts +7 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +20 -26
- package/dist/types/multistream/sendSlotManager.d.ts +23 -1
- package/dist/types/reachability/clusterReachability.d.ts +3 -3
- package/dist/types/reachability/index.d.ts +10 -3
- package/dist/types/reachability/reachability.types.d.ts +7 -0
- package/dist/types/reachability/util.d.ts +17 -0
- package/dist/types/reactions/reactions.type.d.ts +4 -0
- package/dist/types/webinar/utils.d.ts +6 -0
- package/dist/webinar/index.js +612 -165
- package/dist/webinar/index.js.map +1 -1
- package/dist/webinar/utils.js +25 -0
- package/dist/webinar/utils.js.map +1 -0
- package/package.json +24 -23
- package/src/aiEnableRequest/README.md +84 -0
- package/src/aiEnableRequest/index.ts +186 -0
- package/src/aiEnableRequest/utils.ts +25 -0
- package/src/annotation/index.ts +67 -15
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +145 -3
- package/src/common/errors/webex-errors.ts +50 -3
- package/src/config.ts +6 -2
- package/src/constants.ts +49 -3
- package/src/controls-options-manager/constants.ts +14 -1
- package/src/controls-options-manager/index.ts +87 -28
- package/src/controls-options-manager/util.ts +81 -1
- package/src/hashTree/constants.ts +17 -0
- package/src/hashTree/hashTree.ts +17 -0
- package/src/hashTree/hashTreeParser.ts +1482 -361
- package/src/hashTree/types.ts +4 -0
- package/src/hashTree/utils.ts +45 -0
- package/src/index.ts +14 -1
- package/src/interceptors/constant.ts +6 -0
- package/src/interceptors/dataChannelAuthToken.ts +217 -0
- package/src/interceptors/index.ts +2 -1
- package/src/interceptors/locusRetry.ts +25 -4
- package/src/interceptors/utils.ts +16 -0
- package/src/interpretation/index.ts +29 -11
- package/src/interpretation/interpretation.types.ts +11 -0
- package/src/locus-info/controlsUtils.ts +14 -1
- package/src/locus-info/index.ts +976 -203
- package/src/locus-info/infoUtils.ts +41 -6
- package/src/locus-info/selfUtils.ts +1 -0
- package/src/locus-info/types.ts +33 -1
- package/src/media/MediaConnectionAwaiter.ts +62 -5
- package/src/media/index.ts +10 -1
- package/src/media/properties.ts +11 -4
- package/src/meeting/in-meeting-actions.ts +20 -0
- package/src/meeting/index.ts +1258 -222
- package/src/meeting/locusMediaRequest.ts +106 -6
- package/src/meeting/muteState.ts +10 -1
- package/src/meeting/request.ts +53 -0
- package/src/meeting/request.type.ts +6 -0
- package/src/meeting/util.ts +207 -7
- package/src/meeting-info/meeting-info-v2.ts +4 -2
- package/src/meetings/index.ts +319 -117
- package/src/meetings/meetings.types.ts +19 -0
- package/src/meetings/request.ts +43 -0
- package/src/meetings/util.ts +117 -4
- package/src/member/index.ts +20 -0
- package/src/member/types.ts +1 -0
- package/src/member/util.ts +41 -0
- package/src/members/index.ts +70 -7
- package/src/members/util.ts +12 -4
- package/src/metrics/constants.ts +12 -0
- package/src/multistream/codec/constants.ts +58 -0
- package/src/multistream/mediaRequestManager.ts +117 -76
- package/src/multistream/receiveSlot.ts +18 -0
- package/src/multistream/remoteMediaManager.ts +13 -0
- package/src/multistream/sendSlotManager.ts +97 -3
- package/src/reachability/clusterReachability.ts +3 -2
- package/src/reachability/index.ts +56 -16
- package/src/reachability/reachability.types.ts +11 -0
- package/src/reachability/util.ts +36 -0
- package/src/reactions/reactions.type.ts +4 -0
- package/src/reconnection-manager/index.ts +0 -1
- package/src/recording-controller/index.ts +1 -2
- package/src/roap/turnDiscovery.ts +9 -1
- package/src/webinar/index.ts +416 -12
- package/src/webinar/utils.ts +16 -0
- package/test/unit/spec/aiEnableRequest/index.ts +1067 -0
- package/test/unit/spec/aiEnableRequest/utils.ts +130 -0
- package/test/unit/spec/annotation/index.ts +228 -134
- package/test/unit/spec/breakouts/breakout.ts +9 -3
- package/test/unit/spec/breakouts/events.ts +120 -2
- package/test/unit/spec/breakouts/index.ts +331 -15
- package/test/unit/spec/common/errors/webex-errors.ts +78 -0
- package/test/unit/spec/controls-options-manager/index.js +244 -29
- package/test/unit/spec/controls-options-manager/util.js +165 -0
- package/test/unit/spec/hashTree/hashTree.ts +66 -0
- package/test/unit/spec/hashTree/hashTreeParser.ts +4528 -171
- package/test/unit/spec/hashTree/utils.ts +125 -1
- package/test/unit/spec/interceptors/dataChannelAuthToken.ts +388 -0
- package/test/unit/spec/interceptors/locusRetry.ts +205 -4
- package/test/unit/spec/interceptors/utils.ts +75 -0
- package/test/unit/spec/interpretation/index.ts +26 -4
- package/test/unit/spec/locus-info/controlsUtils.js +200 -56
- package/test/unit/spec/locus-info/index.js +1861 -149
- package/test/unit/spec/locus-info/infoUtils.js +184 -1
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +96 -1
- package/test/unit/spec/media/index.ts +92 -0
- package/test/unit/spec/media/properties.ts +35 -26
- package/test/unit/spec/meeting/in-meeting-actions.ts +12 -2
- package/test/unit/spec/meeting/index.js +3694 -450
- package/test/unit/spec/meeting/locusMediaRequest.ts +406 -4
- package/test/unit/spec/meeting/muteState.js +81 -0
- package/test/unit/spec/meeting/request.js +82 -0
- package/test/unit/spec/meeting/utils.js +595 -27
- package/test/unit/spec/meeting-info/meetinginfov2.js +19 -10
- package/test/unit/spec/meetings/index.js +1138 -86
- package/test/unit/spec/meetings/request.js +141 -0
- package/test/unit/spec/meetings/utils.js +402 -51
- package/test/unit/spec/member/index.js +35 -4
- package/test/unit/spec/member/util.js +154 -27
- package/test/unit/spec/members/index.js +216 -0
- package/test/unit/spec/members/request.js +37 -1
- package/test/unit/spec/members/utils.js +63 -0
- package/test/unit/spec/multistream/mediaRequestManager.ts +503 -122
- package/test/unit/spec/multistream/remoteMediaManager.ts +30 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +135 -36
- package/test/unit/spec/reachability/index.ts +151 -46
- package/test/unit/spec/reachability/util.ts +31 -0
- package/test/unit/spec/reconnection-manager/index.js +4 -8
- package/test/unit/spec/recording-controller/index.js +9 -8
- package/test/unit/spec/roap/turnDiscovery.ts +20 -0
- package/test/unit/spec/webinar/index.ts +1087 -167
- package/test/unit/spec/webinar/utils.ts +39 -0
package/src/annotation/index.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import uuid from 'uuid';
|
|
2
2
|
// eslint-disable-next-line import/no-extraneous-dependencies
|
|
3
3
|
import {WebexPlugin, config} from '@webex/webex-core';
|
|
4
|
+
import type LLMChannel from '@webex/internal-plugin-llm';
|
|
4
5
|
import TriggerProxy from '../common/events/trigger-proxy';
|
|
5
6
|
|
|
6
7
|
import {
|
|
@@ -13,7 +14,7 @@ import {
|
|
|
13
14
|
} from './constants';
|
|
14
15
|
|
|
15
16
|
import {StrokeData, RequestData, IAnnotationChannel, CommandRequestBody} from './annotation.types';
|
|
16
|
-
import {HTTP_VERBS} from '../constants';
|
|
17
|
+
import {HTTP_VERBS, LOCUSEVENT} from '../constants';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* @description Annotation to handle LLM and Mercury message and locus API
|
|
@@ -30,6 +31,12 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
30
31
|
locusUrl: string;
|
|
31
32
|
deviceUrl: string;
|
|
32
33
|
|
|
34
|
+
/** Currently registered LLM channel */
|
|
35
|
+
private channel?: LLMChannel;
|
|
36
|
+
|
|
37
|
+
/** Event handler bound to the channel, for cleanup */
|
|
38
|
+
private channelHandler?: (e: any) => void;
|
|
39
|
+
|
|
33
40
|
/**
|
|
34
41
|
* Initializes annotation module
|
|
35
42
|
*/
|
|
@@ -38,6 +45,37 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
38
45
|
this.seqNum = 1;
|
|
39
46
|
}
|
|
40
47
|
|
|
48
|
+
/**
|
|
49
|
+
* Register an LLMChannel with annotation. Only one channel can be registered
|
|
50
|
+
* at a time - the owner is responsible for switching channels when context
|
|
51
|
+
* changes (e.g., entering/leaving practice session).
|
|
52
|
+
* @param {LLMChannel} channel - The LLM channel to register
|
|
53
|
+
* @returns {void}
|
|
54
|
+
*/
|
|
55
|
+
public registerChannel(channel: LLMChannel): void {
|
|
56
|
+
// Unregister existing channel first
|
|
57
|
+
this.unregisterChannel();
|
|
58
|
+
|
|
59
|
+
this.channel = channel;
|
|
60
|
+
|
|
61
|
+
// Subscribe to relay events from this channel
|
|
62
|
+
this.channelHandler = this.eventDataProcessor.bind(this);
|
|
63
|
+
channel.on('event:relay.event', this.channelHandler);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Unregister the current LLMChannel from annotation
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
70
|
+
public unregisterChannel(): void {
|
|
71
|
+
if (this.channel && this.channelHandler) {
|
|
72
|
+
this.channel.off('event:relay.event', this.channelHandler);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
this.channel = undefined;
|
|
76
|
+
this.channelHandler = undefined;
|
|
77
|
+
}
|
|
78
|
+
|
|
41
79
|
/**
|
|
42
80
|
* Process Stroke Data
|
|
43
81
|
* @param {object} data
|
|
@@ -69,7 +107,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
69
107
|
*/
|
|
70
108
|
private eventCommandProcessor(e) {
|
|
71
109
|
if (
|
|
72
|
-
e?.data?.eventType ===
|
|
110
|
+
e?.data?.eventType === LOCUSEVENT.APPROVAL_REQUEST &&
|
|
73
111
|
e?.data?.approval?.resourceType === ANNOTATION_RESOURCE_TYPE &&
|
|
74
112
|
e?.data?.approval?.actionType
|
|
75
113
|
) {
|
|
@@ -104,18 +142,18 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
104
142
|
|
|
105
143
|
/**
|
|
106
144
|
* Listen to websocket messages
|
|
145
|
+
* @deprecated LLM event subscription is now handled by registerChannel()
|
|
107
146
|
* @returns {undefined}
|
|
108
147
|
*/
|
|
109
148
|
private listenToEvents() {
|
|
110
149
|
if (!this.hasSubscribedToEvents) {
|
|
111
150
|
// @ts-ignore
|
|
112
151
|
this.webex.internal.mercury.on(
|
|
113
|
-
|
|
152
|
+
`event:${LOCUSEVENT.APPROVAL_REQUEST}`,
|
|
114
153
|
this.eventCommandProcessor,
|
|
115
154
|
this
|
|
116
155
|
);
|
|
117
|
-
//
|
|
118
|
-
this.webex.internal.llm.on('event:relay.event', this.eventDataProcessor, this);
|
|
156
|
+
// LLM event subscription is now handled by registerChannel()
|
|
119
157
|
this.hasSubscribedToEvents = true;
|
|
120
158
|
}
|
|
121
159
|
}
|
|
@@ -127,10 +165,13 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
127
165
|
public deregisterEvents() {
|
|
128
166
|
if (this.hasSubscribedToEvents) {
|
|
129
167
|
// @ts-ignore
|
|
130
|
-
this.webex.internal.mercury.off(
|
|
168
|
+
this.webex.internal.mercury.off(
|
|
169
|
+
`event:${LOCUSEVENT.APPROVAL_REQUEST}`,
|
|
170
|
+
this.eventCommandProcessor
|
|
171
|
+
);
|
|
131
172
|
|
|
132
|
-
//
|
|
133
|
-
this.
|
|
173
|
+
// Unregister LLM channel
|
|
174
|
+
this.unregisterChannel();
|
|
134
175
|
|
|
135
176
|
this.hasSubscribedToEvents = false;
|
|
136
177
|
}
|
|
@@ -287,8 +328,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
287
328
|
* @returns {void}
|
|
288
329
|
*/
|
|
289
330
|
public sendStrokeData = (strokeData: StrokeData): void => {
|
|
290
|
-
|
|
291
|
-
if (!this.webex.internal.llm.isConnected()) return;
|
|
331
|
+
if (!this.channel?.isConnected()) return;
|
|
292
332
|
this.encryptContent(strokeData.encryptionKeyUrl, strokeData.content).then(
|
|
293
333
|
(encryptedContent) => {
|
|
294
334
|
this.publishEncrypted(encryptedContent, strokeData);
|
|
@@ -303,13 +343,25 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
303
343
|
* @returns {void}
|
|
304
344
|
*/
|
|
305
345
|
private publishEncrypted(encryptedContent: string, strokeData: StrokeData) {
|
|
346
|
+
if (!this.channel) {
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
const socket = this.channel.getSocket();
|
|
351
|
+
const binding = this.channel.getBinding();
|
|
352
|
+
if (!socket || !binding) {
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
|
|
306
356
|
const data = {
|
|
307
357
|
id: `${this.seqNum}`,
|
|
308
358
|
type: 'publishRequest',
|
|
309
|
-
recipients:
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
359
|
+
recipients: [
|
|
360
|
+
{
|
|
361
|
+
// @ts-ignore
|
|
362
|
+
route: binding,
|
|
363
|
+
},
|
|
364
|
+
],
|
|
313
365
|
headers: {
|
|
314
366
|
to: strokeData.toUserId,
|
|
315
367
|
},
|
|
@@ -336,7 +388,7 @@ class AnnotationChannel extends WebexPlugin implements IAnnotationChannel {
|
|
|
336
388
|
};
|
|
337
389
|
|
|
338
390
|
// @ts-ignore
|
|
339
|
-
|
|
391
|
+
socket.send(data);
|
|
340
392
|
this.seqNum += 1;
|
|
341
393
|
}
|
|
342
394
|
}
|
|
@@ -31,6 +31,7 @@ const Breakout = WebexPlugin.extend({
|
|
|
31
31
|
groupId: 'string',
|
|
32
32
|
url: 'string', // where to send requests to
|
|
33
33
|
requestedLastModifiedTime: 'string',
|
|
34
|
+
resourceLink: 'string', // the resource link for this breakout session, used for telemetry and logging
|
|
34
35
|
},
|
|
35
36
|
|
|
36
37
|
derived: {
|
|
@@ -165,7 +166,8 @@ const Breakout = WebexPlugin.extend({
|
|
|
165
166
|
return;
|
|
166
167
|
}
|
|
167
168
|
this.breakoutRosterLocus = locus;
|
|
168
|
-
|
|
169
|
+
// The roster via breakout roster event is full roster, use replace strategy to update the members
|
|
170
|
+
this.members.locusParticipantsUpdate({participants: locus.participants, isReplace: true});
|
|
169
171
|
},
|
|
170
172
|
|
|
171
173
|
/**
|
package/src/breakouts/events.ts
CHANGED
|
@@ -36,20 +36,42 @@ const breakoutEvent: {
|
|
|
36
36
|
if (!eventInfo?.breakoutMoveId || !eventInfo?.meeting) {
|
|
37
37
|
return;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
|
|
40
|
+
const {breakoutMoveId, currentSession, error, llmLatency, llmWebsocketUrl, meeting} = eventInfo;
|
|
41
|
+
|
|
42
|
+
if (!meeting.meetingInfo?.enableConvergedArchitecture) {
|
|
40
43
|
return;
|
|
41
44
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
|
|
46
|
+
if (
|
|
47
|
+
event === 'client.breakout-session.join.response' &&
|
|
48
|
+
typeof meeting.shouldEmitBreakoutJoinResponseMetric === 'function' &&
|
|
49
|
+
!meeting.shouldEmitBreakoutJoinResponseMetric(breakoutMoveId, Boolean(llmLatency))
|
|
50
|
+
) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const payload: any = {
|
|
55
|
+
llmLatency,
|
|
56
|
+
identifiers: {
|
|
57
|
+
breakoutMoveId,
|
|
58
|
+
breakoutSessionId: currentSession?.sessionId,
|
|
59
|
+
breakoutGroupId: currentSession?.groupId,
|
|
60
|
+
llmWebsocketUrl,
|
|
50
61
|
},
|
|
51
|
-
|
|
52
|
-
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const options: any = {
|
|
65
|
+
meetingId: meeting.id,
|
|
66
|
+
rawError: error,
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const metricEvent = {
|
|
70
|
+
name: event,
|
|
71
|
+
payload,
|
|
72
|
+
options,
|
|
73
|
+
};
|
|
74
|
+
submitClientEvent(metricEvent);
|
|
53
75
|
},
|
|
54
76
|
};
|
|
55
77
|
|
package/src/breakouts/index.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import {WebexPlugin} from '@webex/webex-core';
|
|
5
5
|
import {debounce, forEach} from 'lodash';
|
|
6
|
+
import type LLMChannel from '@webex/internal-plugin-llm';
|
|
6
7
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
7
8
|
|
|
8
9
|
import {BREAKOUTS, MEETINGS, HTTP_VERBS, _ID_} from '../constants';
|
|
@@ -32,6 +33,7 @@ const Breakouts = WebexPlugin.extend({
|
|
|
32
33
|
name: 'string', // only present when in a breakout session
|
|
33
34
|
sessionId: 'string', // appears from the moment you enable breakouts
|
|
34
35
|
sessionType: 'string', // appears from the moment you enable breakouts
|
|
36
|
+
breakoutMoveId: 'string', // used to correlate breakout move/join diagnostics
|
|
35
37
|
startTime: 'string', // appears once breakouts start
|
|
36
38
|
status: 'string', // only present when in a breakout session
|
|
37
39
|
url: 'string', // appears from the moment you enable breakouts
|
|
@@ -47,6 +49,8 @@ const Breakouts = WebexPlugin.extend({
|
|
|
47
49
|
canManageBreakouts: 'boolean', // appear the ability to manage breakouts
|
|
48
50
|
mainGroupId: 'string', // appears from the moment you enable breakouts
|
|
49
51
|
mainSessionId: 'string', // appears from the moment you enable breakouts
|
|
52
|
+
hasSubscribedToMessage: 'boolean', // tracks if listening to LLM broadcast messages
|
|
53
|
+
_llmChannel: 'object', // registered LLM channel for broadcast messages
|
|
50
54
|
},
|
|
51
55
|
children: {
|
|
52
56
|
currentBreakoutSession: Breakout,
|
|
@@ -149,9 +153,16 @@ const Breakouts = WebexPlugin.extend({
|
|
|
149
153
|
this.listenTo(this.breakouts, 'change:requestedLastModifiedTime', (breakout) => {
|
|
150
154
|
this.triggerReturnToMainEvent(breakout);
|
|
151
155
|
});
|
|
156
|
+
this.listenTo(
|
|
157
|
+
this,
|
|
158
|
+
BREAKOUTS.EVENTS.LLM_CONNECT_RESPONSE,
|
|
159
|
+
this.handleLLMBreakoutJoinResponseMetric
|
|
160
|
+
);
|
|
152
161
|
this.listenToCurrentSessionTypeChange();
|
|
153
162
|
this.listenToBreakoutRosters();
|
|
154
163
|
this.listenToBreakoutHelp();
|
|
164
|
+
// LLM may connect after locusUrlUpdate has already run, so re-check the broadcast subscription on connect
|
|
165
|
+
this.listenTo(this.webex.internal.llm, 'online', () => this.listenToBroadcastMessages());
|
|
155
166
|
// @ts-ignore
|
|
156
167
|
this.breakoutRequest = new BreakoutRequest({webex: this.webex});
|
|
157
168
|
},
|
|
@@ -253,16 +264,44 @@ const Breakouts = WebexPlugin.extend({
|
|
|
253
264
|
);
|
|
254
265
|
},
|
|
255
266
|
|
|
267
|
+
/**
|
|
268
|
+
* Registers the LLM channel for broadcast messages
|
|
269
|
+
* @param {LLMChannel} channel - The LLM channel to use for breakout messages
|
|
270
|
+
* @returns {void}
|
|
271
|
+
*/
|
|
272
|
+
registerLLMChannel(channel: LLMChannel) {
|
|
273
|
+
// If already subscribed to a previous channel, clean it up
|
|
274
|
+
if (this.hasSubscribedToMessage && this._llmChannel) {
|
|
275
|
+
this.stopListening(this._llmChannel);
|
|
276
|
+
this.hasSubscribedToMessage = false;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
this._llmChannel = channel;
|
|
280
|
+
this.listenToBroadcastMessages();
|
|
281
|
+
},
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Unregisters the LLM channel
|
|
285
|
+
* @returns {void}
|
|
286
|
+
*/
|
|
287
|
+
unregisterLLMChannel() {
|
|
288
|
+
if (this._llmChannel) {
|
|
289
|
+
this.stopListening(this._llmChannel);
|
|
290
|
+
this._llmChannel = undefined;
|
|
291
|
+
this.hasSubscribedToMessage = false;
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
|
|
256
295
|
/**
|
|
257
296
|
* Sets up listener for broadcast messages sent to the breakout session
|
|
258
297
|
* @returns {void}
|
|
259
298
|
*/
|
|
260
299
|
listenToBroadcastMessages() {
|
|
261
|
-
if (!this.
|
|
300
|
+
if (!this._llmChannel?.isConnected() || this.hasSubscribedToMessage) {
|
|
262
301
|
return;
|
|
263
302
|
}
|
|
264
303
|
|
|
265
|
-
this.listenTo(this.
|
|
304
|
+
this.listenTo(this._llmChannel, 'event:breakout.message', (event) => {
|
|
266
305
|
const {
|
|
267
306
|
data: {senderUserId, sentTime, message},
|
|
268
307
|
} = event;
|
|
@@ -327,7 +366,10 @@ const Breakouts = WebexPlugin.extend({
|
|
|
327
366
|
* @returns {void}
|
|
328
367
|
*/
|
|
329
368
|
updateBreakout(params) {
|
|
369
|
+
const breakoutMoveId = params.breakoutMoveId || this.breakoutMoveId;
|
|
370
|
+
|
|
330
371
|
this.set(params);
|
|
372
|
+
this.set('breakoutMoveId', breakoutMoveId);
|
|
331
373
|
// These values are set manually so they are unset when they are not included in params
|
|
332
374
|
this.set('groups', params.groups);
|
|
333
375
|
this.set('startTime', params.startTime);
|
|
@@ -340,6 +382,7 @@ const Breakouts = WebexPlugin.extend({
|
|
|
340
382
|
current: true,
|
|
341
383
|
sessionType: params.sessionType,
|
|
342
384
|
url: params.url,
|
|
385
|
+
resourceLink: params.resourceLink,
|
|
343
386
|
[BREAKOUTS.SESSION_STATES.ACTIVE]: false,
|
|
344
387
|
[BREAKOUTS.SESSION_STATES.ALLOWED]: false,
|
|
345
388
|
[BREAKOUTS.SESSION_STATES.ASSIGNED]: false,
|
|
@@ -361,12 +404,81 @@ const Breakouts = WebexPlugin.extend({
|
|
|
361
404
|
{
|
|
362
405
|
currentSession: this.currentBreakoutSession,
|
|
363
406
|
meeting,
|
|
364
|
-
breakoutMoveId
|
|
407
|
+
breakoutMoveId,
|
|
365
408
|
},
|
|
366
409
|
// @ts-ignore
|
|
367
410
|
this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
|
|
368
411
|
);
|
|
369
412
|
}
|
|
413
|
+
|
|
414
|
+
this.submitLLMBreakoutJoinResponseMetric();
|
|
415
|
+
},
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* Stores the latest LLM connect response and tries to send the LLM-enhanced breakout join response.
|
|
419
|
+
* The breakout update and the LLM response are delivered independently, so either side can arrive first.
|
|
420
|
+
* @param {Object} eventInfo LLM connect response info
|
|
421
|
+
* @param {Object} eventInfo.meeting meeting instance
|
|
422
|
+
* @param {Object} eventInfo.llmLatency LLM latency values
|
|
423
|
+
* @param {Object} [eventInfo.error] LLM connection error
|
|
424
|
+
* @returns {void}
|
|
425
|
+
*/
|
|
426
|
+
handleLLMBreakoutJoinResponseMetric(eventInfo: any) {
|
|
427
|
+
this.llmBreakoutJoinResponseInfo = {
|
|
428
|
+
...eventInfo,
|
|
429
|
+
breakoutMoveId: this.breakoutMoveId,
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
this.submitLLMBreakoutJoinResponseMetric();
|
|
433
|
+
},
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* Sends the LLM-enhanced breakout join response metric when both breakout state and LLM latency
|
|
437
|
+
* are available. LLM reconnects can also happen while leaving a breakout, before stale breakout
|
|
438
|
+
* fields are fully cleared, so the joined-session check lives with the breakout state.
|
|
439
|
+
*
|
|
440
|
+
* The joined session changes both when joining a breakout and when returning to the main
|
|
441
|
+
* session, and the client reconnects LLM in both directions. Mirroring the desktop client, we
|
|
442
|
+
* emit the join response for either transition, so the active-breakout check also accepts the
|
|
443
|
+
* main session. Non-breakout meetings never carry a breakoutMoveId, and a given move id is
|
|
444
|
+
* reported at most once, so accepting the main session here cannot leak spurious events.
|
|
445
|
+
* @returns {void}
|
|
446
|
+
*/
|
|
447
|
+
submitLLMBreakoutJoinResponseMetric() {
|
|
448
|
+
const eventInfo = this.llmBreakoutJoinResponseInfo;
|
|
449
|
+
|
|
450
|
+
// The breakout update and the LLM response arrive independently, so only emit once both the
|
|
451
|
+
// breakout move and its matching LLM latency are available for a session we have actually joined.
|
|
452
|
+
const hasMatchingMoveId =
|
|
453
|
+
!!this.breakoutMoveId && eventInfo?.breakoutMoveId === this.breakoutMoveId;
|
|
454
|
+
const hasSessionIdentifiers =
|
|
455
|
+
!!this.currentBreakoutSession?.sessionId && !!this.currentBreakoutSession?.groupId;
|
|
456
|
+
// isActiveBreakout already covers an open/closing breakout; isInMainSession covers return-to-main.
|
|
457
|
+
const isJoinedSession = this.isActiveBreakout || this.isInMainSession;
|
|
458
|
+
|
|
459
|
+
if (!eventInfo || !hasMatchingMoveId || !hasSessionIdentifiers || !isJoinedSession) {
|
|
460
|
+
return;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
const {llmLatency, error} = eventInfo;
|
|
464
|
+
const meeting = eventInfo.meeting || this.webex.meetings.getMeetingByType(_ID_, this.meetingId);
|
|
465
|
+
// @ts-ignore
|
|
466
|
+
const llmWebsocketUrl = this.webex.internal.llm.getWebSocketUrl?.() || undefined;
|
|
467
|
+
|
|
468
|
+
breakoutEvent.onBreakoutJoinResponse(
|
|
469
|
+
{
|
|
470
|
+
currentSession: this.currentBreakoutSession,
|
|
471
|
+
meeting,
|
|
472
|
+
breakoutMoveId: this.breakoutMoveId,
|
|
473
|
+
llmLatency,
|
|
474
|
+
llmWebsocketUrl,
|
|
475
|
+
error,
|
|
476
|
+
},
|
|
477
|
+
// @ts-ignore
|
|
478
|
+
this.webex.internal.newMetrics.submitClientEvent.bind(this.webex.internal.newMetrics)
|
|
479
|
+
);
|
|
480
|
+
|
|
481
|
+
this.llmBreakoutJoinResponseInfo = undefined;
|
|
370
482
|
},
|
|
371
483
|
|
|
372
484
|
/**
|
|
@@ -985,6 +1097,36 @@ const Breakouts = WebexPlugin.extend({
|
|
|
985
1097
|
body,
|
|
986
1098
|
});
|
|
987
1099
|
},
|
|
1100
|
+
/**
|
|
1101
|
+
* Remove participants from their current breakout session back to the main session
|
|
1102
|
+
* @param {string[]} participants - participant IDs to remove from breakout
|
|
1103
|
+
* @returns {Promise}
|
|
1104
|
+
*/
|
|
1105
|
+
removeFromBreakout(participants: string[]) {
|
|
1106
|
+
if (!this.mainGroupId || !this.mainSessionId) {
|
|
1107
|
+
throw new Error(
|
|
1108
|
+
'Main group ID and session ID must be available to remove participants from breakout'
|
|
1109
|
+
);
|
|
1110
|
+
}
|
|
1111
|
+
|
|
1112
|
+
return this.request({
|
|
1113
|
+
method: HTTP_VERBS.POST,
|
|
1114
|
+
uri: `${this.url}/move`,
|
|
1115
|
+
body: {
|
|
1116
|
+
groups: [
|
|
1117
|
+
{
|
|
1118
|
+
id: this.mainGroupId,
|
|
1119
|
+
sessions: [
|
|
1120
|
+
{
|
|
1121
|
+
id: this.mainSessionId,
|
|
1122
|
+
participants,
|
|
1123
|
+
},
|
|
1124
|
+
],
|
|
1125
|
+
},
|
|
1126
|
+
],
|
|
1127
|
+
},
|
|
1128
|
+
});
|
|
1129
|
+
},
|
|
988
1130
|
/**
|
|
989
1131
|
* trigger ASK_RETURN_TO_MAIN event when main session requested
|
|
990
1132
|
* @param {Object} breakout
|
|
@@ -157,19 +157,66 @@ WebExMeetingsErrors[IceGatheringFailed.CODE] = IceGatheringFailed;
|
|
|
157
157
|
class AddMediaFailed extends WebexMeetingsError {
|
|
158
158
|
static CODE = 30203;
|
|
159
159
|
cause?: Error;
|
|
160
|
+
connectionType?: string;
|
|
161
|
+
selectedCandidatePairChanges?: number;
|
|
162
|
+
numTransports?: number;
|
|
163
|
+
iceConnected?: boolean;
|
|
160
164
|
|
|
161
165
|
/**
|
|
162
166
|
* Creates a new AddMediaFailed error
|
|
163
|
-
* @param {
|
|
167
|
+
* @param {Object} options
|
|
168
|
+
* @param {Error} [options.cause] - The underlying error that caused the media addition to fail
|
|
169
|
+
* @param {string} [options.connectionType] - The ICE connection type at the time of failure (e.g. 'UDP', 'TURN-TLS')
|
|
170
|
+
* @param {number} [options.selectedCandidatePairChanges] - Number of times the selected candidate pair changed
|
|
171
|
+
* @param {number} [options.numTransports] - Number of ICE transports
|
|
172
|
+
* @param {boolean} [options.iceConnected] - Whether ICE connection was established before the failure
|
|
164
173
|
*/
|
|
165
|
-
constructor(
|
|
174
|
+
constructor(
|
|
175
|
+
options: {
|
|
176
|
+
cause?: Error;
|
|
177
|
+
connectionType?: string;
|
|
178
|
+
selectedCandidatePairChanges?: number;
|
|
179
|
+
numTransports?: number;
|
|
180
|
+
iceConnected?: boolean;
|
|
181
|
+
} = {}
|
|
182
|
+
) {
|
|
166
183
|
super(AddMediaFailed.CODE, 'Failed to add media');
|
|
167
|
-
this.cause = cause;
|
|
184
|
+
this.cause = options.cause;
|
|
185
|
+
this.connectionType = options.connectionType;
|
|
186
|
+
this.selectedCandidatePairChanges = options.selectedCandidatePairChanges;
|
|
187
|
+
this.numTransports = options.numTransports;
|
|
188
|
+
this.iceConnected = options.iceConnected;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Returns true if the failure was due to a DTLS handshake failure
|
|
193
|
+
* (ICE connected successfully but the overall media connection failed).
|
|
194
|
+
*/
|
|
195
|
+
get isDtlsHandshakeFailure(): boolean {
|
|
196
|
+
return this.iceConnected === true;
|
|
168
197
|
}
|
|
169
198
|
}
|
|
170
199
|
export {AddMediaFailed};
|
|
171
200
|
WebExMeetingsErrors[AddMediaFailed.CODE] = AddMediaFailed;
|
|
172
201
|
|
|
202
|
+
/**
|
|
203
|
+
* @class MediaConnectionTimedOutError
|
|
204
|
+
* @classdesc Internal error thrown when the media connection times out waiting to connect.
|
|
205
|
+
*/
|
|
206
|
+
class MediaConnectionTimedOutError extends Error {
|
|
207
|
+
iceConnected: boolean;
|
|
208
|
+
|
|
209
|
+
cause?: any;
|
|
210
|
+
|
|
211
|
+
constructor(message: string, iceConnected: boolean, cause?: any) {
|
|
212
|
+
super(message);
|
|
213
|
+
this.name = 'MediaConnectionTimedOutError';
|
|
214
|
+
this.iceConnected = iceConnected;
|
|
215
|
+
this.cause = cause;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
export {MediaConnectionTimedOutError};
|
|
219
|
+
|
|
173
220
|
/**
|
|
174
221
|
* @class SdpResponseTimeoutError
|
|
175
222
|
* @classdesc Raised whenever we timeout waiting for remote SDP answer
|
package/src/config.ts
CHANGED
|
@@ -82,16 +82,17 @@ export default {
|
|
|
82
82
|
enableExtmap: false,
|
|
83
83
|
enableAutomaticLLM: false,
|
|
84
84
|
installedOrgID: undefined,
|
|
85
|
+
multipartSitePrefixList: ['.my.', '.mydmz.', '.mybts.', '.mydev.', '.myats2.', '.myats.'],
|
|
85
86
|
experimental: {
|
|
86
87
|
enableMediaNegotiatedEvent: false,
|
|
87
88
|
enableUnifiedMeetings: true,
|
|
88
89
|
enableAdhocMeetings: true,
|
|
89
|
-
|
|
90
|
-
enableTlsReachability: false,
|
|
90
|
+
storeLocusHashTreeEventsForDebugging: false,
|
|
91
91
|
},
|
|
92
92
|
degradationPreferences: {
|
|
93
93
|
maxMacroblocksLimit: 8192,
|
|
94
94
|
},
|
|
95
|
+
enableAv1SlidesSupport: false,
|
|
95
96
|
// This only applies to non-multistream meetings
|
|
96
97
|
iceCandidatesGatheringTimeout: undefined,
|
|
97
98
|
backendIpv6NativeSupport: false,
|
|
@@ -101,5 +102,8 @@ export default {
|
|
|
101
102
|
stopIceGatheringAfterFirstRelayCandidate: false,
|
|
102
103
|
enableAudioTwccForMultistream: false,
|
|
103
104
|
enablePerUdpUrlReachability: false, // true: separate peer connection per each UDP URL; false: single peer connection for all URLs
|
|
105
|
+
locus: {
|
|
106
|
+
excludedDataSets: ['attendees'], // attendees data set only applies to webinar attendees and we never really need that
|
|
107
|
+
},
|
|
104
108
|
},
|
|
105
109
|
};
|