@webex/plugin-meetings 3.8.1-web-workers-keepalive.1 → 3.9.0-multipleLLM.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/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/constants.js +26 -2
- package/dist/constants.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/index.js +77 -95
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/parser.js +4 -1
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/media/properties.js +53 -5
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/brbState.js +14 -12
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +8 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +443 -225
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +2 -5
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +44 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/type.js +7 -0
- package/dist/meeting/type.js.map +1 -0
- package/dist/meeting/util.js +98 -13
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +29 -21
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +18 -10
- package/dist/meetings/index.js.map +1 -1
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js.map +1 -1
- package/dist/members/collection.js +13 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +53 -29
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +3 -3
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +25 -8
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +2 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +34 -5
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +42 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +32 -2
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/index.js +3 -3
- package/dist/reachability/index.js.map +1 -1
- package/dist/types/constants.d.ts +24 -0
- package/dist/types/locus-info/index.d.ts +54 -10
- package/dist/types/media/properties.d.ts +21 -0
- package/dist/types/meeting/brbState.d.ts +0 -1
- package/dist/types/meeting/in-meeting-actions.d.ts +8 -0
- package/dist/types/meeting/index.d.ts +51 -20
- package/dist/types/meeting/request.d.ts +18 -1
- package/dist/types/meeting/request.type.d.ts +74 -0
- package/dist/types/meeting/type.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +13 -3
- package/dist/types/meeting-info/meeting-info-v2.d.ts +6 -3
- package/dist/types/meetings/index.d.ts +3 -1
- package/dist/types/member/types.d.ts +1 -0
- package/dist/types/members/collection.d.ts +6 -0
- package/dist/types/members/index.d.ts +22 -9
- package/dist/types/members/request.d.ts +1 -1
- package/dist/types/members/util.d.ts +13 -6
- package/dist/types/metrics/constants.d.ts +1 -0
- package/dist/types/multistream/remoteMedia.d.ts +20 -1
- package/dist/types/multistream/remoteMediaGroup.d.ts +11 -0
- package/dist/types/multistream/sendSlotManager.d.ts +16 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +23 -24
- package/src/constants.ts +25 -2
- package/src/locus-info/index.ts +133 -96
- package/src/locus-info/parser.ts +5 -1
- package/src/media/properties.ts +43 -0
- package/src/meeting/brbState.ts +9 -7
- package/src/meeting/in-meeting-actions.ts +17 -0
- package/src/meeting/index.ts +273 -42
- package/src/meeting/muteState.ts +2 -6
- package/src/meeting/request.ts +39 -0
- package/src/meeting/request.type.ts +64 -0
- package/src/meeting/type.ts +9 -0
- package/src/meeting/util.ts +114 -22
- package/src/meeting-info/meeting-info-v2.ts +24 -5
- package/src/meetings/index.ts +12 -5
- package/src/member/index.ts +1 -0
- package/src/member/types.ts +1 -0
- package/src/members/collection.ts +11 -0
- package/src/members/index.ts +51 -15
- package/src/members/request.ts +2 -2
- package/src/members/util.ts +34 -6
- package/src/metrics/constants.ts +1 -0
- package/src/multistream/mediaRequestManager.ts +7 -7
- package/src/multistream/remoteMedia.ts +34 -4
- package/src/multistream/remoteMediaGroup.ts +37 -2
- package/src/multistream/sendSlotManager.ts +34 -2
- package/src/reachability/index.ts +3 -3
- package/test/unit/spec/locus-info/index.js +229 -98
- package/test/unit/spec/locus-info/parser.js +3 -2
- package/test/unit/spec/media/properties.ts +137 -0
- package/test/unit/spec/meeting/brbState.ts +9 -9
- package/test/unit/spec/meeting/in-meeting-actions.ts +8 -0
- package/test/unit/spec/meeting/index.js +1022 -93
- package/test/unit/spec/meeting/muteState.js +32 -6
- package/test/unit/spec/meeting/request.js +92 -0
- package/test/unit/spec/meeting/utils.js +167 -17
- package/test/unit/spec/meeting-info/meetinginfov2.js +8 -3
- package/test/unit/spec/meetings/index.js +12 -1
- package/test/unit/spec/members/collection.js +120 -0
- package/test/unit/spec/members/index.js +140 -12
- package/test/unit/spec/members/request.js +57 -2
- package/test/unit/spec/members/utils.js +139 -17
- package/test/unit/spec/multistream/mediaRequestManager.ts +19 -6
- package/test/unit/spec/multistream/remoteMedia.ts +66 -2
- package/test/unit/spec/multistream/sendSlotManager.ts +59 -0
- package/test/unit/spec/reachability/index.ts +158 -1
package/src/members/request.ts
CHANGED
@@ -285,14 +285,14 @@ export default class MembersRequest extends StatelessWebexPlugin {
|
|
285
285
|
* @throws {Error} if the options are not valid and complete, must have invitee with memberId AND locusUrl
|
286
286
|
* @memberof MembersRequest
|
287
287
|
*/
|
288
|
-
|
288
|
+
cancelInviteByMemberId(options: any) {
|
289
289
|
if (!options?.invitee?.memberId || !options?.locusUrl) {
|
290
290
|
throw new ParameterError(
|
291
291
|
'invitee must be passed and the associated locus url for this meeting object must be defined.'
|
292
292
|
);
|
293
293
|
}
|
294
294
|
|
295
|
-
const requestParams = MembersUtil.
|
295
|
+
const requestParams = MembersUtil.generateCancelInviteByMemberIdRequestParams(options);
|
296
296
|
|
297
297
|
return this.locusDeltaRequest(requestParams);
|
298
298
|
}
|
package/src/members/util.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import uuid from 'uuid';
|
2
|
+
import {has} from 'lodash';
|
2
3
|
import {
|
3
4
|
HTTP_VERBS,
|
4
5
|
CONTROLS,
|
@@ -13,6 +14,7 @@ import {
|
|
13
14
|
} from '../constants';
|
14
15
|
|
15
16
|
import {RoleAssignmentOptions, RoleAssignmentRequest, ServerRoleShape} from './types';
|
17
|
+
import {Invitee} from '../meeting/type';
|
16
18
|
|
17
19
|
const MembersUtil = {
|
18
20
|
/**
|
@@ -47,6 +49,9 @@ const MembersUtil = {
|
|
47
49
|
address:
|
48
50
|
options.invitee.emailAddress || options.invitee.email || options.invitee.phoneNumber,
|
49
51
|
...(options.invitee.roles ? {roles: options.invitee.roles} : {}),
|
52
|
+
...(has(options.invitee, 'isInternalNumber')
|
53
|
+
? {isInternalNumber: options.invitee.isInternalNumber}
|
54
|
+
: {}),
|
50
55
|
},
|
51
56
|
],
|
52
57
|
alertIfActive: options.alertIfActive,
|
@@ -101,12 +106,16 @@ const MembersUtil = {
|
|
101
106
|
return requestParams;
|
102
107
|
},
|
103
108
|
|
104
|
-
isInvalidInvitee: (invitee) => {
|
109
|
+
isInvalidInvitee: (invitee: Invitee) => {
|
105
110
|
if (!(invitee && (invitee.email || invitee.emailAddress || invitee.phoneNumber))) {
|
106
111
|
return true;
|
107
112
|
}
|
108
113
|
|
109
114
|
if (invitee.phoneNumber) {
|
115
|
+
if (invitee.isInternalNumber) {
|
116
|
+
return !DIALER_REGEX.INTERNAL_NUMBER.test(invitee.phoneNumber);
|
117
|
+
}
|
118
|
+
|
110
119
|
return !DIALER_REGEX.E164_FORMAT.test(invitee.phoneNumber);
|
111
120
|
}
|
112
121
|
|
@@ -181,13 +190,21 @@ const MembersUtil = {
|
|
181
190
|
* @param {String} requestingParticipantId id of the participant who is sending request (optional)
|
182
191
|
* @param {String} alias alias name
|
183
192
|
* @param {String} locusUrl url
|
193
|
+
* @param {String} suffix optional suffix
|
184
194
|
* @returns {Object} consists of {memberID: string, requestingParticipantId: string, alias: string, locusUrl: string}
|
185
195
|
*/
|
186
|
-
generateEditDisplayNameMemberOptions: (
|
196
|
+
generateEditDisplayNameMemberOptions: (
|
197
|
+
memberId,
|
198
|
+
requestingParticipantId,
|
199
|
+
alias,
|
200
|
+
locusUrl,
|
201
|
+
suffix
|
202
|
+
) => ({
|
187
203
|
memberId,
|
188
204
|
requestingParticipantId,
|
189
205
|
alias,
|
190
206
|
locusUrl,
|
207
|
+
suffix,
|
191
208
|
}),
|
192
209
|
|
193
210
|
getMuteMemberRequestParams: (options) => {
|
@@ -292,10 +309,18 @@ const MembersUtil = {
|
|
292
309
|
* @returns {Object} request parameters (method, uri, body) needed to make a editDisplayName request
|
293
310
|
*/
|
294
311
|
editDisplayNameMemberRequestParams: (options) => {
|
295
|
-
const body
|
312
|
+
const body: {
|
313
|
+
aliasValue: string;
|
314
|
+
requestingParticipantId: string;
|
315
|
+
suffixValue?: string;
|
316
|
+
} = {
|
296
317
|
aliasValue: options.alias,
|
297
318
|
requestingParticipantId: options.requestingParticipantId,
|
298
319
|
};
|
320
|
+
|
321
|
+
if (options.suffix !== undefined) {
|
322
|
+
body.suffixValue = options.suffix;
|
323
|
+
}
|
299
324
|
const uri = `${options.locusUrl}/${PARTICIPANT}/${options.memberId}/${ALIAS}`;
|
300
325
|
|
301
326
|
return {
|
@@ -371,17 +396,20 @@ const MembersUtil = {
|
|
371
396
|
return requestParams;
|
372
397
|
},
|
373
398
|
|
374
|
-
|
399
|
+
cancelInviteByMemberIdOptions: (invitee, locusUrl) => ({
|
375
400
|
invitee,
|
376
401
|
locusUrl,
|
377
402
|
}),
|
378
403
|
|
379
|
-
|
404
|
+
generateCancelInviteByMemberIdRequestParams: (options) => {
|
405
|
+
const {memberId, isInternalNumber} = options.invitee;
|
406
|
+
const hasIsInternalNumberProp = has(options.invitee, 'isInternalNumber');
|
380
407
|
const body = {
|
381
408
|
actionType: _REMOVE_,
|
382
409
|
invitees: [
|
383
410
|
{
|
384
|
-
address:
|
411
|
+
address: memberId,
|
412
|
+
...(hasIsInternalNumberProp ? {isInternalNumber} : {}),
|
385
413
|
},
|
386
414
|
],
|
387
415
|
};
|
package/src/metrics/constants.ts
CHANGED
@@ -86,6 +86,7 @@ const BEHAVIORAL_METRICS = {
|
|
86
86
|
VERIFY_REGISTRATION_ID_SUCCESS: 'js_sdk_verify_registrationId_success',
|
87
87
|
VERIFY_REGISTRATION_ID_ERROR: 'js_sdk_verify_registrationId_error',
|
88
88
|
JOIN_FORBIDDEN_ERROR: 'js_sdk_join_forbidden_error',
|
89
|
+
MEDIA_ISSUE_DETECTED: 'js_sdk_media_issue_detected',
|
89
90
|
};
|
90
91
|
|
91
92
|
export {BEHAVIORAL_METRICS as default};
|
@@ -15,7 +15,7 @@ import {cloneDeepWith, debounce, isEmpty} from 'lodash';
|
|
15
15
|
import LoggerProxy from '../common/logs/logger-proxy';
|
16
16
|
|
17
17
|
import {ReceiveSlot, ReceiveSlotEvents} from './receiveSlot';
|
18
|
-
import {
|
18
|
+
import {MAX_FS_VALUES} from './remoteMedia';
|
19
19
|
|
20
20
|
export interface ActiveSpeakerPolicyInfo {
|
21
21
|
policy: 'active-speaker';
|
@@ -123,12 +123,12 @@ export class MediaRequestManager {
|
|
123
123
|
|
124
124
|
private getDegradedClientRequests(clientRequests: ClientRequestsMap) {
|
125
125
|
const maxFsLimits = [
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
126
|
+
MAX_FS_VALUES['1080p'],
|
127
|
+
MAX_FS_VALUES['720p'],
|
128
|
+
MAX_FS_VALUES['540p'],
|
129
|
+
MAX_FS_VALUES['360p'],
|
130
|
+
MAX_FS_VALUES['180p'],
|
131
|
+
MAX_FS_VALUES['90p'],
|
132
132
|
];
|
133
133
|
|
134
134
|
// reduce max-fs until total macroblocks is below limit
|
@@ -19,17 +19,18 @@ export type RemoteVideoResolution =
|
|
19
19
|
| 'large' // 1080p or less
|
20
20
|
| 'best'; // highest possible resolution
|
21
21
|
|
22
|
-
const MAX_FS_VALUES = {
|
22
|
+
export const MAX_FS_VALUES = {
|
23
23
|
'90p': 60,
|
24
24
|
'180p': 240,
|
25
25
|
'360p': 920,
|
26
|
+
'540p': 2040,
|
26
27
|
'720p': 3600,
|
27
28
|
'1080p': 8192,
|
28
29
|
};
|
29
30
|
|
30
31
|
/**
|
31
32
|
* Converts pane size into h264 maxFs
|
32
|
-
* @param {
|
33
|
+
* @param {RemoteVideoResolution} paneSize
|
33
34
|
* @returns {number}
|
34
35
|
*/
|
35
36
|
export function getMaxFs(paneSize: RemoteVideoResolution): number {
|
@@ -89,6 +90,13 @@ export class RemoteMedia extends EventsScope {
|
|
89
90
|
|
90
91
|
public readonly id: RemoteMediaId;
|
91
92
|
|
93
|
+
/**
|
94
|
+
* The max frame size of the media request, used for logging and media requests.
|
95
|
+
* Set by setSizeHint() based on video element dimensions.
|
96
|
+
* When > 0, this value takes precedence over options.resolution in sendMediaRequest().
|
97
|
+
*/
|
98
|
+
private maxFrameSize = 0;
|
99
|
+
|
92
100
|
/**
|
93
101
|
* Constructs RemoteMedia instance
|
94
102
|
*
|
@@ -136,15 +144,34 @@ export class RemoteMedia extends EventsScope {
|
|
136
144
|
fs = MAX_FS_VALUES['180p'];
|
137
145
|
} else if (height < getThresholdHeight(360)) {
|
138
146
|
fs = MAX_FS_VALUES['360p'];
|
147
|
+
} else if (height < getThresholdHeight(540)) {
|
148
|
+
fs = MAX_FS_VALUES['540p'];
|
139
149
|
} else if (height <= 720) {
|
140
150
|
fs = MAX_FS_VALUES['720p'];
|
141
151
|
} else {
|
142
152
|
fs = MAX_FS_VALUES['1080p'];
|
143
153
|
}
|
144
154
|
|
155
|
+
this.maxFrameSize = fs;
|
145
156
|
this.receiveSlot?.setMaxFs(fs);
|
146
157
|
}
|
147
158
|
|
159
|
+
/**
|
160
|
+
* Get the current effective maxFs value that would be used in media requests
|
161
|
+
* @returns {number | undefined} The maxFs value, or undefined if no constraints
|
162
|
+
*/
|
163
|
+
public getEffectiveMaxFs(): number | undefined {
|
164
|
+
if (this.maxFrameSize > 0) {
|
165
|
+
return this.maxFrameSize;
|
166
|
+
}
|
167
|
+
|
168
|
+
if (this.options.resolution) {
|
169
|
+
return getMaxFs(this.options.resolution);
|
170
|
+
}
|
171
|
+
|
172
|
+
return undefined;
|
173
|
+
}
|
174
|
+
|
148
175
|
/**
|
149
176
|
* Invalidates the remote media by clearing the reference to a receive slot and
|
150
177
|
* cancelling the media request.
|
@@ -185,6 +212,9 @@ export class RemoteMedia extends EventsScope {
|
|
185
212
|
throw new Error('sendMediaRequest() called on an invalidated RemoteMedia instance');
|
186
213
|
}
|
187
214
|
|
215
|
+
// Use maxFrameSize from setSizeHint if available, otherwise fallback to options.resolution
|
216
|
+
const maxFs = this.getEffectiveMaxFs();
|
217
|
+
|
188
218
|
this.mediaRequestId = this.mediaRequestManager.addRequest(
|
189
219
|
{
|
190
220
|
policyInfo: {
|
@@ -192,9 +222,9 @@ export class RemoteMedia extends EventsScope {
|
|
192
222
|
csi,
|
193
223
|
},
|
194
224
|
receiveSlots: [this.receiveSlot],
|
195
|
-
codecInfo:
|
225
|
+
codecInfo: maxFs && {
|
196
226
|
codec: 'h264',
|
197
|
-
maxFs
|
227
|
+
maxFs,
|
198
228
|
},
|
199
229
|
},
|
200
230
|
commit
|
@@ -215,6 +215,9 @@ export class RemoteMediaGroup {
|
|
215
215
|
private sendActiveSpeakerMediaRequest(commit: boolean) {
|
216
216
|
this.cancelActiveSpeakerMediaRequest(false);
|
217
217
|
|
218
|
+
// Calculate the effective maxFs based on all unpinned RemoteMedia instances
|
219
|
+
const effectiveMaxFs = this.getEffectiveMaxFsForActiveSpeaker();
|
220
|
+
|
218
221
|
this.mediaRequestId = this.mediaRequestManager.addRequest(
|
219
222
|
{
|
220
223
|
policyInfo: {
|
@@ -230,9 +233,9 @@ export class RemoteMediaGroup {
|
|
230
233
|
receiveSlots: this.unpinnedRemoteMedia.map((remoteMedia) =>
|
231
234
|
remoteMedia.getUnderlyingReceiveSlot()
|
232
235
|
) as ReceiveSlot[],
|
233
|
-
codecInfo:
|
236
|
+
codecInfo: effectiveMaxFs && {
|
234
237
|
codec: 'h264',
|
235
|
-
maxFs:
|
238
|
+
maxFs: effectiveMaxFs,
|
236
239
|
},
|
237
240
|
},
|
238
241
|
commit
|
@@ -300,4 +303,36 @@ export class RemoteMediaGroup {
|
|
300
303
|
this.unpinnedRemoteMedia.includes(remoteMedia) || this.pinnedRemoteMedia.includes(remoteMedia)
|
301
304
|
);
|
302
305
|
}
|
306
|
+
|
307
|
+
/**
|
308
|
+
* Calculate the effective maxFs for the active speaker media request based on unpinned RemoteMedia instances
|
309
|
+
* @returns {number | undefined} The calculated maxFs value, or undefined if no constraints
|
310
|
+
* @private
|
311
|
+
*/
|
312
|
+
private getEffectiveMaxFsForActiveSpeaker(): number | undefined {
|
313
|
+
// Get all effective maxFs values from unpinned RemoteMedia instances
|
314
|
+
const maxFsValues = this.unpinnedRemoteMedia
|
315
|
+
.map((remoteMedia) => remoteMedia.getEffectiveMaxFs())
|
316
|
+
.filter((maxFs) => maxFs !== undefined);
|
317
|
+
|
318
|
+
// Use the highest maxFs value to ensure we don't under-request resolution for any instance
|
319
|
+
if (maxFsValues.length > 0) {
|
320
|
+
return Math.max(...maxFsValues);
|
321
|
+
}
|
322
|
+
|
323
|
+
// Fall back to group's resolution option
|
324
|
+
if (this.options.resolution) {
|
325
|
+
return getMaxFs(this.options.resolution);
|
326
|
+
}
|
327
|
+
|
328
|
+
return undefined;
|
329
|
+
}
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Get the current effective maxFs that would be used for the active speaker media request
|
333
|
+
* @returns {number | undefined} The effective maxFs value
|
334
|
+
*/
|
335
|
+
public getEffectiveMaxFs(): number | undefined {
|
336
|
+
return this.getEffectiveMaxFsForActiveSpeaker();
|
337
|
+
}
|
303
338
|
}
|
@@ -7,10 +7,20 @@ import {
|
|
7
7
|
StreamState,
|
8
8
|
} from '@webex/internal-media-core';
|
9
9
|
|
10
|
+
/**
|
11
|
+
* This class is used to manage the sendSlots for the given media types.
|
12
|
+
*/
|
10
13
|
export default class SendSlotManager {
|
11
14
|
private readonly slots: Map<MediaType, SendSlot> = new Map();
|
12
15
|
private readonly LoggerProxy: any;
|
16
|
+
private readonly sourceStateOverrides: Map<MediaType, StreamState> = new Map();
|
13
17
|
|
18
|
+
/**
|
19
|
+
* Constructor for SendSlotManager
|
20
|
+
*
|
21
|
+
* @param {any} LoggerProxy is used to log the messages
|
22
|
+
* @constructor
|
23
|
+
*/
|
14
24
|
constructor(LoggerProxy: any) {
|
15
25
|
this.LoggerProxy = LoggerProxy;
|
16
26
|
}
|
@@ -93,7 +103,7 @@ export default class SendSlotManager {
|
|
93
103
|
public setSourceStateOverride(mediaType: MediaType, state: StreamState | null) {
|
94
104
|
if (mediaType !== MediaType.VideoMain) {
|
95
105
|
throw new Error(
|
96
|
-
`
|
106
|
+
`Invalid media type '${mediaType}'. Source state overrides are only applicable to ${MediaType.VideoMain}.`
|
97
107
|
);
|
98
108
|
}
|
99
109
|
|
@@ -103,17 +113,39 @@ export default class SendSlotManager {
|
|
103
113
|
throw new Error(`Slot for ${mediaType} does not exist`);
|
104
114
|
}
|
105
115
|
|
116
|
+
const currentStateOverride = this.getSourceStateOverride(mediaType);
|
117
|
+
if (currentStateOverride === state) {
|
118
|
+
return;
|
119
|
+
}
|
120
|
+
|
106
121
|
if (state) {
|
107
122
|
slot.setSourceStateOverride(state);
|
123
|
+
this.sourceStateOverrides.set(mediaType, state);
|
108
124
|
} else {
|
109
125
|
slot.clearSourceStateOverride();
|
126
|
+
this.sourceStateOverrides.delete(mediaType);
|
110
127
|
}
|
111
128
|
|
112
129
|
this.LoggerProxy.logger.info(
|
113
|
-
`
|
130
|
+
`SendSlotManager->setSourceStateOverride#set source state override for ${mediaType} to ${state}`
|
114
131
|
);
|
115
132
|
}
|
116
133
|
|
134
|
+
/**
|
135
|
+
* Gets the source state override for the given media type.
|
136
|
+
* @param {MediaType} mediaType - The type of media to get the source state override for.
|
137
|
+
* @returns {StreamState | null} - The current source state override or null if not set.
|
138
|
+
*/
|
139
|
+
private getSourceStateOverride(mediaType: MediaType): StreamState | null {
|
140
|
+
if (mediaType !== MediaType.VideoMain) {
|
141
|
+
throw new Error(
|
142
|
+
`Invalid media type '${mediaType}'. Source state overrides are only applicable to ${MediaType.VideoMain}.`
|
143
|
+
);
|
144
|
+
}
|
145
|
+
|
146
|
+
return this.sourceStateOverrides.get(mediaType) || null;
|
147
|
+
}
|
148
|
+
|
117
149
|
/**
|
118
150
|
* This method publishes the given stream to the sendSlot for the given mediaType
|
119
151
|
* @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
@@ -923,10 +923,10 @@ export default class Reachability extends EventsScope {
|
|
923
923
|
|
924
924
|
// update expected results counters to include this cluster
|
925
925
|
this.expectedResultsCount[cluster.isVideoMesh ? 'videoMesh' : 'public'].udp +=
|
926
|
-
cluster.udp.length;
|
926
|
+
cluster.udp.length > 0 ? 1 : 0;
|
927
927
|
if (!cluster.isVideoMesh) {
|
928
|
-
this.expectedResultsCount.public.tcp += cluster.tcp.length;
|
929
|
-
this.expectedResultsCount.public.xtls += cluster.xtls.length;
|
928
|
+
this.expectedResultsCount.public.tcp += cluster.tcp.length > 0 ? 1 : 0;
|
929
|
+
this.expectedResultsCount.public.xtls += cluster.xtls.length > 0 ? 1 : 0;
|
930
930
|
}
|
931
931
|
});
|
932
932
|
|