@webex/plugin-meetings 3.8.0 → 3.8.1-next.10
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/README.md +26 -13
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +70 -6
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +12 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +28 -123
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +3 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +78 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/interpretation/index.js +4 -4
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +37 -11
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +92 -12
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +432 -418
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +17 -17
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +94 -6
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/brbState.js +9 -2
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +21 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +678 -344
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +21 -22
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +4 -4
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +30 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +13 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +373 -68
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +5 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +136 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +14 -0
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +55 -9
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +3 -0
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +335 -353
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +137 -29
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +38 -0
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +36 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +10 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +40 -8
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +63 -27
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +107 -47
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/request.js +19 -3
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -2
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/util.js +5 -5
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +45 -27
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js +17 -0
- package/dist/roap/types.js.map +1 -0
- package/dist/types/common/errors/webex-errors.d.ts +7 -1
- package/dist/types/config.d.ts +3 -0
- package/dist/types/constants.d.ts +20 -85
- package/dist/types/controls-options-manager/enums.d.ts +4 -1
- package/dist/types/controls-options-manager/types.d.ts +10 -1
- package/dist/types/locus-info/index.d.ts +3 -3
- package/dist/types/locus-info/selfUtils.d.ts +216 -1
- package/dist/types/media/properties.d.ts +15 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +20 -0
- package/dist/types/meeting/index.d.ts +65 -1
- package/dist/types/meeting/muteState.d.ts +0 -1
- package/dist/types/meeting/request.d.ts +12 -1
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/meeting/util.d.ts +3 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +82 -1
- package/dist/types/meetings/index.d.ts +57 -0
- package/dist/types/member/index.d.ts +21 -6
- package/dist/types/member/types.d.ts +73 -14
- package/dist/types/member/util.d.ts +156 -1
- package/dist/types/members/collection.d.ts +6 -5
- package/dist/types/members/index.d.ts +32 -43
- package/dist/types/members/request.d.ts +26 -0
- package/dist/types/members/util.d.ts +27 -0
- package/dist/types/metrics/constants.d.ts +10 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +10 -1
- package/dist/types/reachability/clusterReachability.d.ts +15 -7
- package/dist/types/reachability/index.d.ts +10 -1
- package/dist/types/reachability/reachability.types.d.ts +5 -0
- package/dist/types/roap/index.d.ts +3 -2
- package/dist/types/roap/turnDiscovery.d.ts +5 -17
- package/dist/types/roap/types.d.ts +16 -0
- package/dist/webinar/index.js +2 -2
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -23
- package/src/breakouts/index.ts +69 -0
- package/src/common/errors/webex-errors.ts +8 -1
- package/src/config.ts +3 -0
- package/src/constants.ts +30 -90
- package/src/controls-options-manager/enums.ts +3 -0
- package/src/controls-options-manager/types.ts +16 -1
- package/src/controls-options-manager/util.ts +93 -0
- package/src/interpretation/index.ts +3 -3
- package/src/locus-info/controlsUtils.ts +59 -14
- package/src/locus-info/index.ts +97 -13
- package/src/locus-info/selfUtils.ts +496 -442
- package/src/media/index.ts +23 -21
- package/src/media/properties.ts +96 -0
- package/src/meeting/brbState.ts +11 -2
- package/src/meeting/in-meeting-actions.ts +40 -0
- package/src/meeting/index.ts +470 -105
- package/src/meeting/locusMediaRequest.ts +27 -22
- package/src/meeting/muteState.ts +4 -4
- package/src/meeting/request.ts +36 -1
- package/src/meeting/request.type.ts +7 -0
- package/src/meeting/util.ts +11 -2
- package/src/meeting-info/meeting-info-v2.ts +254 -8
- package/src/meeting-info/utilv2.ts +5 -0
- package/src/meetings/index.ts +148 -1
- package/src/meetings/util.ts +18 -0
- package/src/member/index.ts +68 -22
- package/src/member/types.ts +82 -16
- package/src/member/util.ts +357 -350
- package/src/members/collection.ts +4 -3
- package/src/members/index.ts +137 -18
- package/src/members/request.ts +44 -0
- package/src/members/util.ts +43 -1
- package/src/metrics/constants.ts +10 -0
- package/src/multistream/remoteMediaManager.ts +32 -10
- package/src/reachability/clusterReachability.ts +73 -26
- package/src/reachability/index.ts +62 -1
- package/src/reachability/reachability.types.ts +6 -0
- package/src/reachability/request.ts +7 -0
- package/src/reconnection-manager/index.ts +2 -2
- package/src/recording-controller/util.ts +17 -13
- package/src/roap/index.ts +3 -7
- package/src/roap/turnDiscovery.ts +34 -39
- package/src/roap/types.ts +23 -0
- package/src/webinar/index.ts +1 -1
- package/test/unit/spec/breakouts/index.ts +167 -95
- package/test/unit/spec/controls-options-manager/util.js +178 -0
- package/test/unit/spec/interpretation/index.ts +39 -1
- package/test/unit/spec/locus-info/controlsUtils.js +155 -9
- package/test/unit/spec/locus-info/index.js +209 -73
- package/test/unit/spec/locus-info/selfUtils.js +98 -24
- package/test/unit/spec/media/index.ts +150 -18
- package/test/unit/spec/media/properties.ts +130 -0
- package/test/unit/spec/meeting/brbState.ts +40 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +23 -4
- package/test/unit/spec/meeting/index.js +804 -139
- package/test/unit/spec/meeting/locusMediaRequest.ts +95 -87
- package/test/unit/spec/meeting/muteState.js +73 -2
- package/test/unit/spec/meeting/request.js +32 -1
- package/test/unit/spec/meeting/utils.js +119 -18
- package/test/unit/spec/meeting-info/meetinginfov2.js +484 -114
- package/test/unit/spec/meeting-info/utilv2.js +19 -0
- package/test/unit/spec/meetings/index.js +146 -2
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/members/index.js +304 -78
- package/test/unit/spec/members/request.js +68 -22
- package/test/unit/spec/members/utils.js +75 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +397 -118
- package/test/unit/spec/reachability/clusterReachability.ts +88 -56
- package/test/unit/spec/reachability/index.ts +97 -0
- package/test/unit/spec/reachability/request.js +47 -2
- package/test/unit/spec/reconnection-manager/index.js +4 -4
- package/test/unit/spec/roap/turnDiscovery.ts +110 -28
- package/test/unit/spec/webinar/index.ts +5 -0
- package/dist/annotation/annotation.types.d.ts +0 -42
- package/dist/annotation/constants.d.ts +0 -31
- package/dist/annotation/index.d.ts +0 -117
- package/dist/breakouts/breakout.d.ts +0 -8
- package/dist/breakouts/collection.d.ts +0 -5
- package/dist/breakouts/edit-lock-error.d.ts +0 -15
- package/dist/breakouts/events.d.ts +0 -8
- package/dist/breakouts/index.d.ts +0 -5
- package/dist/breakouts/request.d.ts +0 -22
- package/dist/breakouts/utils.d.ts +0 -15
- package/dist/common/browser-detection.d.ts +0 -9
- package/dist/common/collection.d.ts +0 -48
- package/dist/common/config.d.ts +0 -2
- package/dist/common/errors/captcha-error.d.ts +0 -15
- package/dist/common/errors/intent-to-join.d.ts +0 -16
- package/dist/common/errors/join-meeting.d.ts +0 -17
- package/dist/common/errors/media.d.ts +0 -15
- package/dist/common/errors/no-meeting-info.d.ts +0 -14
- package/dist/common/errors/parameter.d.ts +0 -15
- package/dist/common/errors/password-error.d.ts +0 -15
- package/dist/common/errors/permission.d.ts +0 -14
- package/dist/common/errors/reclaim-host-role-error.js +0 -149
- package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
- package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js +0 -33
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- package/dist/common/errors/reconnection.d.ts +0 -15
- package/dist/common/errors/stats.d.ts +0 -15
- package/dist/common/errors/webex-errors.d.ts +0 -93
- package/dist/common/errors/webex-meetings-error.d.ts +0 -20
- package/dist/common/events/events-scope.d.ts +0 -17
- package/dist/common/events/events.d.ts +0 -12
- package/dist/common/events/trigger-proxy.d.ts +0 -2
- package/dist/common/events/util.d.ts +0 -2
- package/dist/common/logs/logger-config.d.ts +0 -2
- package/dist/common/logs/logger-proxy.d.ts +0 -2
- package/dist/common/logs/request.d.ts +0 -36
- package/dist/common/queue.d.ts +0 -34
- package/dist/config.d.ts +0 -72
- package/dist/constants.d.ts +0 -1088
- package/dist/controls-options-manager/constants.d.ts +0 -4
- package/dist/controls-options-manager/enums.d.ts +0 -15
- package/dist/controls-options-manager/index.d.ts +0 -136
- package/dist/controls-options-manager/types.d.ts +0 -43
- package/dist/controls-options-manager/util.d.ts +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/interceptors/index.d.ts +0 -2
- package/dist/interceptors/locusRetry.d.ts +0 -27
- package/dist/interpretation/collection.d.ts +0 -5
- package/dist/interpretation/index.d.ts +0 -5
- package/dist/interpretation/siLanguage.d.ts +0 -5
- package/dist/locus-info/controlsUtils.d.ts +0 -2
- package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
- package/dist/locus-info/fullState.d.ts +0 -2
- package/dist/locus-info/hostUtils.d.ts +0 -2
- package/dist/locus-info/index.d.ts +0 -322
- package/dist/locus-info/infoUtils.d.ts +0 -2
- package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
- package/dist/locus-info/parser.d.ts +0 -272
- package/dist/locus-info/selfUtils.d.ts +0 -2
- package/dist/media/index.d.ts +0 -34
- package/dist/media/properties.d.ts +0 -93
- package/dist/media/util.d.ts +0 -2
- package/dist/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/mediaQualityMetrics/config.js +0 -502
- package/dist/mediaQualityMetrics/config.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -260
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/meeting/in-meeting-actions.d.ts +0 -167
- package/dist/meeting/index.d.ts +0 -1825
- package/dist/meeting/locusMediaRequest.d.ts +0 -74
- package/dist/meeting/muteState.d.ts +0 -178
- package/dist/meeting/request.d.ts +0 -295
- package/dist/meeting/request.type.d.ts +0 -11
- package/dist/meeting/state.d.ts +0 -9
- package/dist/meeting/util.d.ts +0 -119
- package/dist/meeting/voicea-meeting.d.ts +0 -16
- package/dist/meeting-info/collection.d.ts +0 -20
- package/dist/meeting-info/index.d.ts +0 -69
- package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
- package/dist/meeting-info/request.d.ts +0 -22
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/dist/meetings/collection.d.ts +0 -40
- package/dist/meetings/index.d.ts +0 -390
- package/dist/meetings/meetings.types.d.ts +0 -4
- package/dist/meetings/request.d.ts +0 -27
- package/dist/meetings/util.d.ts +0 -18
- package/dist/member/index.d.ts +0 -160
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/dist/member/types.d.ts +0 -32
- package/dist/member/util.d.ts +0 -2
- package/dist/members/collection.d.ts +0 -29
- package/dist/members/index.d.ts +0 -353
- package/dist/members/request.d.ts +0 -114
- package/dist/members/types.d.ts +0 -25
- package/dist/members/util.d.ts +0 -215
- package/dist/metrics/config.js +0 -276
- package/dist/metrics/config.js.map +0 -1
- package/dist/metrics/constants.d.ts +0 -70
- package/dist/metrics/index.d.ts +0 -45
- package/dist/multistream/mediaRequestManager.d.ts +0 -119
- package/dist/multistream/receiveSlot.d.ts +0 -68
- package/dist/multistream/receiveSlotManager.d.ts +0 -56
- package/dist/multistream/remoteMedia.d.ts +0 -72
- package/dist/multistream/remoteMediaGroup.d.ts +0 -49
- package/dist/multistream/remoteMediaManager.d.ts +0 -300
- package/dist/multistream/sendSlotManager.d.ts +0 -69
- package/dist/networkQualityMonitor/index.d.ts +0 -70
- package/dist/networkQualityMonitor/index.js +0 -221
- package/dist/networkQualityMonitor/index.js.map +0 -1
- package/dist/peer-connection-manager/index.js +0 -671
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -109
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/personal-meeting-room/index.d.ts +0 -47
- package/dist/personal-meeting-room/request.d.ts +0 -14
- package/dist/personal-meeting-room/util.d.ts +0 -2
- package/dist/reachability/clusterReachability.d.ts +0 -109
- package/dist/reachability/index.d.ts +0 -105
- package/dist/reachability/request.d.ts +0 -39
- package/dist/reachability/util.d.ts +0 -8
- package/dist/reactions/constants.d.ts +0 -3
- package/dist/reactions/reactions.d.ts +0 -4
- package/dist/reactions/reactions.type.d.ts +0 -52
- package/dist/reconnection-manager/index.d.ts +0 -136
- package/dist/recording-controller/enums.d.ts +0 -7
- package/dist/recording-controller/index.d.ts +0 -207
- package/dist/recording-controller/util.d.ts +0 -14
- package/dist/roap/collection.js +0 -62
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -275
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/index.d.ts +0 -86
- package/dist/roap/request.d.ts +0 -39
- package/dist/roap/state.js +0 -126
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/turnDiscovery.d.ts +0 -155
- package/dist/roap/util.js +0 -75
- package/dist/roap/util.js.map +0 -1
- package/dist/rtcMetrics/constants.d.ts +0 -4
- package/dist/rtcMetrics/constants.js +0 -11
- package/dist/rtcMetrics/constants.js.map +0 -1
- package/dist/rtcMetrics/index.d.ts +0 -61
- package/dist/rtcMetrics/index.js +0 -197
- package/dist/rtcMetrics/index.js.map +0 -1
- package/dist/statsAnalyzer/global.d.ts +0 -36
- package/dist/statsAnalyzer/global.js +0 -126
- package/dist/statsAnalyzer/global.js.map +0 -1
- package/dist/statsAnalyzer/index.d.ts +0 -217
- package/dist/statsAnalyzer/index.js +0 -1013
- package/dist/statsAnalyzer/index.js.map +0 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/statsAnalyzer/mqaUtil.js +0 -179
- package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
- package/dist/transcription/index.d.ts +0 -64
- package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/types/networkQualityMonitor/index.d.ts +0 -70
- package/dist/types/rtcMetrics/constants.d.ts +0 -4
- package/dist/types/rtcMetrics/index.d.ts +0 -71
- package/dist/types/statsAnalyzer/global.d.ts +0 -36
- package/dist/types/statsAnalyzer/index.d.ts +0 -217
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/webinar/collection.d.ts +0 -16
- package/dist/webinar/index.d.ts +0 -5
package/dist/member/util.js
CHANGED
@@ -9,367 +9,349 @@ exports.default = void 0;
|
|
9
9
|
var _types = require("./types");
|
10
10
|
var _constants = require("../constants");
|
11
11
|
var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
12
|
-
var MemberUtil = {
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
}
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
/**
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
}
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
}
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
}
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
/**
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
}
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
}
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
throw new _parameter.default('Interpretation support could not be processed, participant is undefined.');
|
214
|
-
}
|
215
|
-
return !participant.doesNotSupportSiInterpreter;
|
216
|
-
};
|
217
|
-
|
218
|
-
/**
|
219
|
-
* @param {Object} participant - The locus participant object.
|
220
|
-
* @returns {Boolean}
|
221
|
-
*/
|
222
|
-
MemberUtil.isLiveAnnotationSupported = function (participant) {
|
223
|
-
if (!participant) {
|
224
|
-
throw new _parameter.default('LiveAnnotation support could not be processed, participant is undefined.');
|
225
|
-
}
|
226
|
-
return !participant.annotatorAssignmentNotAllowed;
|
227
|
-
};
|
228
|
-
|
229
|
-
/**
|
230
|
-
* utility method for audio/video muted status
|
231
|
-
* @param {any} participant
|
232
|
-
* @param {String} statusAccessor
|
233
|
-
* @param {String} controlsAccessor
|
234
|
-
* @returns {Boolean | undefined}
|
235
|
-
*/
|
236
|
-
MemberUtil.isMuted = function (participant, statusAccessor, controlsAccessor) {
|
237
|
-
var _participant$controls7, _participant$controls8, _participant$status;
|
238
|
-
// check remote mute
|
239
|
-
var remoteMute = participant === null || participant === void 0 ? void 0 : (_participant$controls7 = participant.controls) === null || _participant$controls7 === void 0 ? void 0 : (_participant$controls8 = _participant$controls7[controlsAccessor]) === null || _participant$controls8 === void 0 ? void 0 : _participant$controls8.muted;
|
240
|
-
if (remoteMute === true) {
|
241
|
-
return true;
|
242
|
-
}
|
243
|
-
|
244
|
-
// check local mute
|
245
|
-
var localStatus = participant === null || participant === void 0 ? void 0 : (_participant$status = participant.status) === null || _participant$status === void 0 ? void 0 : _participant$status[statusAccessor];
|
246
|
-
if (localStatus === _constants._RECEIVE_ONLY_) {
|
247
|
-
return true;
|
248
|
-
}
|
249
|
-
if (localStatus === _constants._SEND_RECEIVE_) {
|
250
|
-
return false;
|
251
|
-
}
|
252
|
-
return remoteMute;
|
253
|
-
};
|
12
|
+
var MemberUtil = {
|
13
|
+
/**
|
14
|
+
* @param {Object} participant - The locus participant object.
|
15
|
+
* @returns {Boolean}
|
16
|
+
*/
|
17
|
+
canReclaimHost: function canReclaimHost(participant) {
|
18
|
+
if (!participant) {
|
19
|
+
throw new _parameter.default('canReclaimHostRole could not be processed, participant is undefined.');
|
20
|
+
}
|
21
|
+
return participant.canReclaimHostRole || false;
|
22
|
+
},
|
23
|
+
/**
|
24
|
+
* @param {Object} participant - The locus participant object.
|
25
|
+
* @returns {[ServerRoleShape]}
|
26
|
+
*/
|
27
|
+
getControlsRoles: function getControlsRoles(participant) {
|
28
|
+
var _participant$controls, _participant$controls2;
|
29
|
+
return participant === null || participant === void 0 ? void 0 : (_participant$controls = participant.controls) === null || _participant$controls === void 0 ? void 0 : (_participant$controls2 = _participant$controls.role) === null || _participant$controls2 === void 0 ? void 0 : _participant$controls2.roles;
|
30
|
+
},
|
31
|
+
/**
|
32
|
+
* Checks if the participant has the brb status enabled.
|
33
|
+
*
|
34
|
+
* @param {Participant} participant - The locus participant object.
|
35
|
+
* @returns {boolean} - True if the participant has brb enabled, false otherwise.
|
36
|
+
*/
|
37
|
+
isBrb: function isBrb(participant) {
|
38
|
+
var _participant$controls3, _participant$controls4;
|
39
|
+
return ((_participant$controls3 = participant.controls) === null || _participant$controls3 === void 0 ? void 0 : (_participant$controls4 = _participant$controls3.brb) === null || _participant$controls4 === void 0 ? void 0 : _participant$controls4.enabled) || false;
|
40
|
+
},
|
41
|
+
/**
|
42
|
+
* @param {Object} participant - The locus participant object.
|
43
|
+
* @param {ServerRoles} controlRole the search role
|
44
|
+
* @returns {Boolean}
|
45
|
+
*/
|
46
|
+
hasRole: function hasRole(participant, controlRole) {
|
47
|
+
var _MemberUtil$getContro;
|
48
|
+
return (_MemberUtil$getContro = MemberUtil.getControlsRoles(participant)) === null || _MemberUtil$getContro === void 0 ? void 0 : _MemberUtil$getContro.some(function (role) {
|
49
|
+
return role.type === controlRole && role.hasRole;
|
50
|
+
});
|
51
|
+
},
|
52
|
+
/**
|
53
|
+
* @param {Object} participant - The locus participant object.
|
54
|
+
* @returns {Boolean}
|
55
|
+
*/
|
56
|
+
hasCohost: function hasCohost(participant) {
|
57
|
+
return MemberUtil.hasRole(participant, _types.ServerRoles.Cohost) || false;
|
58
|
+
},
|
59
|
+
/**
|
60
|
+
* @param {Object} participant - The locus participant object.
|
61
|
+
* @returns {Boolean}
|
62
|
+
*/
|
63
|
+
hasModerator: function hasModerator(participant) {
|
64
|
+
return MemberUtil.hasRole(participant, _types.ServerRoles.Moderator) || false;
|
65
|
+
},
|
66
|
+
/**
|
67
|
+
* @param {Object} participant - The locus participant object.
|
68
|
+
* @returns {Boolean}
|
69
|
+
*/
|
70
|
+
hasPresenter: function hasPresenter(participant) {
|
71
|
+
return MemberUtil.hasRole(participant, _types.ServerRoles.Presenter) || false;
|
72
|
+
},
|
73
|
+
/**
|
74
|
+
* @param {Object} participant - The locus participant object.
|
75
|
+
* @returns {IExternalRoles}
|
76
|
+
*/
|
77
|
+
extractControlRoles: function extractControlRoles(participant) {
|
78
|
+
var roles = {
|
79
|
+
cohost: MemberUtil.hasCohost(participant),
|
80
|
+
moderator: MemberUtil.hasModerator(participant),
|
81
|
+
presenter: MemberUtil.hasPresenter(participant)
|
82
|
+
};
|
83
|
+
return roles;
|
84
|
+
},
|
85
|
+
/**
|
86
|
+
* @param {Object} participant - The locus participant object.
|
87
|
+
* @returns {Boolean}
|
88
|
+
*/
|
89
|
+
isUser: function isUser(participant) {
|
90
|
+
return participant && participant.type === _constants._USER_;
|
91
|
+
},
|
92
|
+
isModerator: function isModerator(participant) {
|
93
|
+
return participant && participant.moderator;
|
94
|
+
},
|
95
|
+
/**
|
96
|
+
* @param {Object} participant - The locus participant object.
|
97
|
+
* @returns {Boolean}
|
98
|
+
*/
|
99
|
+
isGuest: function isGuest(participant) {
|
100
|
+
return participant && participant.guest;
|
101
|
+
},
|
102
|
+
/**
|
103
|
+
* @param {Object} participant - The locus participant object.
|
104
|
+
* @returns {Boolean}
|
105
|
+
*/
|
106
|
+
isDevice: function isDevice(participant) {
|
107
|
+
return participant && participant.type === _constants._RESOURCE_ROOM_;
|
108
|
+
},
|
109
|
+
isModeratorAssignmentProhibited: function isModeratorAssignmentProhibited(participant) {
|
110
|
+
return participant && participant.moderatorAssignmentNotAllowed;
|
111
|
+
},
|
112
|
+
isPresenterAssignmentProhibited: function isPresenterAssignmentProhibited(participant) {
|
113
|
+
return participant && participant.presenterAssignmentNotAllowed;
|
114
|
+
},
|
115
|
+
/**
|
116
|
+
* checks to see if the participant id is the same as the passed id
|
117
|
+
* there are multiple ids that can be used
|
118
|
+
* @param {Object} participant - The locus participant object.
|
119
|
+
* @param {String} id
|
120
|
+
* @returns {Boolean}
|
121
|
+
*/
|
122
|
+
isSame: function isSame(participant, id) {
|
123
|
+
return participant && (participant.id === id || participant.person && participant.person.id === id);
|
124
|
+
},
|
125
|
+
/**
|
126
|
+
* @param {Object} participant - The locus participant object.
|
127
|
+
* @param {Boolean} isGuest
|
128
|
+
* @param {String} status
|
129
|
+
* @returns {Boolean}
|
130
|
+
*/
|
131
|
+
isNotAdmitted: function isNotAdmitted(participant, isGuest, status) {
|
132
|
+
return participant && participant.guest && (participant.devices && participant.devices[0] && participant.devices[0].intent && participant.devices[0].intent.type === _constants._WAIT_ &&
|
133
|
+
// @ts-ignore
|
134
|
+
isGuest && status === _constants._IN_LOBBY_ ||
|
135
|
+
// @ts-ignore
|
136
|
+
!status === _constants._IN_MEETING_);
|
137
|
+
},
|
138
|
+
/**
|
139
|
+
* @param {Object} participant - The locus participant object.
|
140
|
+
* @returns {Boolean}
|
141
|
+
*/
|
142
|
+
isAudioMuted: function isAudioMuted(participant) {
|
143
|
+
if (!participant) {
|
144
|
+
throw new _parameter.default('Audio could not be processed, participant is undefined.');
|
145
|
+
}
|
146
|
+
return MemberUtil.isMuted(participant, _constants.AUDIO_STATUS, _constants.AUDIO);
|
147
|
+
},
|
148
|
+
/**
|
149
|
+
* @param {Object} participant - The locus participant object.
|
150
|
+
* @returns {Boolean}
|
151
|
+
*/
|
152
|
+
isVideoMuted: function isVideoMuted(participant) {
|
153
|
+
if (!participant) {
|
154
|
+
throw new _parameter.default('Video could not be processed, participant is undefined.');
|
155
|
+
}
|
156
|
+
return MemberUtil.isMuted(participant, _constants.VIDEO_STATUS, _constants.VIDEO);
|
157
|
+
},
|
158
|
+
/**
|
159
|
+
* @param {Object} participant - The locus participant object.
|
160
|
+
* @returns {Boolean}
|
161
|
+
*/
|
162
|
+
isHandRaised: function isHandRaised(participant) {
|
163
|
+
var _participant$controls5, _participant$controls6;
|
164
|
+
if (!participant) {
|
165
|
+
throw new _parameter.default('Raise hand could not be processed, participant is undefined.');
|
166
|
+
}
|
167
|
+
return ((_participant$controls5 = participant.controls) === null || _participant$controls5 === void 0 ? void 0 : (_participant$controls6 = _participant$controls5.hand) === null || _participant$controls6 === void 0 ? void 0 : _participant$controls6.raised) || false;
|
168
|
+
},
|
169
|
+
/**
|
170
|
+
* @param {Object} participant - The locus participant object.
|
171
|
+
* @returns {Boolean}
|
172
|
+
*/
|
173
|
+
isBreakoutsSupported: function isBreakoutsSupported(participant) {
|
174
|
+
if (!participant) {
|
175
|
+
throw new _parameter.default('Breakout support could not be processed, participant is undefined.');
|
176
|
+
}
|
177
|
+
return !participant.doesNotSupportBreakouts;
|
178
|
+
},
|
179
|
+
/**
|
180
|
+
* @param {Object} participant - The locus participant object.
|
181
|
+
* @returns {Boolean}
|
182
|
+
*/
|
183
|
+
isInterpretationSupported: function isInterpretationSupported(participant) {
|
184
|
+
if (!participant) {
|
185
|
+
throw new _parameter.default('Interpretation support could not be processed, participant is undefined.');
|
186
|
+
}
|
187
|
+
return !participant.doesNotSupportSiInterpreter;
|
188
|
+
},
|
189
|
+
/**
|
190
|
+
* @param {Object} participant - The locus participant object.
|
191
|
+
* @returns {Boolean}
|
192
|
+
*/
|
193
|
+
isLiveAnnotationSupported: function isLiveAnnotationSupported(participant) {
|
194
|
+
if (!participant) {
|
195
|
+
throw new _parameter.default('LiveAnnotation support could not be processed, participant is undefined.');
|
196
|
+
}
|
197
|
+
return !participant.annotatorAssignmentNotAllowed;
|
198
|
+
},
|
199
|
+
/**
|
200
|
+
* utility method for audio/video muted status
|
201
|
+
* @param {any} participant
|
202
|
+
* @param {String} statusAccessor
|
203
|
+
* @param {String} controlsAccessor
|
204
|
+
* @returns {Boolean | undefined}
|
205
|
+
*/
|
206
|
+
isMuted: function isMuted(participant, statusAccessor, controlsAccessor) {
|
207
|
+
var _participant$controls7, _participant$controls8, _participant$status;
|
208
|
+
// check remote mute
|
209
|
+
var remoteMute = participant === null || participant === void 0 ? void 0 : (_participant$controls7 = participant.controls) === null || _participant$controls7 === void 0 ? void 0 : (_participant$controls8 = _participant$controls7[controlsAccessor]) === null || _participant$controls8 === void 0 ? void 0 : _participant$controls8.muted;
|
210
|
+
if (remoteMute === true) {
|
211
|
+
return true;
|
212
|
+
}
|
254
213
|
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
214
|
+
// check local mute
|
215
|
+
var localStatus = participant === null || participant === void 0 ? void 0 : (_participant$status = participant.status) === null || _participant$status === void 0 ? void 0 : _participant$status[statusAccessor];
|
216
|
+
if (localStatus === _constants._RECEIVE_ONLY_) {
|
217
|
+
return true;
|
218
|
+
}
|
219
|
+
if (localStatus === _constants._SEND_RECEIVE_) {
|
220
|
+
return false;
|
221
|
+
}
|
222
|
+
return remoteMute;
|
223
|
+
},
|
224
|
+
/**
|
225
|
+
* utility method for getting the recording member for later comparison
|
226
|
+
* @param {Object} controls
|
227
|
+
* @returns {String|null}
|
228
|
+
*/
|
229
|
+
getRecordingMember: function getRecordingMember(controls) {
|
230
|
+
if (!controls) {
|
231
|
+
return null;
|
232
|
+
}
|
233
|
+
if (controls.record && controls.record.recording && controls.record.meta) {
|
234
|
+
return controls.record.meta.modifiedBy;
|
235
|
+
}
|
262
236
|
return null;
|
263
|
-
}
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
if (!participant) {
|
276
|
-
throw new _parameter.default('Recording could not be processed, participant is undefined.');
|
277
|
-
}
|
278
|
-
if (participant.controls && participant.controls.localRecord) {
|
279
|
-
return participant.controls.localRecord.recording;
|
280
|
-
}
|
281
|
-
return false;
|
282
|
-
};
|
283
|
-
MemberUtil.isRemovable = function (isSelf, isGuest, isInMeeting, type) {
|
284
|
-
if (isGuest || isSelf) {
|
285
|
-
return false;
|
286
|
-
}
|
287
|
-
if (type === _constants._CALL_) {
|
288
|
-
return false;
|
289
|
-
}
|
290
|
-
if (isInMeeting) {
|
291
|
-
return true;
|
292
|
-
}
|
293
|
-
return false;
|
294
|
-
};
|
295
|
-
MemberUtil.isMutable = function (isSelf, isDevice, isInMeeting, isMuted, type) {
|
296
|
-
if (!isInMeeting) {
|
237
|
+
},
|
238
|
+
/**
|
239
|
+
* @param {Object} participant - The locus participant object.
|
240
|
+
* @returns {Boolean}
|
241
|
+
*/
|
242
|
+
isRecording: function isRecording(participant) {
|
243
|
+
if (!participant) {
|
244
|
+
throw new _parameter.default('Recording could not be processed, participant is undefined.');
|
245
|
+
}
|
246
|
+
if (participant.controls && participant.controls.localRecord) {
|
247
|
+
return participant.controls.localRecord.recording;
|
248
|
+
}
|
297
249
|
return false;
|
298
|
-
}
|
299
|
-
|
250
|
+
},
|
251
|
+
isRemovable: function isRemovable(isSelf, isGuest, isInMeeting, type) {
|
252
|
+
if (isGuest || isSelf) {
|
253
|
+
return false;
|
254
|
+
}
|
255
|
+
if (type === _constants._CALL_) {
|
256
|
+
return false;
|
257
|
+
}
|
258
|
+
if (isInMeeting) {
|
259
|
+
return true;
|
260
|
+
}
|
300
261
|
return false;
|
301
|
-
}
|
302
|
-
|
262
|
+
},
|
263
|
+
isMutable: function isMutable(isSelf, isDevice, isInMeeting, isMuted, type) {
|
264
|
+
if (!isInMeeting) {
|
265
|
+
return false;
|
266
|
+
}
|
267
|
+
if (isMuted) {
|
268
|
+
return false;
|
269
|
+
}
|
270
|
+
if (type === _constants._CALL_) {
|
271
|
+
return false;
|
272
|
+
}
|
273
|
+
if (isSelf || isDevice) {
|
274
|
+
return true;
|
275
|
+
}
|
303
276
|
return false;
|
304
|
-
}
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
return foundDevice ? _constants._IN_LOBBY_ : _constants._NOT_IN_MEETING_;
|
277
|
+
},
|
278
|
+
/**
|
279
|
+
* @param {Object} participant - The locus participant object.
|
280
|
+
* @returns {String}
|
281
|
+
*/
|
282
|
+
extractStatus: function extractStatus(participant) {
|
283
|
+
if (!(participant && participant.devices && participant.devices.length)) {
|
284
|
+
return _constants._NOT_IN_MEETING_;
|
285
|
+
}
|
286
|
+
if (participant.state === _constants._JOINED_) {
|
287
|
+
return _constants._IN_MEETING_;
|
288
|
+
}
|
289
|
+
if (participant.state === _constants._IDLE_) {
|
290
|
+
if (participant.devices && participant.devices.length > 0) {
|
291
|
+
var foundDevice = participant.devices.find(function (device) {
|
292
|
+
return device.intent && (device.intent.type === _constants._WAIT_ || device.intent.type === _constants._OBSERVE_);
|
293
|
+
});
|
294
|
+
return foundDevice ? _constants._IN_LOBBY_ : _constants._NOT_IN_MEETING_;
|
295
|
+
}
|
296
|
+
return _constants._NOT_IN_MEETING_;
|
297
|
+
}
|
298
|
+
if (participant.state === _constants._LEFT_) {
|
299
|
+
return _constants._NOT_IN_MEETING_;
|
328
300
|
}
|
329
301
|
return _constants._NOT_IN_MEETING_;
|
302
|
+
},
|
303
|
+
/**
|
304
|
+
* @param {Object} participant - The locus participant object.
|
305
|
+
* @returns {String}
|
306
|
+
*/
|
307
|
+
extractId: function extractId(participant) {
|
308
|
+
if (participant) {
|
309
|
+
return participant.id;
|
310
|
+
}
|
311
|
+
return null;
|
312
|
+
},
|
313
|
+
/**
|
314
|
+
* extracts the media status from nested participant object
|
315
|
+
* @param {Object} participant - The locus participant object.
|
316
|
+
* @returns {Object}
|
317
|
+
*/
|
318
|
+
extractMediaStatus: function extractMediaStatus(participant) {
|
319
|
+
var _participant$status2, _participant$status3;
|
320
|
+
if (!participant) {
|
321
|
+
throw new _parameter.default('Media status could not be extracted, participant is undefined.');
|
322
|
+
}
|
323
|
+
return {
|
324
|
+
audio: (_participant$status2 = participant.status) === null || _participant$status2 === void 0 ? void 0 : _participant$status2.audioStatus,
|
325
|
+
video: (_participant$status3 = participant.status) === null || _participant$status3 === void 0 ? void 0 : _participant$status3.videoStatus
|
326
|
+
};
|
327
|
+
},
|
328
|
+
/**
|
329
|
+
* @param {Object} participant - The locus participant object.
|
330
|
+
* @returns {String}
|
331
|
+
*/
|
332
|
+
extractName: function extractName(participant) {
|
333
|
+
if (participant && participant.person) {
|
334
|
+
return participant.person.name;
|
335
|
+
}
|
336
|
+
return null;
|
337
|
+
},
|
338
|
+
/**
|
339
|
+
* @param {Object} participant - The locus participant object.
|
340
|
+
* @returns {String}
|
341
|
+
*/
|
342
|
+
extractPairedWithParticipantUrl: function extractPairedWithParticipantUrl(participant) {
|
343
|
+
var _participant$devices;
|
344
|
+
var participantUrl;
|
345
|
+
participant === null || participant === void 0 ? void 0 : (_participant$devices = participant.devices) === null || _participant$devices === void 0 ? void 0 : _participant$devices.forEach(function (device) {
|
346
|
+
var _device$intents;
|
347
|
+
device === null || device === void 0 ? void 0 : (_device$intents = device.intents) === null || _device$intents === void 0 ? void 0 : _device$intents.forEach(function (intent) {
|
348
|
+
if ((intent === null || intent === void 0 ? void 0 : intent.type) === _constants._OBSERVE_ && intent !== null && intent !== void 0 && intent.associatedWith) {
|
349
|
+
participantUrl = intent.associatedWith;
|
350
|
+
}
|
351
|
+
});
|
352
|
+
});
|
353
|
+
return participantUrl;
|
330
354
|
}
|
331
|
-
if (participant.state === _constants._LEFT_) {
|
332
|
-
return _constants._NOT_IN_MEETING_;
|
333
|
-
}
|
334
|
-
return _constants._NOT_IN_MEETING_;
|
335
|
-
};
|
336
|
-
|
337
|
-
/**
|
338
|
-
* @param {Object} participant - The locus participant object.
|
339
|
-
* @returns {String}
|
340
|
-
*/
|
341
|
-
MemberUtil.extractId = function (participant) {
|
342
|
-
if (participant) {
|
343
|
-
return participant.id;
|
344
|
-
}
|
345
|
-
return null;
|
346
|
-
};
|
347
|
-
|
348
|
-
/**
|
349
|
-
* extracts the media status from nested participant object
|
350
|
-
* @param {Object} participant - The locus participant object.
|
351
|
-
* @returns {Object}
|
352
|
-
*/
|
353
|
-
MemberUtil.extractMediaStatus = function (participant) {
|
354
|
-
var _participant$status2, _participant$status3;
|
355
|
-
if (!participant) {
|
356
|
-
throw new _parameter.default('Media status could not be extracted, participant is undefined.');
|
357
|
-
}
|
358
|
-
return {
|
359
|
-
audio: (_participant$status2 = participant.status) === null || _participant$status2 === void 0 ? void 0 : _participant$status2.audioStatus,
|
360
|
-
video: (_participant$status3 = participant.status) === null || _participant$status3 === void 0 ? void 0 : _participant$status3.videoStatus
|
361
|
-
};
|
362
|
-
};
|
363
|
-
|
364
|
-
/**
|
365
|
-
* @param {Object} participant - The locus participant object.
|
366
|
-
* @returns {String}
|
367
|
-
*/
|
368
|
-
MemberUtil.extractName = function (participant) {
|
369
|
-
if (participant && participant.person) {
|
370
|
-
return participant.person.name;
|
371
|
-
}
|
372
|
-
return null;
|
373
355
|
};
|
374
356
|
var _default = exports.default = MemberUtil;
|
375
357
|
//# sourceMappingURL=util.js.map
|