@webex/plugin-meetings 3.11.0 → 3.12.0-metrics-init-fix-3.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/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 +14 -5
- 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 +90 -3
- 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 +350 -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 +911 -211
- 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 +2276 -1067
- 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/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 +245 -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 +585 -164
- 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 +27 -7
- package/src/breakouts/breakout.ts +3 -1
- package/src/breakouts/events.ts +33 -11
- package/src/breakouts/index.ts +110 -1
- 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 +246 -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 +975 -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 +1272 -164
- 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 +448 -11
- 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 +69 -7
- 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 +191 -2
- 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 +406 -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 +1848 -164
- 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 +3706 -405
- 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 +837 -39
- package/test/unit/spec/webinar/utils.ts +39 -0
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import {SELF_ROLES, DISPLAY_HINTS, INTERSTITIAL_DISPLAY_HINTS} from '../constants';
|
|
2
2
|
|
|
3
|
+
// these values have to match what Locus sends us
|
|
4
|
+
export enum DisplayHintSection {
|
|
5
|
+
JOINED = 'joined',
|
|
6
|
+
MODERATOR = 'moderator',
|
|
7
|
+
COHOST = 'coHost',
|
|
8
|
+
PRESENTER = 'presenter',
|
|
9
|
+
PANELIST = 'panelist',
|
|
10
|
+
ATTENDEE = 'attendee',
|
|
11
|
+
}
|
|
12
|
+
|
|
3
13
|
const InfoUtils: any = {};
|
|
4
14
|
|
|
5
15
|
InfoUtils.parse = (info, roles, isJoined = true) => {
|
|
@@ -7,6 +17,9 @@ InfoUtils.parse = (info, roles, isJoined = true) => {
|
|
|
7
17
|
policy: InfoUtils.parsePolicy(info),
|
|
8
18
|
moderator: InfoUtils.parseModerator(info),
|
|
9
19
|
coHost: InfoUtils.parseCoHost(info),
|
|
20
|
+
presenter: InfoUtils.parsePresenter(info),
|
|
21
|
+
panelist: InfoUtils.parsePanelist(info),
|
|
22
|
+
attendee: InfoUtils.parseAttendee(info),
|
|
10
23
|
};
|
|
11
24
|
|
|
12
25
|
let userDisplayHints = isJoined
|
|
@@ -27,6 +40,18 @@ InfoUtils.parse = (info, roles, isJoined = true) => {
|
|
|
27
40
|
userDisplayHints = {...userDisplayHints, ...parsed.moderator};
|
|
28
41
|
}
|
|
29
42
|
|
|
43
|
+
if (roles.includes(SELF_ROLES.PRESENTER)) {
|
|
44
|
+
userDisplayHints = {...userDisplayHints, ...parsed.presenter};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
if (roles.includes(SELF_ROLES.PANELIST)) {
|
|
48
|
+
userDisplayHints = {...userDisplayHints, ...parsed.panelist};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (roles.includes(SELF_ROLES.ATTENDEE)) {
|
|
52
|
+
userDisplayHints = {...userDisplayHints, ...parsed.attendee};
|
|
53
|
+
}
|
|
54
|
+
|
|
30
55
|
parsed.userDisplayHints = Object.keys(userDisplayHints);
|
|
31
56
|
|
|
32
57
|
if (info.sipUri) {
|
|
@@ -44,8 +69,8 @@ InfoUtils.parse = (info, roles, isJoined = true) => {
|
|
|
44
69
|
return parsed;
|
|
45
70
|
};
|
|
46
71
|
|
|
47
|
-
InfoUtils.parseDisplayHintSection = (info, displayHintKey) => {
|
|
48
|
-
const displayHints = {};
|
|
72
|
+
InfoUtils.parseDisplayHintSection = (info: any, displayHintKey: DisplayHintSection) => {
|
|
73
|
+
const displayHints: Record<string, boolean> = {};
|
|
49
74
|
|
|
50
75
|
if (
|
|
51
76
|
info &&
|
|
@@ -53,7 +78,7 @@ InfoUtils.parseDisplayHintSection = (info, displayHintKey) => {
|
|
|
53
78
|
info.displayHints[displayHintKey] &&
|
|
54
79
|
info.displayHints[displayHintKey].length > 0
|
|
55
80
|
) {
|
|
56
|
-
info.displayHints[displayHintKey].forEach((key) => {
|
|
81
|
+
info.displayHints[displayHintKey].forEach((key: any) => {
|
|
57
82
|
displayHints[key] = true;
|
|
58
83
|
});
|
|
59
84
|
}
|
|
@@ -61,20 +86,30 @@ InfoUtils.parseDisplayHintSection = (info, displayHintKey) => {
|
|
|
61
86
|
return displayHints;
|
|
62
87
|
};
|
|
63
88
|
|
|
64
|
-
InfoUtils.parsePolicy = (info) =>
|
|
89
|
+
InfoUtils.parsePolicy = (info) =>
|
|
90
|
+
InfoUtils.parseDisplayHintSection(info, DisplayHintSection.JOINED);
|
|
65
91
|
|
|
66
92
|
InfoUtils.parseModerator = (info) => {
|
|
67
|
-
const displayHints = InfoUtils.parseDisplayHintSection(info,
|
|
93
|
+
const displayHints = InfoUtils.parseDisplayHintSection(info, DisplayHintSection.MODERATOR);
|
|
68
94
|
|
|
69
95
|
return {...displayHints, [DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND]: true};
|
|
70
96
|
};
|
|
71
97
|
|
|
72
98
|
InfoUtils.parseCoHost = (info) => {
|
|
73
|
-
const displayHints = InfoUtils.parseDisplayHintSection(info,
|
|
99
|
+
const displayHints = InfoUtils.parseDisplayHintSection(info, DisplayHintSection.COHOST);
|
|
74
100
|
|
|
75
101
|
return {...displayHints, [DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND]: true};
|
|
76
102
|
};
|
|
77
103
|
|
|
104
|
+
InfoUtils.parsePresenter = (info) =>
|
|
105
|
+
InfoUtils.parseDisplayHintSection(info, DisplayHintSection.PRESENTER);
|
|
106
|
+
|
|
107
|
+
InfoUtils.parsePanelist = (info) =>
|
|
108
|
+
InfoUtils.parseDisplayHintSection(info, DisplayHintSection.PANELIST);
|
|
109
|
+
|
|
110
|
+
InfoUtils.parseAttendee = (info) =>
|
|
111
|
+
InfoUtils.parseDisplayHintSection(info, DisplayHintSection.ATTENDEE);
|
|
112
|
+
|
|
78
113
|
InfoUtils.isLocked = (policy) => policy.LOCK_STATUS_LOCKED || false;
|
|
79
114
|
|
|
80
115
|
InfoUtils.isUnlocked = (policy) => policy.LOCK_STATUS_UNLOCKED || false;
|
|
@@ -138,6 +138,7 @@ const SelfUtils = {
|
|
|
138
138
|
updates.breakoutsChanged = SelfUtils.breakoutsChanged(previous, current);
|
|
139
139
|
updates.interpretationChanged = SelfUtils.interpretationChanged(previous, current);
|
|
140
140
|
updates.brbChanged = SelfUtils.brbChanged(previous, current);
|
|
141
|
+
updates.selfIdChanged = previous?.selfId !== current.selfId;
|
|
141
142
|
|
|
142
143
|
return {
|
|
143
144
|
previous,
|
package/src/locus-info/types.ts
CHANGED
|
@@ -1,15 +1,33 @@
|
|
|
1
|
+
import {Enum} from '../constants';
|
|
1
2
|
import {HtMeta} from '../hashTree/types';
|
|
2
3
|
|
|
4
|
+
export const EndMeetingReason = {
|
|
5
|
+
maxMeetingDuration: 'MAX_MEETING_DURATION',
|
|
6
|
+
allParticipantsLeft: 'ALL_PARTICIPANTS_LEFT',
|
|
7
|
+
sipHostLeft: 'SIP_HOST_LEFT',
|
|
8
|
+
noHost: 'NO_HOST',
|
|
9
|
+
waitingForMpsEndMeetingTimeout: 'WAITING_FOR_MPS_END_MEETING_TIMEOUT',
|
|
10
|
+
fraudDetection: 'FRAUD_DETECTION',
|
|
11
|
+
meetingEndedByHost: 'MEETING_ENDED_BY_HOST',
|
|
12
|
+
meetingUpdated: 'MEETING_UPDATED', // Locus code has comment about EndMeetingIfPossible reason for this one
|
|
13
|
+
meetingCancelled: 'MEETING_CANCELLED', // Locus code has comment about EndMeetingIfPossible reason for this one
|
|
14
|
+
autoEndWithSingleParticipant: 'AUTO_END_WITH_SINGLE_PARTICIPANT',
|
|
15
|
+
breakoutEnded: 'BREAKOUT_ENDED', // indicates that only a breakout session ended, not the whole meeting
|
|
16
|
+
} as const;
|
|
17
|
+
|
|
18
|
+
export type EndMeetingReason = Enum<typeof EndMeetingReason>;
|
|
19
|
+
|
|
3
20
|
export type LocusFullState = {
|
|
4
21
|
active: boolean;
|
|
5
22
|
count: number;
|
|
6
23
|
lastActive: string;
|
|
7
24
|
locked: boolean;
|
|
8
25
|
sessionId: string;
|
|
9
|
-
|
|
26
|
+
sessionIds: string[];
|
|
10
27
|
startTime: number;
|
|
11
28
|
state: string;
|
|
12
29
|
type: string;
|
|
30
|
+
endMeetingReason?: EndMeetingReason;
|
|
13
31
|
};
|
|
14
32
|
|
|
15
33
|
export type Links = {
|
|
@@ -19,6 +37,7 @@ export type Links = {
|
|
|
19
37
|
|
|
20
38
|
export type LocusDTO = {
|
|
21
39
|
controls?: any;
|
|
40
|
+
embeddedApps?: any[];
|
|
22
41
|
fullState?: LocusFullState;
|
|
23
42
|
host?: {
|
|
24
43
|
id: string;
|
|
@@ -31,6 +50,7 @@ export type LocusDTO = {
|
|
|
31
50
|
info?: any;
|
|
32
51
|
jsSdkMeta?: {
|
|
33
52
|
removedParticipantIds: string[]; // list of ids of participants that are removed in the last update
|
|
53
|
+
forceReplaceMembers?: boolean; // when true, forces a full replacement of meeting members (e.g. when switching to a new hash tree parser - when moving between breakouts)
|
|
34
54
|
};
|
|
35
55
|
links?: Links;
|
|
36
56
|
mediaShares?: any[];
|
|
@@ -51,3 +71,15 @@ export type LocusDTO = {
|
|
|
51
71
|
syncUrl?: string;
|
|
52
72
|
url?: string;
|
|
53
73
|
};
|
|
74
|
+
|
|
75
|
+
export type ReplacesInfo = {
|
|
76
|
+
locusUrl: string;
|
|
77
|
+
replacedAt: string;
|
|
78
|
+
sessionId: string;
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
export const LocusErrorCodes = {
|
|
82
|
+
LOCUS_INACTIVE: 2403004,
|
|
83
|
+
} as const;
|
|
84
|
+
|
|
85
|
+
export type LocusErrorCodes = Enum<typeof LocusErrorCodes>;
|
|
@@ -2,9 +2,16 @@ import {Defer} from '@webex/common';
|
|
|
2
2
|
import {ConnectionState, MediaConnectionEventNames} from '@webex/internal-media-core';
|
|
3
3
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
4
4
|
import {ICE_AND_DTLS_CONNECTION_TIMEOUT} from '../constants';
|
|
5
|
+
import BEHAVIORAL_METRICS from '../metrics/constants';
|
|
6
|
+
import Metrics from '../metrics';
|
|
5
7
|
|
|
6
8
|
export interface MediaConnectionAwaiterProps {
|
|
7
9
|
webrtcMediaConnection: any;
|
|
10
|
+
correlationId: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface FailureResult {
|
|
14
|
+
iceConnected: boolean;
|
|
8
15
|
}
|
|
9
16
|
|
|
10
17
|
/**
|
|
@@ -16,6 +23,7 @@ export default class MediaConnectionAwaiter {
|
|
|
16
23
|
private defer: Defer;
|
|
17
24
|
private retried: boolean;
|
|
18
25
|
private iceConnected: boolean;
|
|
26
|
+
private correlationId: string;
|
|
19
27
|
private onTimeoutCallback: () => void;
|
|
20
28
|
private peerConnectionStateCallback: () => void;
|
|
21
29
|
private iceConnectionStateCallback: () => void;
|
|
@@ -24,11 +32,12 @@ export default class MediaConnectionAwaiter {
|
|
|
24
32
|
/**
|
|
25
33
|
* @param {MediaConnectionAwaiterProps} mediaConnectionAwaiterProps
|
|
26
34
|
*/
|
|
27
|
-
constructor({webrtcMediaConnection}: MediaConnectionAwaiterProps) {
|
|
35
|
+
constructor({webrtcMediaConnection, correlationId}: MediaConnectionAwaiterProps) {
|
|
28
36
|
this.webrtcMediaConnection = webrtcMediaConnection;
|
|
29
37
|
this.defer = new Defer();
|
|
30
38
|
this.retried = false;
|
|
31
39
|
this.iceConnected = false;
|
|
40
|
+
this.correlationId = correlationId;
|
|
32
41
|
this.onTimeoutCallback = this.onTimeout.bind(this);
|
|
33
42
|
this.peerConnectionStateCallback = this.peerConnectionStateHandler.bind(this);
|
|
34
43
|
this.iceConnectionStateCallback = this.iceConnectionStateHandler.bind(this);
|
|
@@ -53,6 +62,17 @@ export default class MediaConnectionAwaiter {
|
|
|
53
62
|
return this.webrtcMediaConnection.getConnectionState() === ConnectionState.Failed;
|
|
54
63
|
}
|
|
55
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Returns true if ICE connection state indicates connectivity.
|
|
67
|
+
*
|
|
68
|
+
* @returns {boolean}
|
|
69
|
+
*/
|
|
70
|
+
private isIceConnected(): boolean {
|
|
71
|
+
const state = this.webrtcMediaConnection.getIceConnectionState();
|
|
72
|
+
|
|
73
|
+
return state === 'connected' || state === 'completed';
|
|
74
|
+
}
|
|
75
|
+
|
|
56
76
|
/**
|
|
57
77
|
* Returns true if the ICE Gathering is completed, false otherwise.
|
|
58
78
|
*
|
|
@@ -100,7 +120,7 @@ export default class MediaConnectionAwaiter {
|
|
|
100
120
|
|
|
101
121
|
this.defer.reject({
|
|
102
122
|
iceConnected: this.iceConnected,
|
|
103
|
-
});
|
|
123
|
+
} satisfies FailureResult);
|
|
104
124
|
}
|
|
105
125
|
|
|
106
126
|
if (!this.isConnected()) {
|
|
@@ -143,7 +163,7 @@ export default class MediaConnectionAwaiter {
|
|
|
143
163
|
`Media:MediaConnectionAwaiter#iceConnectionStateHandler --> ICE connection state change -> ${iceConnectionState}`
|
|
144
164
|
);
|
|
145
165
|
|
|
146
|
-
if (
|
|
166
|
+
if (this.isIceConnected() && !this.iceConnected) {
|
|
147
167
|
this.iceConnected = true;
|
|
148
168
|
}
|
|
149
169
|
|
|
@@ -175,6 +195,32 @@ export default class MediaConnectionAwaiter {
|
|
|
175
195
|
this.timer = setTimeout(this.onTimeoutCallback, ICE_AND_DTLS_CONNECTION_TIMEOUT);
|
|
176
196
|
}
|
|
177
197
|
|
|
198
|
+
/**
|
|
199
|
+
* sends a metric with some additional info that might help debugging
|
|
200
|
+
* issues where browser doesn't update the RTCPeerConnection's iceConnectionState or connectionState
|
|
201
|
+
*
|
|
202
|
+
* @returns {void}
|
|
203
|
+
*/
|
|
204
|
+
async sendMetric() {
|
|
205
|
+
const stats = await this.webrtcMediaConnection.getStats();
|
|
206
|
+
|
|
207
|
+
// in theory we can end up with more than one transport report in the stats,
|
|
208
|
+
// but for the purpose of this metric it's fine to just use the first one
|
|
209
|
+
const transportReports = Array.from(
|
|
210
|
+
stats.values().filter((report) => report.type === 'transport')
|
|
211
|
+
) as Record<string, number | string>[];
|
|
212
|
+
|
|
213
|
+
Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.MEDIA_STILL_NOT_CONNECTED, {
|
|
214
|
+
correlation_id: this.correlationId,
|
|
215
|
+
numTransports: transportReports.length,
|
|
216
|
+
dtlsState: transportReports[0]?.dtlsState,
|
|
217
|
+
iceState: transportReports[0]?.iceState,
|
|
218
|
+
packetsSent: transportReports[0]?.packetsSent,
|
|
219
|
+
packetsReceived: transportReports[0]?.packetsReceived,
|
|
220
|
+
dataChannelState: this.webrtcMediaConnection.multistreamConnection?.dataChannel?.readyState,
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
|
|
178
224
|
/**
|
|
179
225
|
* Function called when the timeout is reached.
|
|
180
226
|
*
|
|
@@ -189,6 +235,8 @@ export default class MediaConnectionAwaiter {
|
|
|
189
235
|
return;
|
|
190
236
|
}
|
|
191
237
|
|
|
238
|
+
this.sendMetric();
|
|
239
|
+
|
|
192
240
|
if (!this.isIceGatheringCompleted()) {
|
|
193
241
|
if (!this.retried) {
|
|
194
242
|
LoggerProxy.logger.warn(
|
|
@@ -216,18 +264,27 @@ export default class MediaConnectionAwaiter {
|
|
|
216
264
|
|
|
217
265
|
this.defer.reject({
|
|
218
266
|
iceConnected: this.iceConnected,
|
|
219
|
-
});
|
|
267
|
+
} satisfies FailureResult);
|
|
220
268
|
}
|
|
221
269
|
|
|
222
270
|
/**
|
|
223
271
|
* Waits for the webrtc media connection to be connected.
|
|
224
272
|
*
|
|
225
|
-
* @returns {Promise}
|
|
273
|
+
* @returns {Promise<void>} In case of failure, the promise is rejected with FailureResult
|
|
226
274
|
*/
|
|
227
275
|
waitForMediaConnectionConnected(): Promise<void> {
|
|
228
276
|
if (this.isConnected()) {
|
|
277
|
+
LoggerProxy.logger.log(
|
|
278
|
+
'Media:MediaConnectionAwaiter#waitForMediaConnectionConnected --> Already connected'
|
|
279
|
+
);
|
|
280
|
+
|
|
229
281
|
return Promise.resolve();
|
|
230
282
|
}
|
|
283
|
+
LoggerProxy.logger.log(
|
|
284
|
+
'Media:MediaConnectionAwaiter#waitForMediaConnectionConnected --> Waiting for media connection to be connected'
|
|
285
|
+
);
|
|
286
|
+
|
|
287
|
+
this.iceConnected = this.isIceConnected();
|
|
231
288
|
|
|
232
289
|
this.webrtcMediaConnection.on(
|
|
233
290
|
MediaConnectionEventNames.PEER_CONNECTION_STATE_CHANGED,
|
package/src/media/index.ts
CHANGED
|
@@ -142,9 +142,11 @@ Media.createMediaConnection = (
|
|
|
142
142
|
enableExtmap?: boolean;
|
|
143
143
|
turnServerInfo?: TurnServerInfo;
|
|
144
144
|
bundlePolicy?: BundlePolicy;
|
|
145
|
+
iceTransportPolicy?: RTCIceTransportPolicy;
|
|
145
146
|
iceCandidatesTimeout?: number;
|
|
146
147
|
disableAudioMainDtx?: boolean;
|
|
147
148
|
enableAudioTwcc?: boolean;
|
|
149
|
+
enableAv1SlidesSupport?: boolean;
|
|
148
150
|
stopIceGatheringAfterFirstRelayCandidate?: boolean;
|
|
149
151
|
}
|
|
150
152
|
) => {
|
|
@@ -156,16 +158,18 @@ Media.createMediaConnection = (
|
|
|
156
158
|
enableExtmap,
|
|
157
159
|
turnServerInfo,
|
|
158
160
|
bundlePolicy,
|
|
161
|
+
iceTransportPolicy,
|
|
159
162
|
iceCandidatesTimeout,
|
|
160
163
|
disableAudioMainDtx,
|
|
161
164
|
enableAudioTwcc,
|
|
165
|
+
enableAv1SlidesSupport,
|
|
162
166
|
stopIceGatheringAfterFirstRelayCandidate,
|
|
163
167
|
} = options;
|
|
164
168
|
|
|
165
169
|
const iceServers = [];
|
|
166
170
|
|
|
167
171
|
// we might not have any TURN server if TURN discovery failed or wasn't done or we land on a video mesh node
|
|
168
|
-
if (turnServerInfo
|
|
172
|
+
if (turnServerInfo && turnServerInfo.urls.length > 0) {
|
|
169
173
|
// TURN-TLS server
|
|
170
174
|
iceServers.push({
|
|
171
175
|
urls: turnServerInfo.urls,
|
|
@@ -178,12 +182,17 @@ Media.createMediaConnection = (
|
|
|
178
182
|
const config: MultistreamConnectionConfig = {
|
|
179
183
|
iceServers,
|
|
180
184
|
disableAudioTwcc: !enableAudioTwcc,
|
|
185
|
+
enableAV1SlidesSupport: !!enableAv1SlidesSupport,
|
|
181
186
|
};
|
|
182
187
|
|
|
183
188
|
if (bundlePolicy) {
|
|
184
189
|
config.bundlePolicy = bundlePolicy;
|
|
185
190
|
}
|
|
186
191
|
|
|
192
|
+
if (iceTransportPolicy) {
|
|
193
|
+
config.iceTransportPolicy = iceTransportPolicy;
|
|
194
|
+
}
|
|
195
|
+
|
|
187
196
|
if (disableAudioMainDtx !== undefined) {
|
|
188
197
|
config.disableAudioMainDtx = disableAudioMainDtx;
|
|
189
198
|
}
|
package/src/media/properties.ts
CHANGED
|
@@ -43,6 +43,7 @@ export default class MediaProperties {
|
|
|
43
43
|
shareAudioStream?: LocalSystemAudioStream;
|
|
44
44
|
videoDeviceId: any;
|
|
45
45
|
videoStream?: LocalCameraStream;
|
|
46
|
+
srtpCipher: string | undefined;
|
|
46
47
|
namespace = MEETINGS;
|
|
47
48
|
mediaIssueCounters: {[key: string]: number} = {};
|
|
48
49
|
throttledSendMediaIssueMetric: ReturnType<typeof throttle>;
|
|
@@ -196,11 +197,13 @@ export default class MediaProperties {
|
|
|
196
197
|
/**
|
|
197
198
|
* Waits for the webrtc media connection to be connected.
|
|
198
199
|
*
|
|
200
|
+
* @param {string} correlationId
|
|
199
201
|
* @returns {Promise<void>}
|
|
200
202
|
*/
|
|
201
|
-
waitForMediaConnectionConnected(): Promise<void> {
|
|
203
|
+
waitForMediaConnectionConnected(correlationId: string): Promise<void> {
|
|
202
204
|
const mediaConnectionAwaiter = new MediaConnectionAwaiter({
|
|
203
205
|
webrtcMediaConnection: this.webrtcMediaConnection,
|
|
206
|
+
correlationId,
|
|
204
207
|
});
|
|
205
208
|
|
|
206
209
|
return mediaConnectionAwaiter.waitForMediaConnectionConnected();
|
|
@@ -452,10 +455,14 @@ export default class MediaProperties {
|
|
|
452
455
|
*
|
|
453
456
|
* @param {string} issueType
|
|
454
457
|
* @param {string} issueSubType
|
|
455
|
-
* @param {
|
|
458
|
+
* @param {Object} metadata
|
|
456
459
|
* @returns {void}
|
|
457
460
|
*/
|
|
458
|
-
public sendMediaIssueMetric(
|
|
461
|
+
public sendMediaIssueMetric(
|
|
462
|
+
issueType: string,
|
|
463
|
+
issueSubType: string,
|
|
464
|
+
metadata: {correlationId: string; isMultistream: boolean}
|
|
465
|
+
) {
|
|
459
466
|
const key = `${issueType}_${issueSubType}`;
|
|
460
467
|
|
|
461
468
|
const count = (this.mediaIssueCounters[key] || 0) + 1;
|
|
@@ -463,7 +470,7 @@ export default class MediaProperties {
|
|
|
463
470
|
this.mediaIssueCounters[key] = count;
|
|
464
471
|
|
|
465
472
|
this.throttledSendMediaIssueMetric({
|
|
466
|
-
|
|
473
|
+
...metadata,
|
|
467
474
|
...this.mediaIssueCounters,
|
|
468
475
|
});
|
|
469
476
|
}
|
|
@@ -32,6 +32,7 @@ interface IInMeetingActions {
|
|
|
32
32
|
canLowerAllHands?: boolean;
|
|
33
33
|
canLowerSomeoneElsesHand?: boolean;
|
|
34
34
|
bothLeaveAndEndMeetingAvailable?: boolean;
|
|
35
|
+
requireHostEndMeetingBeforeLeave?: boolean;
|
|
35
36
|
canEnableClosedCaption?: boolean;
|
|
36
37
|
canStartTranscribing?: boolean;
|
|
37
38
|
canStopTranscribing?: boolean;
|
|
@@ -117,6 +118,10 @@ interface IInMeetingActions {
|
|
|
117
118
|
canMoveToLobby?: boolean;
|
|
118
119
|
canEnablePollingQA?: boolean;
|
|
119
120
|
canDisablePollingQA?: boolean;
|
|
121
|
+
canAttendeeRequestAiAssistantEnabled?: boolean;
|
|
122
|
+
isAttendeeRequestAiAssistantDeclinedAll?: boolean;
|
|
123
|
+
isAnonymizeDisplayNamesEnabled?: boolean;
|
|
124
|
+
canViewTheParticipantList?: boolean;
|
|
120
125
|
}
|
|
121
126
|
|
|
122
127
|
/**
|
|
@@ -169,6 +174,8 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
|
169
174
|
|
|
170
175
|
bothLeaveAndEndMeetingAvailable = null;
|
|
171
176
|
|
|
177
|
+
requireHostEndMeetingBeforeLeave = null;
|
|
178
|
+
|
|
172
179
|
canEnableClosedCaption = null;
|
|
173
180
|
|
|
174
181
|
canStartTranscribing = null;
|
|
@@ -337,6 +344,14 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
|
337
344
|
|
|
338
345
|
canDisablePollingQA = null;
|
|
339
346
|
|
|
347
|
+
canAttendeeRequestAiAssistantEnabled = null;
|
|
348
|
+
|
|
349
|
+
isAttendeeRequestAiAssistantDeclinedAll = null;
|
|
350
|
+
|
|
351
|
+
isAnonymizeDisplayNamesEnabled = null;
|
|
352
|
+
|
|
353
|
+
canViewTheParticipantList = null;
|
|
354
|
+
|
|
340
355
|
/**
|
|
341
356
|
* Returns all meeting action options
|
|
342
357
|
* @returns {Object}
|
|
@@ -364,6 +379,7 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
|
364
379
|
canLowerAllHands: this.canLowerAllHands,
|
|
365
380
|
canLowerSomeoneElsesHand: this.canLowerSomeoneElsesHand,
|
|
366
381
|
bothLeaveAndEndMeetingAvailable: this.bothLeaveAndEndMeetingAvailable,
|
|
382
|
+
requireHostEndMeetingBeforeLeave: this.requireHostEndMeetingBeforeLeave,
|
|
367
383
|
canEnableClosedCaption: this.canEnableClosedCaption,
|
|
368
384
|
canStartTranscribing: this.canStartTranscribing,
|
|
369
385
|
canStopTranscribing: this.canStopTranscribing,
|
|
@@ -448,6 +464,10 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
|
448
464
|
canMoveToLobby: this.canMoveToLobby,
|
|
449
465
|
canEnablePollingQA: this.canEnablePollingQA,
|
|
450
466
|
canDisablePollingQA: this.canDisablePollingQA,
|
|
467
|
+
canAttendeeRequestAiAssistantEnabled: this.canAttendeeRequestAiAssistantEnabled,
|
|
468
|
+
isAttendeeRequestAiAssistantDeclinedAll: this.isAttendeeRequestAiAssistantDeclinedAll,
|
|
469
|
+
isAnonymizeDisplayNamesEnabled: this.isAnonymizeDisplayNamesEnabled,
|
|
470
|
+
canViewTheParticipantList: this.canViewTheParticipantList,
|
|
451
471
|
});
|
|
452
472
|
|
|
453
473
|
/**
|