@webex/plugin-meetings 3.0.0-beta.1 → 3.0.0-beta.11
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/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +7 -0
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +8 -0
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +8 -0
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +7 -0
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +7 -0
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +7 -0
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +7 -0
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +7 -0
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +5 -29
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -2
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +3 -0
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +1 -0
- package/dist/config.js.map +1 -1
- package/dist/constants.js +15 -74
- package/dist/constants.js.map +1 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +43 -5
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +4 -0
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +12 -3
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +71 -210
- package/dist/media/index.js.map +1 -1
- package/dist/media/internal-media-core-wrapper.js +22 -0
- package/dist/media/internal-media-core-wrapper.js.map +1 -0
- package/dist/media/properties.js +32 -25
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +0 -27
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/effectsState.js +8 -1
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/index.js +1146 -602
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +6 -0
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +83 -24
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +5 -44
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +4 -1
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +5 -0
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +14 -2
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -0
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +4 -1
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +136 -25
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +4 -0
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +24 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +30 -7
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +2 -1
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +1 -0
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +82 -1
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +19 -9
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +8 -0
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +133 -0
- package/dist/multistream/mediaRequestManager.js.map +1 -0
- package/dist/multistream/multistreamMedia.js +116 -0
- package/dist/multistream/multistreamMedia.js.map +1 -0
- package/dist/multistream/receiveSlot.js +209 -0
- package/dist/multistream/receiveSlot.js.map +1 -0
- package/dist/multistream/receiveSlotManager.js +195 -0
- package/dist/multistream/receiveSlotManager.js.map +1 -0
- package/dist/multistream/remoteMedia.js +289 -0
- package/dist/multistream/remoteMedia.js.map +1 -0
- package/dist/multistream/remoteMediaGroup.js +243 -0
- package/dist/multistream/remoteMediaGroup.js.map +1 -0
- package/dist/multistream/remoteMediaManager.js +1113 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +10 -2
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +11 -0
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -1
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +17 -7
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +1 -0
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/reactions.js +111 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +40 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +130 -132
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +58 -231
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +7 -116
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +20 -6
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +2 -0
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +58 -37
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +9 -3
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +10 -3
- package/dist/transcription/index.js.map +1 -1
- package/package.json +21 -20
- package/src/common/{browser-detection.js → browser-detection.ts} +1 -1
- package/src/common/collection.ts +6 -6
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +5 -1
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +6 -1
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +6 -1
- package/src/common/errors/{media.js → media.ts} +5 -1
- package/src/common/errors/parameter.ts +3 -2
- package/src/common/errors/{password-error.js → password-error.ts} +5 -1
- package/src/common/errors/{permission.js → permission.ts} +5 -1
- package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +5 -1
- package/src/common/errors/{stats.js → stats.ts} +5 -1
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +1 -20
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +3 -1
- package/src/common/events/{events-scope.js → events-scope.ts} +1 -1
- package/src/common/events/{events.js → events.ts} +0 -0
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +1 -2
- package/src/common/events/{util.js → util.ts} +1 -1
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/{logger-proxy.js → logger-proxy.ts} +1 -1
- package/src/common/logs/{request.js → request.ts} +12 -2
- package/src/common/queue.ts +1 -2
- package/src/{config.js → config.ts} +2 -0
- package/src/constants.ts +139 -179
- package/src/locus-info/{controlsUtils.js → controlsUtils.ts} +4 -4
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +1 -1
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +5 -5
- package/src/locus-info/{index.js → index.ts} +67 -32
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +7 -4
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +13 -13
- package/src/locus-info/{parser.js → parser.ts} +22 -12
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +17 -19
- package/src/media/{index.js → index.ts} +130 -205
- package/src/media/internal-media-core-wrapper.ts +9 -0
- package/src/media/{properties.js → properties.ts} +35 -29
- package/src/media/util.ts +16 -0
- package/src/mediaQualityMetrics/{config.js → config.ts} +1 -1
- package/src/meeting/{effectsState.js → effectsState.ts} +12 -6
- package/src/meeting/{index.js → index.ts} +993 -474
- package/src/meeting/{muteState.js → muteState.ts} +16 -11
- package/src/meeting/{request.js → request.ts} +148 -36
- package/src/meeting/{state.js → state.ts} +6 -6
- package/src/meeting/{util.js → util.ts} +9 -51
- package/src/meeting-info/{collection.js → collection.ts} +4 -1
- package/src/meeting-info/{index.js → index.ts} +10 -6
- package/src/meeting-info/{meeting-info-v2.js → meeting-info-v2.ts} +28 -10
- package/src/meeting-info/{request.js → request.ts} +6 -2
- package/src/meeting-info/{util.js → util.ts} +6 -5
- package/src/meeting-info/{utilv2.js → utilv2.ts} +8 -7
- package/src/meetings/{collection.js → collection.ts} +5 -2
- package/src/meetings/{index.js → index.ts} +118 -22
- package/src/meetings/{request.js → request.ts} +6 -1
- package/src/meetings/{util.js → util.ts} +28 -5
- package/src/member/{index.js → index.ts} +46 -15
- package/src/member/{util.js → util.ts} +17 -16
- package/src/members/{collection.js → collection.ts} +2 -1
- package/src/members/{index.js → index.ts} +94 -26
- package/src/members/{request.js → request.ts} +16 -5
- package/src/members/{util.js → util.ts} +7 -7
- package/src/metrics/{config.js → config.ts} +0 -2
- package/src/metrics/{constants.js → constants.ts} +0 -0
- package/src/metrics/{index.js → index.ts} +27 -8
- package/src/multistream/mediaRequestManager.ts +166 -0
- package/src/multistream/multistreamMedia.ts +92 -0
- package/src/multistream/receiveSlot.ts +141 -0
- package/src/multistream/receiveSlotManager.ts +142 -0
- package/src/multistream/remoteMedia.ts +228 -0
- package/src/multistream/remoteMediaGroup.ts +224 -0
- package/src/multistream/remoteMediaManager.ts +911 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +18 -3
- package/src/personal-meeting-room/{index.js → index.ts} +17 -4
- package/src/personal-meeting-room/{request.js → request.ts} +3 -1
- package/src/personal-meeting-room/{util.js → util.ts} +1 -1
- package/src/reachability/{index.js → index.ts} +28 -17
- package/src/reachability/request.ts +4 -2
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +36 -0
- package/src/reconnection-manager/{index.js → index.ts} +81 -65
- package/src/roap/index.ts +229 -0
- package/src/roap/{request.js → request.ts} +15 -74
- package/src/roap/turnDiscovery.ts +26 -11
- package/src/statsAnalyzer/{global.js → global.ts} +2 -0
- package/src/statsAnalyzer/{index.js → index.ts} +66 -61
- package/src/statsAnalyzer/{mqaUtil.js → mqaUtil.ts} +6 -1
- package/src/transcription/{index.js → index.ts} +16 -11
- package/test/integration/spec/journey.js +1 -1
- package/test/integration/spec/space-meeting.js +1 -2
- package/test/unit/spec/locus-info/infoUtils.js +17 -1
- package/test/unit/spec/media/index.ts +207 -0
- package/test/unit/spec/media/properties.ts +73 -82
- package/test/unit/spec/meeting/effectsState.js +1 -3
- package/test/unit/spec/meeting/index.js +672 -245
- package/test/unit/spec/meeting/muteState.js +7 -0
- package/test/unit/spec/meeting/request.js +25 -1
- package/test/unit/spec/meeting/utils.js +63 -2
- package/test/unit/spec/meetings/index.js +0 -4
- package/test/unit/spec/members/index.js +164 -2
- package/test/unit/spec/multistream/mediaRequestManager.ts +515 -0
- package/test/unit/spec/multistream/receiveSlot.ts +104 -0
- package/test/unit/spec/multistream/receiveSlotManager.ts +173 -0
- package/test/unit/spec/multistream/remoteMedia.ts +225 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +396 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +1309 -0
- package/test/unit/spec/reconnection-manager/index.js +68 -2
- package/test/unit/spec/roap/index.ts +63 -35
- package/test/unit/spec/stats-analyzer/index.js +19 -22
- package/dist/peer-connection-manager/index.js +0 -794
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/roap/collection.js +0 -73
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -337
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/state.js +0 -164
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/util.js +0 -102
- package/dist/roap/util.js.map +0 -1
- package/src/media/util.js +0 -38
- package/src/peer-connection-manager/index.js +0 -723
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/roap/collection.js +0 -63
- package/src/roap/handler.js +0 -252
- package/src/roap/index.js +0 -380
- package/src/roap/state.js +0 -149
- package/src/roap/util.js +0 -93
- package/test/unit/spec/peerconnection-manager/index.js +0 -188
- package/test/unit/spec/peerconnection-manager/utils.js +0 -48
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- package/test/unit/spec/roap/util.js +0 -30
|
@@ -27,12 +27,15 @@ export default class Parser {
|
|
|
27
27
|
ERROR: 'ERROR'
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
+
queue: any;
|
|
31
|
+
workingCopy: any;
|
|
30
32
|
|
|
31
33
|
/**
|
|
32
34
|
* @constructs Parser
|
|
33
35
|
*/
|
|
34
36
|
constructor() {
|
|
35
37
|
this.queue = new SimpleQueue();
|
|
38
|
+
// @ts-ignore - This is declared as static class member and again being initialized here from same
|
|
36
39
|
this.status = Parser.status.IDLE;
|
|
37
40
|
this.onDeltaAction = null;
|
|
38
41
|
this.workingCopy = null;
|
|
@@ -214,7 +217,7 @@ export default class Parser {
|
|
|
214
217
|
* @private
|
|
215
218
|
* @returns {string} loci comparison state
|
|
216
219
|
*/
|
|
217
|
-
static compareDelta(current, incoming) {
|
|
220
|
+
private static compareDelta(current, incoming) {
|
|
218
221
|
const {
|
|
219
222
|
LT, GT, EQ, DESYNC, USE_INCOMING
|
|
220
223
|
} = Parser.loci;
|
|
@@ -255,8 +258,8 @@ export default class Parser {
|
|
|
255
258
|
// Locus sequence comparison rules in order of priority.
|
|
256
259
|
// https://sqbu-github.cisco.com/WebExSquared/cloud-apps/wiki/Locus-Sequence-Comparison-Algorithm
|
|
257
260
|
|
|
258
|
-
const local = Parser.getMetaData(current);
|
|
259
|
-
const delta = Parser.getMetaData(incoming);
|
|
261
|
+
const local: any = Parser.getMetaData(current);
|
|
262
|
+
const delta: any = Parser.getMetaData(incoming);
|
|
260
263
|
|
|
261
264
|
// update loci metadata
|
|
262
265
|
local.unique = Parser.getUniqueSequences(local, delta);
|
|
@@ -293,7 +296,7 @@ export default class Parser {
|
|
|
293
296
|
* @param {string} result
|
|
294
297
|
* @returns {string} Locus comparison action
|
|
295
298
|
*/
|
|
296
|
-
static compareToAction(result) {
|
|
299
|
+
static compareToAction(result: string) {
|
|
297
300
|
const {
|
|
298
301
|
DESYNC, EQ, ERROR, GT, LT, USE_CURRENT, USE_INCOMING
|
|
299
302
|
} = Parser.loci;
|
|
@@ -324,7 +327,7 @@ export default class Parser {
|
|
|
324
327
|
* @param {string} lociComparisonResult Comparison result with extra data
|
|
325
328
|
* @returns {string} Comparison of EQ, LT, GT, or DESYNC.
|
|
326
329
|
*/
|
|
327
|
-
static extractComparisonState(lociComparisonResult) {
|
|
330
|
+
static extractComparisonState(lociComparisonResult: string) {
|
|
328
331
|
return lociComparisonResult.split(':')[0];
|
|
329
332
|
}
|
|
330
333
|
|
|
@@ -345,7 +348,7 @@ export default class Parser {
|
|
|
345
348
|
* @param {Array.<number>} sequence Locus delta sequence
|
|
346
349
|
* @returns {LociMetadata} Locus Delta Metadata
|
|
347
350
|
*/
|
|
348
|
-
static getMetaData(sequence) {
|
|
351
|
+
static getMetaData(sequence: any) {
|
|
349
352
|
const {entries} = sequence;
|
|
350
353
|
const first = entries[0];
|
|
351
354
|
const last = entries.slice(-1)[0];
|
|
@@ -377,8 +380,8 @@ export default class Parser {
|
|
|
377
380
|
* @param {LociMetadata} otherLoci
|
|
378
381
|
* @returns {Array.<number>} List of unique sequences
|
|
379
382
|
*/
|
|
380
|
-
static getUniqueSequences(baseLoci, otherLoci) {
|
|
381
|
-
const diff = difference(
|
|
383
|
+
static getUniqueSequences(baseLoci: any, otherLoci: any) {
|
|
384
|
+
const diff: any = difference(
|
|
382
385
|
baseLoci.entries,
|
|
383
386
|
otherLoci.entries
|
|
384
387
|
);
|
|
@@ -395,7 +398,7 @@ export default class Parser {
|
|
|
395
398
|
* @param {number} rangeEnd End of range
|
|
396
399
|
* @returns {Array.<number>} Array of numbers sorted ASC
|
|
397
400
|
*/
|
|
398
|
-
static getNumbersOutOfRange(list
|
|
401
|
+
static getNumbersOutOfRange(list: Array<number>, rangeStart: number, rangeEnd: number) {
|
|
399
402
|
// Collect all numbers if number is outside of specified range
|
|
400
403
|
const output = list.filter((num) => num < rangeStart || num > rangeEnd);
|
|
401
404
|
|
|
@@ -413,6 +416,7 @@ export default class Parser {
|
|
|
413
416
|
let isValid = false;
|
|
414
417
|
const {IDLE} = Parser.status;
|
|
415
418
|
const {isLoci} = Parser;
|
|
419
|
+
// @ts-ignore
|
|
416
420
|
const setStatus = (status) => { this.status = status; };
|
|
417
421
|
|
|
418
422
|
// one or both objects are not locus delta events
|
|
@@ -468,6 +472,7 @@ export default class Parser {
|
|
|
468
472
|
* @returns {undefined}
|
|
469
473
|
*/
|
|
470
474
|
nextEvent() {
|
|
475
|
+
// @ts-ignore
|
|
471
476
|
if (this.status === Parser.status.PAUSED) {
|
|
472
477
|
LoggerProxy.logger.info('Locus-info:parser#nextEvent --> Locus parser paused.');
|
|
473
478
|
|
|
@@ -479,6 +484,7 @@ export default class Parser {
|
|
|
479
484
|
this.processDeltaEvent();
|
|
480
485
|
}
|
|
481
486
|
else {
|
|
487
|
+
// @ts-ignore
|
|
482
488
|
this.status = Parser.status.IDLE;
|
|
483
489
|
}
|
|
484
490
|
}
|
|
@@ -492,7 +498,7 @@ export default class Parser {
|
|
|
492
498
|
* @returns {undefined}
|
|
493
499
|
*/
|
|
494
500
|
// eslint-disable-next-line no-unused-vars
|
|
495
|
-
onDeltaAction(action, locus) {}
|
|
501
|
+
onDeltaAction(action: string, locus) {}
|
|
496
502
|
|
|
497
503
|
|
|
498
504
|
/**
|
|
@@ -505,8 +511,10 @@ export default class Parser {
|
|
|
505
511
|
this.queue.enqueue(loci);
|
|
506
512
|
// start processing events in the queue if idle
|
|
507
513
|
// and a function handler is defined
|
|
514
|
+
// @ts-ignore
|
|
508
515
|
if (this.status === Parser.status.IDLE && this.onDeltaAction) {
|
|
509
516
|
// Update status, ensure we only process one event at a time.
|
|
517
|
+
// @ts-ignore
|
|
510
518
|
this.status = Parser.status.WORKING;
|
|
511
519
|
|
|
512
520
|
this.processDeltaEvent();
|
|
@@ -520,7 +528,7 @@ export default class Parser {
|
|
|
520
528
|
* @param {string} oldData
|
|
521
529
|
* @returns {string}
|
|
522
530
|
*/
|
|
523
|
-
static packComparisonResult(newData, oldData) {
|
|
531
|
+
static packComparisonResult(newData: string, oldData: string) {
|
|
524
532
|
return `${newData}:${oldData}`;
|
|
525
533
|
}
|
|
526
534
|
|
|
@@ -530,6 +538,7 @@ export default class Parser {
|
|
|
530
538
|
* @returns {undefined}
|
|
531
539
|
*/
|
|
532
540
|
pause() {
|
|
541
|
+
// @ts-ignore
|
|
533
542
|
this.status = Parser.status.PAUSED;
|
|
534
543
|
LoggerProxy.logger.info('Locus-info:parser#pause --> Locus parser paused.');
|
|
535
544
|
}
|
|
@@ -583,6 +592,7 @@ export default class Parser {
|
|
|
583
592
|
*/
|
|
584
593
|
resume() {
|
|
585
594
|
LoggerProxy.logger.info('Locus-info:parser#resume --> Locus parser resumed.');
|
|
595
|
+
// @ts-ignore
|
|
586
596
|
this.status = Parser.status.WORKING;
|
|
587
597
|
this.nextEvent();
|
|
588
598
|
}
|
|
@@ -594,7 +604,7 @@ export default class Parser {
|
|
|
594
604
|
* @param {string} comparison Locus comparison string
|
|
595
605
|
* @returns {object} Debug message
|
|
596
606
|
*/
|
|
597
|
-
static getDebugMessage(debugCode, comparison) {
|
|
607
|
+
static getDebugMessage(debugCode: string, comparison: string) {
|
|
598
608
|
// removes extra spaces from multiline string
|
|
599
609
|
const mStr = (strings) => strings.join('').replace(/\s{2,}/g, ' ');
|
|
600
610
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import {
|
|
3
2
|
_IDLE_,
|
|
4
3
|
_JOINED_,
|
|
@@ -15,7 +14,7 @@ import {
|
|
|
15
14
|
} from '../constants';
|
|
16
15
|
import ParameterError from '../common/errors/parameter';
|
|
17
16
|
|
|
18
|
-
const SelfUtils = {};
|
|
17
|
+
const SelfUtils: any = {};
|
|
19
18
|
const PSTN_DEVICE_TYPE = 'PROVISIONAL';
|
|
20
19
|
|
|
21
20
|
/**
|
|
@@ -24,7 +23,7 @@ const PSTN_DEVICE_TYPE = 'PROVISIONAL';
|
|
|
24
23
|
* @param {String} deviceId
|
|
25
24
|
* @returns {undefined}
|
|
26
25
|
*/
|
|
27
|
-
SelfUtils.parse = (self, deviceId) => {
|
|
26
|
+
SelfUtils.parse = (self: any, deviceId: string) => {
|
|
28
27
|
if (self) {
|
|
29
28
|
const joinedWith = self.devices.find((device) => deviceId === device.url);
|
|
30
29
|
const pstnDevices = self.devices.filter((device) => PSTN_DEVICE_TYPE === device.deviceType);
|
|
@@ -84,7 +83,7 @@ SelfUtils.isSharingBlocked = (self) => !!self?.isSharingBlocked;
|
|
|
84
83
|
SelfUtils.getSelves = (oldSelf, newSelf, deviceId) => {
|
|
85
84
|
const previous = oldSelf && SelfUtils.parse(oldSelf, deviceId);
|
|
86
85
|
const current = newSelf && SelfUtils.parse(newSelf, deviceId);
|
|
87
|
-
const updates = {};
|
|
86
|
+
const updates: any = {};
|
|
88
87
|
|
|
89
88
|
updates.isUserUnadmitted = SelfUtils.isUserUnadmitted(current);
|
|
90
89
|
updates.isUserAdmitted = SelfUtils.isUserAdmitted(previous, current);
|
|
@@ -116,7 +115,7 @@ SelfUtils.getSelves = (oldSelf, newSelf, deviceId) => {
|
|
|
116
115
|
* @param {Object} self
|
|
117
116
|
* @returns {boolean} isJoined
|
|
118
117
|
*/
|
|
119
|
-
SelfUtils.isJoined = (self) => self?.state === _JOINED_;
|
|
118
|
+
SelfUtils.isJoined = (self: any) => self?.state === _JOINED_;
|
|
120
119
|
|
|
121
120
|
/**
|
|
122
121
|
* Validate if the Meeting Layout Controls Layout has changed.
|
|
@@ -125,8 +124,7 @@ SelfUtils.isJoined = (self) => self?.state === _JOINED_;
|
|
|
125
124
|
* @param {Self} current - Current self state [per event]
|
|
126
125
|
* @returns {boolean} - If the MEeting Layout Controls Layout has changed.
|
|
127
126
|
*/
|
|
128
|
-
SelfUtils.layoutChanged = (previous, current) => current?.layout && previous?.layout !== current?.layout;
|
|
129
|
-
|
|
127
|
+
SelfUtils.layoutChanged = (previous: any, current: any) => current?.layout && previous?.layout !== current?.layout;
|
|
130
128
|
|
|
131
129
|
SelfUtils.isMediaInactive = (previous, current) => {
|
|
132
130
|
if (
|
|
@@ -198,7 +196,7 @@ SelfUtils.getModifiedBy = (self) => {
|
|
|
198
196
|
* @param {Object} self
|
|
199
197
|
* @returns {String}
|
|
200
198
|
*/
|
|
201
|
-
SelfUtils.getSelfIdentity = (self) => {
|
|
199
|
+
SelfUtils.getSelfIdentity = (self: any) => {
|
|
202
200
|
if (!self && !self.person) {
|
|
203
201
|
return null;
|
|
204
202
|
}
|
|
@@ -211,7 +209,7 @@ SelfUtils.getSelfIdentity = (self) => {
|
|
|
211
209
|
* @param {Object} self
|
|
212
210
|
* @returns {Boolean}
|
|
213
211
|
*/
|
|
214
|
-
SelfUtils.getRemoteMuted = (self) => {
|
|
212
|
+
SelfUtils.getRemoteMuted = (self: any) => {
|
|
215
213
|
if (!self || !self.controls || !self.controls.audio) {
|
|
216
214
|
return null;
|
|
217
215
|
}
|
|
@@ -244,28 +242,28 @@ SelfUtils.getStatus = (status) => ({
|
|
|
244
242
|
* @param {Object} changedSelf
|
|
245
243
|
* @returns {Boolean}
|
|
246
244
|
*/
|
|
247
|
-
SelfUtils.wasMediaInactiveOrReleased = (oldSelf = {}, changedSelf) => oldSelf.joinedWith && oldSelf.joinedWith.state === _JOINED_ && changedSelf.joinedWith.state === _LEFT_ &&
|
|
248
|
-
|
|
245
|
+
SelfUtils.wasMediaInactiveOrReleased = (oldSelf: any = {}, changedSelf: any) => oldSelf.joinedWith && oldSelf.joinedWith.state === _JOINED_ && changedSelf.joinedWith.state === _LEFT_ &&
|
|
246
|
+
(changedSelf.joinedWith.reason === MEETING_END_REASON.INACTIVE || changedSelf.joinedWith.reason === MEETING_END_REASON.MEDIA_RELEASED);
|
|
249
247
|
|
|
250
248
|
|
|
251
249
|
/**
|
|
252
250
|
* @param {Object} check
|
|
253
251
|
* @returns {Boolean}
|
|
254
252
|
*/
|
|
255
|
-
SelfUtils.isLocusUserUnadmitted = (check) => check && check.joinedWith?.intent?.type === _WAIT_ && check.state === _IDLE_;
|
|
253
|
+
SelfUtils.isLocusUserUnadmitted = (check: any) => check && check.joinedWith?.intent?.type === _WAIT_ && check.state === _IDLE_;
|
|
256
254
|
|
|
257
255
|
/**
|
|
258
256
|
* @param {Object} check
|
|
259
257
|
* @returns {Boolean}
|
|
260
258
|
*/
|
|
261
|
-
SelfUtils.isLocusUserAdmitted = (check) => check && check.joinedWith?.intent?.type !== _WAIT_ && check.state === _JOINED_;
|
|
259
|
+
SelfUtils.isLocusUserAdmitted = (check: any) => check && check.joinedWith?.intent?.type !== _WAIT_ && check.state === _JOINED_;
|
|
262
260
|
|
|
263
261
|
/**
|
|
264
262
|
* @param {Object} self
|
|
265
263
|
* @returns {Boolean}
|
|
266
264
|
* @throws {Error} when self is undefined
|
|
267
265
|
*/
|
|
268
|
-
SelfUtils.isUserUnadmitted = (self) => {
|
|
266
|
+
SelfUtils.isUserUnadmitted = (self: object) => {
|
|
269
267
|
if (!self) {
|
|
270
268
|
throw new ParameterError('self must be defined to determine if self is unadmitted as guest.');
|
|
271
269
|
}
|
|
@@ -291,7 +289,7 @@ SelfUtils.moderatorChanged = (oldSelf, changedSelf) => {
|
|
|
291
289
|
* @returns {Boolean}
|
|
292
290
|
* @throws {Error} if changed self was undefined
|
|
293
291
|
*/
|
|
294
|
-
SelfUtils.isDeviceObserving = (oldSelf, changedSelf) => oldSelf && oldSelf.joinedWith?.intent?.type === _MOVE_MEDIA_ && changedSelf && changedSelf.joinedWith?.intent?.type === _OBSERVE_;
|
|
292
|
+
SelfUtils.isDeviceObserving = (oldSelf: any, changedSelf: any) => oldSelf && oldSelf.joinedWith?.intent?.type === _MOVE_MEDIA_ && changedSelf && changedSelf.joinedWith?.intent?.type === _OBSERVE_;
|
|
295
293
|
|
|
296
294
|
/**
|
|
297
295
|
* @param {Object} oldSelf
|
|
@@ -299,7 +297,7 @@ SelfUtils.isDeviceObserving = (oldSelf, changedSelf) => oldSelf && oldSelf.joine
|
|
|
299
297
|
* @returns {Boolean}
|
|
300
298
|
* @throws {Error} if changed self was undefined
|
|
301
299
|
*/
|
|
302
|
-
SelfUtils.isUserAdmitted = (oldSelf, changedSelf) => {
|
|
300
|
+
SelfUtils.isUserAdmitted = (oldSelf: object, changedSelf: object) => {
|
|
303
301
|
if (!oldSelf) {
|
|
304
302
|
// if there was no previous locus, it couldn't have been admitted yet
|
|
305
303
|
return false;
|
|
@@ -329,7 +327,7 @@ SelfUtils.mutedByOthersChanged = (oldSelf, changedSelf) => {
|
|
|
329
327
|
((oldSelf.remoteMuted !== changedSelf.remoteMuted) || (changedSelf.remoteMuted && (oldSelf.unmuteAllowed !== changedSelf.unmuteAllowed)));
|
|
330
328
|
};
|
|
331
329
|
|
|
332
|
-
SelfUtils.localAudioUnmuteRequestedByServer = (oldSelf = {}, changedSelf) => {
|
|
330
|
+
SelfUtils.localAudioUnmuteRequestedByServer = (oldSelf: any = {}, changedSelf: any) => {
|
|
333
331
|
if (!changedSelf) {
|
|
334
332
|
throw new ParameterError('New self must be defined to determine if self received request to unmute.');
|
|
335
333
|
}
|
|
@@ -338,7 +336,7 @@ SelfUtils.localAudioUnmuteRequestedByServer = (oldSelf = {}, changedSelf) => {
|
|
|
338
336
|
};
|
|
339
337
|
|
|
340
338
|
|
|
341
|
-
SelfUtils.localAudioUnmuteRequiredByServer = (oldSelf = {}, changedSelf) => {
|
|
339
|
+
SelfUtils.localAudioUnmuteRequiredByServer = (oldSelf: any = {}, changedSelf: any) => {
|
|
342
340
|
if (!changedSelf) {
|
|
343
341
|
throw new ParameterError('New self must be defined to determine if localAudioUnmuteRequired changed.');
|
|
344
342
|
}
|
|
@@ -353,7 +351,7 @@ SelfUtils.localAudioUnmuteRequiredByServer = (oldSelf = {}, changedSelf) => {
|
|
|
353
351
|
* @returns {Object}
|
|
354
352
|
*/
|
|
355
353
|
|
|
356
|
-
SelfUtils.getSipUrl = (partner, type, sipUri) => {
|
|
354
|
+
SelfUtils.getSipUrl = (partner: any, type, sipUri) => {
|
|
357
355
|
// For webex meeting the sipUrl gets updated in info parser
|
|
358
356
|
if (partner && type === _CALL_) {
|
|
359
357
|
return {sipUri: partner.person.sipUrl || partner.person.id};
|