@webex/plugin-meetings 3.0.0-beta.14 → 3.0.0-beta.16
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/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +5 -26
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +5 -26
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +6 -27
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +5 -26
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +5 -26
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +4 -25
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +5 -26
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +5 -26
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +6 -41
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -24
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +35 -61
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +4 -14
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +1 -5
- package/dist/config.js.map +1 -1
- package/dist/constants.js +45 -40
- package/dist/constants.js.map +1 -1
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +10 -28
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +101 -193
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +0 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +12 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +87 -123
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +16 -81
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +43 -97
- package/dist/media/index.js.map +1 -1
- package/dist/media/internal-media-core-wrapper.js +0 -4
- package/dist/media/internal-media-core-wrapper.js.map +1 -1
- package/dist/media/properties.js +64 -110
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +10 -12
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/effectsState.js +120 -192
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +0 -13
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +819 -1591
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +31 -78
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +160 -230
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +0 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +19 -158
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +3 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +10 -33
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +179 -268
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -16
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +98 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +137 -228
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +3 -21
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +450 -582
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +7 -30
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +99 -155
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +49 -89
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +17 -68
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +2 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +72 -194
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +21 -56
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +9 -38
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +0 -2
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/constants.js +1 -2
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +48 -136
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +12 -28
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/multistreamMedia.js +11 -21
- package/dist/multistream/multistreamMedia.js.map +1 -1
- package/dist/multistream/receiveSlot.js +7 -47
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +38 -77
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +11 -56
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +6 -40
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +221 -380
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +28 -57
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +10 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -33
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +100 -166
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +2 -18
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/reactions.js +0 -2
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +2 -6
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +294 -459
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +18 -53
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +13 -55
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +10 -52
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/global.js +0 -2
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +66 -174
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +54 -53
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +13 -45
- package/dist/transcription/index.js.map +1 -1
- package/internal-README.md +7 -6
- package/package.json +18 -18
- package/src/common/browser-detection.ts +9 -6
- package/src/common/collection.ts +3 -1
- package/src/common/errors/captcha-error.ts +6 -6
- package/src/common/errors/intent-to-join.ts +6 -6
- package/src/common/errors/join-meeting.ts +12 -8
- package/src/common/errors/media.ts +6 -6
- package/src/common/errors/parameter.ts +9 -6
- package/src/common/errors/password-error.ts +6 -6
- package/src/common/errors/permission.ts +5 -5
- package/src/common/errors/reconnection.ts +6 -6
- package/src/common/errors/stats.ts +6 -6
- package/src/common/errors/webex-errors.ts +7 -5
- package/src/common/errors/webex-meetings-error.ts +1 -1
- package/src/common/events/events-scope.ts +5 -1
- package/src/common/events/events.ts +5 -1
- package/src/common/events/trigger-proxy.ts +8 -3
- package/src/common/events/util.ts +1 -2
- package/src/common/logs/logger-proxy.ts +21 -10
- package/src/common/logs/request.ts +11 -8
- package/src/config.ts +11 -11
- package/src/constants.ts +1 -1
- package/src/index.js +1 -1
- package/src/locus-info/controlsUtils.ts +34 -24
- package/src/locus-info/fullState.ts +15 -11
- package/src/locus-info/hostUtils.ts +4 -3
- package/src/locus-info/index.ts +25 -34
- package/src/locus-info/infoUtils.ts +12 -4
- package/src/locus-info/mediaSharesUtils.ts +4 -4
- package/src/locus-info/parser.ts +45 -68
- package/src/locus-info/selfUtils.ts +106 -57
- package/src/media/index.ts +123 -135
- package/src/media/internal-media-core-wrapper.ts +2 -2
- package/src/media/properties.ts +30 -20
- package/src/media/util.ts +1 -1
- package/src/mediaQualityMetrics/config.ts +46 -46
- package/src/meeting/effectsState.ts +35 -35
- package/src/meeting/in-meeting-actions.ts +7 -3
- package/src/meeting/index.ts +1559 -1292
- package/src/meeting/muteState.ts +62 -31
- package/src/meeting/request.ts +155 -116
- package/src/meeting/request.type.ts +8 -8
- package/src/meeting/state.ts +45 -30
- package/src/meeting/util.ts +101 -70
- package/src/meeting-info/collection.ts +2 -1
- package/src/meeting-info/index.ts +32 -30
- package/src/meeting-info/meeting-info-v2.ts +106 -108
- package/src/meeting-info/request.ts +9 -3
- package/src/meeting-info/util.ts +54 -46
- package/src/meeting-info/utilv2.ts +59 -53
- package/src/meetings/collection.ts +1 -1
- package/src/meetings/index.ts +512 -440
- package/src/meetings/request.ts +26 -24
- package/src/meetings/util.ts +29 -29
- package/src/member/index.ts +55 -49
- package/src/member/util.ts +26 -13
- package/src/members/collection.ts +0 -1
- package/src/members/index.ts +182 -126
- package/src/members/request.ts +46 -14
- package/src/members/util.ts +44 -42
- package/src/metrics/config.ts +254 -81
- package/src/metrics/constants.ts +0 -2
- package/src/metrics/index.ts +84 -71
- package/src/multistream/multistreamMedia.ts +1 -0
- package/src/multistream/receiveSlot.ts +1 -0
- package/src/multistream/receiveSlotManager.ts +1 -0
- package/src/multistream/remoteMedia.ts +1 -1
- package/src/multistream/remoteMediaGroup.ts +2 -1
- package/src/multistream/remoteMediaManager.ts +3 -0
- package/src/networkQualityMonitor/index.ts +20 -23
- package/src/personal-meeting-room/index.ts +12 -16
- package/src/personal-meeting-room/request.ts +10 -3
- package/src/personal-meeting-room/util.ts +3 -3
- package/src/reachability/index.ts +61 -59
- package/src/reachability/request.ts +36 -32
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +4 -3
- package/src/reconnection-manager/index.ts +139 -84
- package/src/roap/index.ts +46 -38
- package/src/roap/request.ts +44 -31
- package/src/roap/turnDiscovery.ts +59 -30
- package/src/statsAnalyzer/global.ts +30 -33
- package/src/statsAnalyzer/index.ts +432 -175
- package/src/statsAnalyzer/mqaUtil.ts +178 -72
- package/src/transcription/index.ts +34 -32
- package/test/integration/spec/journey.js +664 -463
- package/test/integration/spec/space-meeting.js +319 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/fixture/locus.js +92 -90
- package/test/unit/spec/locus-info/controlsUtils.js +5 -5
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1 -2
- package/test/unit/spec/locus-info/infoUtils.js +26 -33
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +513 -685
- package/test/unit/spec/locus-info/parser.js +3 -9
- package/test/unit/spec/locus-info/selfConstant.js +72 -103
- package/test/unit/spec/locus-info/selfUtils.js +21 -12
- package/test/unit/spec/meeting/effectsState.js +36 -46
- package/test/unit/spec/meeting/in-meeting-actions.ts +2 -3
- package/test/unit/spec/meeting/index.js +1279 -685
- package/test/unit/spec/meeting/muteState.js +42 -33
- package/test/unit/spec/meeting/request.js +57 -46
- package/test/unit/spec/meeting/utils.js +78 -53
- package/test/unit/spec/meeting-info/meetinginfov2.js +100 -73
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +110 -74
- package/test/unit/spec/meetings/collection.js +1 -1
- package/test/unit/spec/meetings/index.js +438 -257
- package/test/unit/spec/meetings/utils.js +14 -12
- package/test/unit/spec/member/index.js +0 -1
- package/test/unit/spec/member/util.js +5 -6
- package/test/unit/spec/members/index.js +104 -54
- package/test/unit/spec/members/request.js +29 -20
- package/test/unit/spec/members/utils.js +8 -5
- package/test/unit/spec/metrics/index.js +16 -21
- package/test/unit/spec/networkQualityMonitor/index.js +21 -15
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/index.ts +9 -11
- package/test/unit/spec/reconnection-manager/index.js +16 -18
- package/test/unit/spec/roap/turnDiscovery.ts +22 -19
- package/test/unit/spec/stats-analyzer/index.js +25 -20
- package/test/utils/cmr.js +44 -42
- package/test/utils/testUtils.js +83 -74
- package/test/utils/webex-config.js +18 -18
- package/test/utils/webex-test-users.js +53 -50
package/src/meetings/request.ts
CHANGED
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
import {StatelessWebexPlugin} from '@webex/webex-core';
|
|
3
3
|
|
|
4
4
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
5
|
-
import {
|
|
6
|
-
HTTP_VERBS,
|
|
7
|
-
API,
|
|
8
|
-
RESOURCE
|
|
9
|
-
} from '../constants';
|
|
5
|
+
import {HTTP_VERBS, API, RESOURCE} from '../constants';
|
|
10
6
|
|
|
11
7
|
/**
|
|
12
8
|
* @class MeetingRequest
|
|
@@ -15,16 +11,18 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
15
11
|
/**
|
|
16
12
|
* get all the active meetings for the user
|
|
17
13
|
* @returns {Array} return locus array
|
|
18
|
-
|
|
14
|
+
*/
|
|
19
15
|
getActiveMeetings() {
|
|
20
16
|
// @ts-ignore
|
|
21
17
|
return this.request({
|
|
22
18
|
api: API.LOCUS,
|
|
23
|
-
resource: RESOURCE.LOCI
|
|
19
|
+
resource: RESOURCE.LOCI,
|
|
24
20
|
})
|
|
25
21
|
.then((res) => this.determineRedirections(res.body))
|
|
26
22
|
.catch((error) => {
|
|
27
|
-
LoggerProxy.logger.error(
|
|
23
|
+
LoggerProxy.logger.error(
|
|
24
|
+
`Meetings:request#getActiveMeetings --> failed to get locus details, ${error}`
|
|
25
|
+
);
|
|
28
26
|
});
|
|
29
27
|
}
|
|
30
28
|
|
|
@@ -40,13 +38,12 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
40
38
|
/**
|
|
41
39
|
* get user meeting preference information
|
|
42
40
|
* @returns {Promise<object>} getMeetingPreferences
|
|
43
|
-
|
|
41
|
+
*/
|
|
44
42
|
getMeetingPreferences() {
|
|
45
43
|
// @ts-ignore
|
|
46
44
|
return this.webex.internal.services.getMeetingPreferences();
|
|
47
45
|
}
|
|
48
46
|
|
|
49
|
-
|
|
50
47
|
// locus federation, determines and populate locus if the responseBody has remote URLs to fetch locus details
|
|
51
48
|
|
|
52
49
|
/**
|
|
@@ -57,21 +54,26 @@ export default class MeetingRequest extends StatelessWebexPlugin {
|
|
|
57
54
|
determineRedirections(responseBody: any) {
|
|
58
55
|
if (responseBody.remoteLocusClusterUrls && responseBody.remoteLocusClusterUrls.length) {
|
|
59
56
|
// @ts-ignore
|
|
60
|
-
return Promise.all(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
57
|
+
return Promise.all(
|
|
58
|
+
responseBody.remoteLocusClusterUrls.map((url) =>
|
|
59
|
+
this.request({
|
|
60
|
+
method: HTTP_VERBS.GET,
|
|
61
|
+
url,
|
|
62
|
+
runWhitelistedDomains: true, // allows auth token for whitelisted domain
|
|
63
|
+
})
|
|
64
|
+
.then((res) => {
|
|
65
|
+
responseBody.loci = responseBody.loci.concat(res.body.loci);
|
|
66
|
+
responseBody.locusUrls = responseBody.locusUrls.concat(res.body.locusUrls);
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
68
|
+
return Promise.resolve(responseBody);
|
|
69
|
+
})
|
|
70
|
+
.catch((error) => {
|
|
71
|
+
LoggerProxy.logger.error(
|
|
72
|
+
`Meetings:request#determineRedirections --> failed to get locus details from url: ${url}, reason: ${error}`
|
|
73
|
+
);
|
|
74
|
+
})
|
|
75
|
+
)
|
|
76
|
+
).then(() => Promise.resolve(responseBody));
|
|
75
77
|
}
|
|
76
78
|
|
|
77
79
|
return Promise.resolve(responseBody);
|
package/src/meetings/util.ts
CHANGED
|
@@ -7,28 +7,28 @@ import {
|
|
|
7
7
|
LOCUSEVENT,
|
|
8
8
|
CORRELATION_ID,
|
|
9
9
|
EVENT_TRIGGERS,
|
|
10
|
-
ROAP
|
|
10
|
+
ROAP,
|
|
11
11
|
} from '../constants';
|
|
12
12
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
13
13
|
import Trigger from '../common/events/trigger-proxy';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
* Meetings Media Codec Missing Event
|
|
17
|
+
* Emitted when H.264 codec is not
|
|
18
|
+
* found in the browser.
|
|
19
|
+
* @event media:codec:missing
|
|
20
|
+
* @instance
|
|
21
|
+
* @memberof MeetingsUtil
|
|
22
|
+
*/
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
* Meetings Media Codec Loaded Event
|
|
26
|
+
* Emitted when H.264 codec has been
|
|
27
|
+
* loaded in the browser.
|
|
28
|
+
* @event media:codec:loaded
|
|
29
|
+
* @instance
|
|
30
|
+
* @memberof MeetingsUtil
|
|
31
|
+
*/
|
|
32
32
|
|
|
33
33
|
const MeetingsUtil: any = {};
|
|
34
34
|
|
|
@@ -42,23 +42,20 @@ MeetingsUtil.handleRoapMercury = (envelope, meetingCollection) => {
|
|
|
42
42
|
const meeting = meetingCollection.getByKey(CORRELATION_ID, data.correlationId);
|
|
43
43
|
|
|
44
44
|
if (meeting) {
|
|
45
|
-
const {
|
|
46
|
-
seq, messageType, tieBreaker, errorType, errorCause
|
|
47
|
-
} = data.message;
|
|
45
|
+
const {seq, messageType, tieBreaker, errorType, errorCause} = data.message;
|
|
48
46
|
|
|
49
47
|
if (messageType === ROAP.ROAP_TYPES.TURN_DISCOVERY_RESPONSE) {
|
|
50
48
|
// turn discovery is not part of normal roap protocol and so we are not handling it
|
|
51
49
|
// through the usual roap state machine
|
|
52
50
|
meeting.roap.turnDiscovery.handleTurnDiscoveryResponse(data.message);
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
51
|
+
} else {
|
|
55
52
|
const roapMessage = {
|
|
56
53
|
seq,
|
|
57
54
|
messageType,
|
|
58
55
|
sdp: data.message.sdps?.length > 0 ? data.message.sdps[0] : undefined,
|
|
59
56
|
tieBreaker,
|
|
60
57
|
errorType,
|
|
61
|
-
errorCause
|
|
58
|
+
errorCause,
|
|
62
59
|
};
|
|
63
60
|
|
|
64
61
|
meeting.mediaProperties.webrtcMediaConnection.roapMessageReceived(roapMessage);
|
|
@@ -116,9 +113,10 @@ MeetingsUtil.hasH264Codec = async () => {
|
|
|
116
113
|
hasCodec = true;
|
|
117
114
|
}
|
|
118
115
|
pc.close();
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
116
|
+
} catch (error) {
|
|
117
|
+
LoggerProxy.logger.warn(
|
|
118
|
+
'Meetings:util#hasH264Codec --> Error creating peerConnection for H.264 test.'
|
|
119
|
+
);
|
|
122
120
|
}
|
|
123
121
|
|
|
124
122
|
return hasCodec;
|
|
@@ -143,8 +141,8 @@ MeetingsUtil.checkH264Support = async function checkH264Support(options: {
|
|
|
143
141
|
const {firstChecked, disableNotifications} = options || {};
|
|
144
142
|
const delay = 5e3; // ms
|
|
145
143
|
const maxDuration = 3e5; // ms
|
|
146
|
-
const shouldTrigger =
|
|
147
|
-
const shouldStopChecking = firstChecked &&
|
|
144
|
+
const shouldTrigger = firstChecked === undefined;
|
|
145
|
+
const shouldStopChecking = firstChecked && Date.now() - firstChecked >= maxDuration;
|
|
148
146
|
|
|
149
147
|
// Disable notifications and start H.264 download only
|
|
150
148
|
if (disableNotifications) {
|
|
@@ -159,7 +157,7 @@ MeetingsUtil.checkH264Support = async function checkH264Support(options: {
|
|
|
159
157
|
this,
|
|
160
158
|
{
|
|
161
159
|
file: 'meetings/util',
|
|
162
|
-
function: 'checkH264Support'
|
|
160
|
+
function: 'checkH264Support',
|
|
163
161
|
},
|
|
164
162
|
EVENT_TRIGGERS.MEDIA_CODEC_LOADED
|
|
165
163
|
);
|
|
@@ -170,7 +168,9 @@ MeetingsUtil.checkH264Support = async function checkH264Support(options: {
|
|
|
170
168
|
|
|
171
169
|
// Stop checking if past the timelimit
|
|
172
170
|
if (shouldStopChecking) {
|
|
173
|
-
LoggerProxy.logger.error(
|
|
171
|
+
LoggerProxy.logger.error(
|
|
172
|
+
'Meetings:util#checkH264Support --> Timed out waiting for H264 codec to load.'
|
|
173
|
+
);
|
|
174
174
|
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
@@ -181,7 +181,7 @@ MeetingsUtil.checkH264Support = async function checkH264Support(options: {
|
|
|
181
181
|
this,
|
|
182
182
|
{
|
|
183
183
|
file: 'meetings/util',
|
|
184
|
-
function: 'checkH264Support'
|
|
184
|
+
function: 'checkH264Support',
|
|
185
185
|
},
|
|
186
186
|
EVENT_TRIGGERS.MEDIA_CODEC_MISSING
|
|
187
187
|
);
|
package/src/member/index.ts
CHANGED
|
@@ -1,12 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
3
|
*/
|
|
4
|
-
import {
|
|
5
|
-
MEETINGS,
|
|
6
|
-
_IN_LOBBY_,
|
|
7
|
-
_NOT_IN_MEETING_,
|
|
8
|
-
_IN_MEETING_
|
|
9
|
-
} from '../constants';
|
|
4
|
+
import {MEETINGS, _IN_LOBBY_, _NOT_IN_MEETING_, _IN_MEETING_} from '../constants';
|
|
10
5
|
|
|
11
6
|
import MemberUtil from './util';
|
|
12
7
|
|
|
@@ -51,20 +46,22 @@ export default class Member {
|
|
|
51
46
|
*/
|
|
52
47
|
constructor(
|
|
53
48
|
participant: object,
|
|
54
|
-
options:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
49
|
+
options:
|
|
50
|
+
| {
|
|
51
|
+
selfId: string;
|
|
52
|
+
hostId: string;
|
|
53
|
+
contentSharingId: string;
|
|
54
|
+
type: string;
|
|
55
|
+
}
|
|
56
|
+
| any = {}
|
|
60
57
|
) {
|
|
61
|
-
|
|
58
|
+
/**
|
|
62
59
|
* The server participant object
|
|
63
60
|
* @instance
|
|
64
61
|
* @type {Object}
|
|
65
62
|
* @private
|
|
66
63
|
* @memberof Member
|
|
67
|
-
|
|
64
|
+
*/
|
|
68
65
|
this.participant = null;
|
|
69
66
|
/**
|
|
70
67
|
* The member id
|
|
@@ -72,7 +69,7 @@ export default class Member {
|
|
|
72
69
|
* @type {String}
|
|
73
70
|
* @public
|
|
74
71
|
* @memberof Member
|
|
75
|
-
|
|
72
|
+
*/
|
|
76
73
|
this.id = null;
|
|
77
74
|
/**
|
|
78
75
|
* The member name
|
|
@@ -80,34 +77,34 @@ export default class Member {
|
|
|
80
77
|
* @type {String}
|
|
81
78
|
* @public
|
|
82
79
|
* @memberof Member
|
|
83
|
-
|
|
80
|
+
*/
|
|
84
81
|
this.name = null;
|
|
85
82
|
/**
|
|
86
83
|
* @instance
|
|
87
84
|
* @type {Boolean}
|
|
88
85
|
* @public
|
|
89
86
|
* @memberof Member
|
|
90
|
-
|
|
87
|
+
*/
|
|
91
88
|
this.isAudioMuted = null;
|
|
92
89
|
/**
|
|
93
90
|
* @instance
|
|
94
91
|
* @type {Boolean}
|
|
95
92
|
* @public
|
|
96
93
|
* @memberof Member
|
|
97
|
-
|
|
94
|
+
*/
|
|
98
95
|
this.isVideoMuted = null;
|
|
99
96
|
/**
|
|
100
97
|
* @instance
|
|
101
98
|
* @type {Boolean}
|
|
102
99
|
* @public
|
|
103
100
|
* @memberof Member
|
|
104
|
-
|
|
101
|
+
*/
|
|
105
102
|
this.isHandRaised = null;
|
|
106
103
|
/**
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
104
|
+
* @instance
|
|
105
|
+
* @type {Boolean}
|
|
106
|
+
* @public
|
|
107
|
+
* @memberof Member
|
|
111
108
|
*/
|
|
112
109
|
this.isSelf = null;
|
|
113
110
|
/**
|
|
@@ -115,113 +112,113 @@ export default class Member {
|
|
|
115
112
|
* @type {Boolean}
|
|
116
113
|
* @public
|
|
117
114
|
* @memberof Member
|
|
118
|
-
|
|
115
|
+
*/
|
|
119
116
|
this.isHost = null;
|
|
120
117
|
/**
|
|
121
118
|
* @instance
|
|
122
119
|
* @type {Boolean}
|
|
123
120
|
* @public
|
|
124
121
|
* @memberof Member
|
|
125
|
-
|
|
122
|
+
*/
|
|
126
123
|
this.isGuest = null;
|
|
127
124
|
/**
|
|
128
125
|
* @instance
|
|
129
126
|
* @type {Boolean}
|
|
130
127
|
* @public
|
|
131
128
|
* @memberof Member
|
|
132
|
-
|
|
129
|
+
*/
|
|
133
130
|
this.isInLobby = null;
|
|
134
131
|
/**
|
|
135
132
|
* @instance
|
|
136
133
|
* @type {Boolean}
|
|
137
134
|
* @public
|
|
138
135
|
* @memberof Member
|
|
139
|
-
|
|
136
|
+
*/
|
|
140
137
|
this.isInMeeting = null;
|
|
141
138
|
/**
|
|
142
139
|
* @instance
|
|
143
140
|
* @type {Boolean}
|
|
144
141
|
* @public
|
|
145
142
|
* @memberof Member
|
|
146
|
-
|
|
143
|
+
*/
|
|
147
144
|
this.isNotAdmitted = null;
|
|
148
145
|
/**
|
|
149
146
|
* @instance
|
|
150
147
|
* @type {Boolean}
|
|
151
148
|
* @public
|
|
152
149
|
* @memberof Member
|
|
153
|
-
|
|
150
|
+
*/
|
|
154
151
|
this.isContentSharing = null;
|
|
155
152
|
/**
|
|
156
153
|
* @instance
|
|
157
154
|
* @type {Boolean}
|
|
158
155
|
* @public
|
|
159
156
|
* @memberof Member
|
|
160
|
-
|
|
157
|
+
*/
|
|
161
158
|
this.status = null;
|
|
162
159
|
/**
|
|
163
160
|
* @instance
|
|
164
161
|
* @type {Boolean}
|
|
165
162
|
* @public
|
|
166
163
|
* @memberof Member
|
|
167
|
-
|
|
164
|
+
*/
|
|
168
165
|
this.isDevice = null;
|
|
169
166
|
/**
|
|
170
167
|
* @instance
|
|
171
168
|
* @type {Boolean}
|
|
172
169
|
* @public
|
|
173
170
|
* @memberof Member
|
|
174
|
-
|
|
171
|
+
*/
|
|
175
172
|
this.isUser = null;
|
|
176
173
|
/**
|
|
177
|
-
|
|
174
|
+
* Is this member associated to another user by way of pairing (typical of devices)
|
|
178
175
|
* @instance
|
|
179
176
|
* @type {String}
|
|
180
177
|
* @public
|
|
181
178
|
* @memberof Member
|
|
182
|
-
|
|
179
|
+
*/
|
|
183
180
|
this.associatedUser = null;
|
|
184
181
|
/**
|
|
185
182
|
* @instance
|
|
186
183
|
* @type {Boolean}
|
|
187
184
|
* @public
|
|
188
185
|
* @memberof Member
|
|
189
|
-
|
|
186
|
+
*/
|
|
190
187
|
this.isRecording = null;
|
|
191
188
|
/**
|
|
192
189
|
* @instance
|
|
193
190
|
* @type {Boolean}
|
|
194
191
|
* @public
|
|
195
192
|
* @memberof Member
|
|
196
|
-
|
|
193
|
+
*/
|
|
197
194
|
this.isMutable = null;
|
|
198
195
|
/**
|
|
199
196
|
* @instance
|
|
200
197
|
* @type {Boolean}
|
|
201
198
|
* @public
|
|
202
199
|
* @memberof Member
|
|
203
|
-
|
|
200
|
+
*/
|
|
204
201
|
this.isRemovable = null;
|
|
205
202
|
/**
|
|
206
203
|
* @instance
|
|
207
204
|
* @type {String}
|
|
208
205
|
* @private
|
|
209
206
|
* @memberof Member
|
|
210
|
-
|
|
207
|
+
*/
|
|
211
208
|
this.type = null;
|
|
212
209
|
/**
|
|
213
210
|
* @instance
|
|
214
211
|
* @type {Boolean}
|
|
215
212
|
* @public
|
|
216
213
|
* @memberof Member
|
|
217
|
-
|
|
214
|
+
*/
|
|
218
215
|
this.isModerator = null;
|
|
219
216
|
/**
|
|
220
217
|
* @instance
|
|
221
218
|
* @type {Boolean}
|
|
222
219
|
* @public
|
|
223
220
|
* @memberof Member
|
|
224
|
-
|
|
221
|
+
*/
|
|
225
222
|
this.isModeratorAssignmentProhibited = null;
|
|
226
223
|
// TODO: more participant types
|
|
227
224
|
// such as native client, web client, is a device, what type of phone, etc
|
|
@@ -249,7 +246,8 @@ export default class Member {
|
|
|
249
246
|
this.isUser = MemberUtil.isUser(participant);
|
|
250
247
|
this.isDevice = MemberUtil.isDevice(participant);
|
|
251
248
|
this.isModerator = MemberUtil.isModerator(participant);
|
|
252
|
-
this.isModeratorAssignmentProhibited =
|
|
249
|
+
this.isModeratorAssignmentProhibited =
|
|
250
|
+
MemberUtil.isModeratorAssignmentProhibited(participant);
|
|
253
251
|
this.processStatus(participant);
|
|
254
252
|
// must be done last
|
|
255
253
|
this.isNotAdmitted = MemberUtil.isNotAdmitted(participant, this.isGuest, this.status);
|
|
@@ -282,9 +280,20 @@ export default class Member {
|
|
|
282
280
|
*/
|
|
283
281
|
private processMember() {
|
|
284
282
|
// must occur after self, guest, meeting, and type properties are calculated
|
|
285
|
-
this.isRemovable = MemberUtil.isRemovable(
|
|
283
|
+
this.isRemovable = MemberUtil.isRemovable(
|
|
284
|
+
this.isSelf,
|
|
285
|
+
this.isGuest,
|
|
286
|
+
this.isInMeeting,
|
|
287
|
+
this.type
|
|
288
|
+
);
|
|
286
289
|
// must occur after self, device, meeting, mute status, and type properties are calculated
|
|
287
|
-
this.isMutable = MemberUtil.isMutable(
|
|
290
|
+
this.isMutable = MemberUtil.isMutable(
|
|
291
|
+
this.isSelf,
|
|
292
|
+
this.isDevice,
|
|
293
|
+
this.isInMeeting,
|
|
294
|
+
this.isAudioMuted,
|
|
295
|
+
this.type
|
|
296
|
+
);
|
|
288
297
|
}
|
|
289
298
|
|
|
290
299
|
/**
|
|
@@ -359,8 +368,7 @@ export default class Member {
|
|
|
359
368
|
public processIsContentSharing(participant: object, sharingId: string) {
|
|
360
369
|
if (MemberUtil.isUser(participant)) {
|
|
361
370
|
this.isContentSharing = MemberUtil.isSame(participant, sharingId);
|
|
362
|
-
}
|
|
363
|
-
else if (MemberUtil.isDevice(participant)) {
|
|
371
|
+
} else if (MemberUtil.isDevice(participant)) {
|
|
364
372
|
this.isContentSharing = MemberUtil.isAssociatedSame(participant, sharingId);
|
|
365
373
|
}
|
|
366
374
|
}
|
|
@@ -388,8 +396,7 @@ export default class Member {
|
|
|
388
396
|
private processIsSelf(participant: object, selfId: string) {
|
|
389
397
|
if (MemberUtil.isUser(participant)) {
|
|
390
398
|
this.isSelf = MemberUtil.isSame(participant, selfId);
|
|
391
|
-
}
|
|
392
|
-
else if (MemberUtil.isDevice(participant)) {
|
|
399
|
+
} else if (MemberUtil.isDevice(participant)) {
|
|
393
400
|
this.isSelf = MemberUtil.isAssociatedSame(participant, selfId);
|
|
394
401
|
this.associatedUser = selfId;
|
|
395
402
|
}
|
|
@@ -406,8 +413,7 @@ export default class Member {
|
|
|
406
413
|
private processIsHost(participant: object, hostId: string) {
|
|
407
414
|
if (MemberUtil.isUser(participant)) {
|
|
408
415
|
this.isHost = MemberUtil.isSame(participant, hostId);
|
|
409
|
-
}
|
|
410
|
-
else if (MemberUtil.isDevice(participant)) {
|
|
416
|
+
} else if (MemberUtil.isDevice(participant)) {
|
|
411
417
|
this.isHost = MemberUtil.isAssociatedSame(participant, hostId);
|
|
412
418
|
}
|
|
413
419
|
}
|
package/src/member/util.ts
CHANGED
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
VIDEO_STATUS,
|
|
14
14
|
_SEND_RECEIVE_,
|
|
15
15
|
_RECEIVE_ONLY_,
|
|
16
|
-
_CALL_
|
|
16
|
+
_CALL_,
|
|
17
17
|
} from '../constants';
|
|
18
18
|
import ParameterError from '../common/errors/parameter';
|
|
19
19
|
|
|
@@ -39,7 +39,8 @@ MemberUtil.isGuest = (participant: any) => participant && participant.guest;
|
|
|
39
39
|
*/
|
|
40
40
|
MemberUtil.isDevice = (participant: any) => participant && participant.type === _RESOURCE_ROOM_;
|
|
41
41
|
|
|
42
|
-
MemberUtil.isModeratorAssignmentProhibited = (participant) =>
|
|
42
|
+
MemberUtil.isModeratorAssignmentProhibited = (participant) =>
|
|
43
|
+
participant && participant.moderatorAssignmentNotAllowed;
|
|
43
44
|
|
|
44
45
|
/**
|
|
45
46
|
* checks to see if the participant id is the same as the passed id
|
|
@@ -48,8 +49,8 @@ MemberUtil.isModeratorAssignmentProhibited = (participant) => participant && par
|
|
|
48
49
|
* @param {String} id
|
|
49
50
|
* @returns {Boolean}
|
|
50
51
|
*/
|
|
51
|
-
MemberUtil.isSame = (participant: any, id: string) =>
|
|
52
|
-
(participant.id === id || participant.person && participant.person.id === id);
|
|
52
|
+
MemberUtil.isSame = (participant: any, id: string) =>
|
|
53
|
+
participant && (participant.id === id || (participant.person && participant.person.id === id));
|
|
53
54
|
|
|
54
55
|
/**
|
|
55
56
|
* checks to see if the participant id is the same as the passed id for associated devices
|
|
@@ -58,9 +59,12 @@ MemberUtil.isSame = (participant: any, id: string) => participant &&
|
|
|
58
59
|
* @param {String} id
|
|
59
60
|
* @returns {Boolean}
|
|
60
61
|
*/
|
|
61
|
-
MemberUtil.isAssociatedSame = (participant: any, id: string) =>
|
|
62
|
-
participant
|
|
63
|
-
participant.associatedUsers
|
|
62
|
+
MemberUtil.isAssociatedSame = (participant: any, id: string) =>
|
|
63
|
+
participant &&
|
|
64
|
+
participant.associatedUsers &&
|
|
65
|
+
participant.associatedUsers.some(
|
|
66
|
+
(user) => user.id === id || (user.person && user.person.id === id)
|
|
67
|
+
);
|
|
64
68
|
|
|
65
69
|
/**
|
|
66
70
|
* @param {Object} participant the locus participant
|
|
@@ -68,11 +72,17 @@ participant.associatedUsers.some((user) => (user.id === id || user.person && use
|
|
|
68
72
|
* @param {String} status
|
|
69
73
|
* @returns {Boolean}
|
|
70
74
|
*/
|
|
71
|
-
MemberUtil.isNotAdmitted = (participant: any, isGuest: boolean, status: string) =>
|
|
72
|
-
participant
|
|
73
|
-
participant.
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
MemberUtil.isNotAdmitted = (participant: any, isGuest: boolean, status: string) =>
|
|
76
|
+
participant &&
|
|
77
|
+
participant.guest &&
|
|
78
|
+
((participant.devices &&
|
|
79
|
+
participant.devices[0] &&
|
|
80
|
+
participant.devices[0].intent &&
|
|
81
|
+
participant.devices[0].intent.type === _WAIT_ &&
|
|
82
|
+
// @ts-ignore
|
|
83
|
+
isGuest &&
|
|
84
|
+
status === _IN_LOBBY_) ||
|
|
85
|
+
!status === _IN_MEETING_);
|
|
76
86
|
|
|
77
87
|
/**
|
|
78
88
|
* @param {Object} participant the locus participant
|
|
@@ -214,7 +224,10 @@ MemberUtil.extractStatus = (participant: any) => {
|
|
|
214
224
|
}
|
|
215
225
|
if (participant.state === _IDLE_) {
|
|
216
226
|
if (participant.devices && participant.devices.length > 0) {
|
|
217
|
-
const foundDevice = participant.devices.find(
|
|
227
|
+
const foundDevice = participant.devices.find(
|
|
228
|
+
(device) =>
|
|
229
|
+
device.intent && (device.intent.type === _WAIT_ || device.intent.type === _OBSERVE_)
|
|
230
|
+
);
|
|
218
231
|
|
|
219
232
|
return foundDevice ? _IN_LOBBY_ : _NOT_IN_MEETING_;
|
|
220
233
|
}
|