@webex/plugin-meetings 3.0.0-beta.2 → 3.0.0-beta.20
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/breakouts/breakout.js +116 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/index.js +226 -0
- package/dist/breakouts/index.js.map +1 -0
- 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 +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- 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 +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- 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 +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- 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 +5 -25
- 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 +37 -60
- 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 +6 -6
- package/dist/config.js.map +1 -1
- package/dist/constants.js +88 -46
- 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 +12 -29
- 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 +184 -190
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +3 -37
- 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 +92 -118
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +34 -91
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +67 -111
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +80 -114
- 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 +125 -190
- package/dist/meeting/effectsState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +5 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +1692 -1925
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +36 -77
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +224 -230
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +43 -215
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +14 -32
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +193 -268
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- 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 +5 -20
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +490 -560
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +24 -41
- 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 +78 -86
- package/dist/member/index.js.map +1 -1
- package/dist/member/util.js +31 -68
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +3 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +93 -200
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +16 -39
- 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 +55 -135
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +57 -32
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/multistreamMedia.js +15 -21
- package/dist/multistream/multistreamMedia.js.map +1 -1
- package/dist/multistream/receiveSlot.js +10 -50
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +45 -82
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +18 -58
- 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 +362 -416
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +36 -57
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- 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 +138 -182
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +3 -18
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +322 -455
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +343 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +63 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +39 -64
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +94 -113
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +85 -94
- 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 +85 -175
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +72 -53
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/internal-README.md +7 -6
- package/package.json +25 -20
- package/src/breakouts/README.md +190 -0
- package/src/breakouts/breakout.ts +110 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/index.ts +225 -0
- package/src/common/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +8 -7
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +22 -9
- package/src/common/queue.ts +1 -2
- package/src/{config.js → config.ts} +17 -12
- package/src/constants.ts +40 -1
- package/src/index.js +1 -1
- package/src/locus-info/controlsUtils.ts +114 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +148 -64
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +19 -8
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +17 -17
- package/src/locus-info/{parser.js → parser.ts} +67 -79
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +123 -68
- package/src/media/{index.js → index.ts} +181 -131
- package/src/media/{properties.js → properties.ts} +47 -28
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/{config.js → config.ts} +46 -46
- package/src/meeting/{effectsState.js → effectsState.ts} +47 -41
- package/src/meeting/in-meeting-actions.ts +15 -3
- package/src/meeting/{index.js → index.ts} +2263 -1427
- package/src/meeting/{muteState.js → muteState.ts} +78 -42
- package/src/meeting/{request.js → request.ts} +292 -142
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/{util.js → util.ts} +112 -115
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/{index.js → index.ts} +42 -36
- package/src/meeting-info/meeting-info-v2.ts +273 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +60 -51
- package/src/meeting-info/{utilv2.js → utilv2.ts} +65 -58
- package/src/meetings/{collection.js → collection.ts} +6 -3
- package/src/meetings/index.ts +1159 -0
- package/src/meetings/{request.js → request.ts} +32 -25
- package/src/meetings/{util.js → util.ts} +34 -32
- package/src/member/{index.js → index.ts} +102 -56
- package/src/member/{util.js → util.ts} +52 -25
- package/src/members/{collection.js → collection.ts} +2 -2
- package/src/members/{index.js → index.ts} +219 -142
- package/src/members/{request.js → request.ts} +60 -16
- package/src/members/{util.js → util.ts} +50 -48
- package/src/metrics/{config.js → config.ts} +254 -83
- package/src/metrics/{constants.js → constants.ts} +0 -2
- package/src/metrics/{index.js → index.ts} +106 -74
- package/src/multistream/mediaRequestManager.ts +81 -15
- package/src/multistream/multistreamMedia.ts +5 -0
- package/src/multistream/receiveSlot.ts +18 -12
- package/src/multistream/receiveSlotManager.ts +23 -21
- package/src/multistream/remoteMedia.ts +15 -5
- package/src/multistream/remoteMediaGroup.ts +4 -3
- package/src/multistream/remoteMediaManager.ts +153 -37
- package/src/networkQualityMonitor/{index.js → index.ts} +37 -25
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/{index.js → index.ts} +99 -83
- package/src/reachability/request.ts +39 -33
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/{index.js → index.ts} +195 -102
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +315 -0
- package/src/recording-controller/util.ts +58 -0
- package/src/roap/{index.js → index.ts} +73 -56
- package/src/roap/request.ts +157 -0
- package/src/roap/turnDiscovery.ts +77 -37
- package/src/statsAnalyzer/{global.js → global.ts} +30 -33
- package/src/statsAnalyzer/{index.js → index.ts} +468 -192
- package/src/statsAnalyzer/mqaUtil.ts +290 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- package/test/integration/spec/journey.js +664 -463
- package/test/integration/spec/space-meeting.js +320 -206
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/breakouts/breakout.ts +119 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/index.ts +293 -0
- 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 +25 -5
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +104 -2
- package/test/unit/spec/locus-info/infoUtils.js +41 -32
- 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 +97 -103
- package/test/unit/spec/locus-info/selfUtils.js +105 -12
- package/test/unit/spec/media/index.ts +31 -47
- package/test/unit/spec/media/properties.ts +9 -9
- package/test/unit/spec/meeting/effectsState.js +39 -45
- package/test/unit/spec/meeting/in-meeting-actions.ts +5 -2
- package/test/unit/spec/meeting/index.js +2017 -742
- package/test/unit/spec/meeting/muteState.js +42 -33
- package/test/unit/spec/meeting/request.js +115 -44
- package/test/unit/spec/meeting/utils.js +104 -171
- 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 +439 -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 +31 -7
- 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/multistream/mediaRequestManager.ts +316 -50
- package/test/unit/spec/multistream/receiveSlot.ts +6 -6
- package/test/unit/spec/multistream/receiveSlotManager.ts +13 -13
- package/test/unit/spec/multistream/remoteMedia.ts +10 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +5 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +412 -65
- 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 +58 -26
- package/test/unit/spec/reconnection-manager/index.js +102 -9
- package/test/unit/spec/recording-controller/index.js +231 -0
- package/test/unit/spec/recording-controller/util.js +102 -0
- package/test/unit/spec/roap/index.ts +2 -1
- package/test/unit/spec/roap/request.ts +114 -0
- package/test/unit/spec/roap/turnDiscovery.ts +64 -45
- package/test/unit/spec/stats-analyzer/index.js +27 -22
- 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 +54 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/index.js +0 -1015
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
|
@@ -13,25 +13,26 @@ import {MEETING_ERRORS} from '../constants';
|
|
|
13
13
|
import BrowserDetection from '../common/browser-detection';
|
|
14
14
|
|
|
15
15
|
import {
|
|
16
|
-
error,
|
|
17
|
-
|
|
16
|
+
error,
|
|
17
|
+
eventType,
|
|
18
|
+
errorCodes as ERROR_CODE,
|
|
19
|
+
OS_NAME,
|
|
20
|
+
UNKNOWN,
|
|
21
|
+
CLIENT_NAME,
|
|
22
|
+
mediaType,
|
|
18
23
|
} from './config';
|
|
19
24
|
|
|
20
25
|
const OSMap = {
|
|
26
|
+
// @ts-ignore
|
|
21
27
|
'Chrome OS': OS_NAME.chrome,
|
|
22
28
|
macOS: OS_NAME.MAC,
|
|
23
29
|
Windows: OS_NAME.WINDOWS,
|
|
24
30
|
iOS: OS_NAME.IOS,
|
|
25
31
|
Android: OS_NAME.ANDROID,
|
|
26
|
-
Linux: OS_NAME.LINUX
|
|
32
|
+
Linux: OS_NAME.LINUX,
|
|
27
33
|
};
|
|
28
34
|
|
|
29
|
-
const {
|
|
30
|
-
getOSName,
|
|
31
|
-
getOSVersion,
|
|
32
|
-
getBrowserName,
|
|
33
|
-
getBrowserVersion
|
|
34
|
-
} = BrowserDetection();
|
|
35
|
+
const {getOSName, getOSVersion, getBrowserName, getBrowserVersion} = BrowserDetection();
|
|
35
36
|
|
|
36
37
|
// Apply a CIDR /28 format to the IPV4 and /96 to the IPV6 addresses
|
|
37
38
|
// For reference : https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
|
|
@@ -76,34 +77,41 @@ const triggerTimers = ({event, meeting, data}) => {
|
|
|
76
77
|
* @class Metrics
|
|
77
78
|
*/
|
|
78
79
|
class Metrics {
|
|
80
|
+
static instance: Metrics;
|
|
81
|
+
|
|
82
|
+
_events: any;
|
|
83
|
+
keys: any;
|
|
84
|
+
meetingCollection: any;
|
|
85
|
+
webex: any;
|
|
86
|
+
|
|
79
87
|
/**
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
88
|
+
* Create Metrics Object
|
|
89
|
+
* @constructor
|
|
90
|
+
* @public
|
|
91
|
+
* @memberof Meetings
|
|
92
|
+
*/
|
|
85
93
|
constructor() {
|
|
86
94
|
if (!Metrics.instance) {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
/**
|
|
96
|
+
* @instance
|
|
97
|
+
* @type {Array}
|
|
98
|
+
* @private
|
|
99
|
+
* @memberof Metrics
|
|
100
|
+
*/
|
|
93
101
|
this._events = [];
|
|
94
102
|
/**
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
* @instance
|
|
104
|
+
* @type {MeetingCollection}
|
|
105
|
+
* @private
|
|
106
|
+
* @memberof Metrics
|
|
107
|
+
*/
|
|
100
108
|
this.meetingCollection = null;
|
|
101
109
|
/**
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
110
|
+
* @instance
|
|
111
|
+
* @type {MeetingCollection}
|
|
112
|
+
* @private
|
|
113
|
+
* @memberof Metrics
|
|
114
|
+
*/
|
|
107
115
|
this.keys = Object.values(eventType);
|
|
108
116
|
/**
|
|
109
117
|
* @instance
|
|
@@ -114,6 +122,7 @@ class Metrics {
|
|
|
114
122
|
Metrics.instance = this;
|
|
115
123
|
}
|
|
116
124
|
|
|
125
|
+
// eslint-disable-next-line no-constructor-return
|
|
117
126
|
return Metrics.instance;
|
|
118
127
|
}
|
|
119
128
|
|
|
@@ -125,7 +134,7 @@ class Metrics {
|
|
|
125
134
|
*
|
|
126
135
|
* @returns {void}
|
|
127
136
|
*/
|
|
128
|
-
initialSetup(meetingCollection, webex) {
|
|
137
|
+
initialSetup(meetingCollection: object, webex: object) {
|
|
129
138
|
this.meetingCollection = meetingCollection;
|
|
130
139
|
this.webex = webex;
|
|
131
140
|
}
|
|
@@ -139,12 +148,14 @@ class Metrics {
|
|
|
139
148
|
* @param {object} options.event
|
|
140
149
|
* @returns {object} null
|
|
141
150
|
*/
|
|
142
|
-
postEvent(options) {
|
|
151
|
+
postEvent(options: {meeting?: any; meetingId?: string; data?: object; event?: any} | any) {
|
|
143
152
|
const {meetingId, data = {}, event} = options;
|
|
144
153
|
let {meeting} = options;
|
|
145
154
|
|
|
146
155
|
if (this.keys.indexOf(event) === -1) {
|
|
147
|
-
LoggerProxy.logger.error(
|
|
156
|
+
LoggerProxy.logger.error(
|
|
157
|
+
`Metrics:index#postEvent --> Event ${event} doesn't exist in dictionary`
|
|
158
|
+
);
|
|
148
159
|
}
|
|
149
160
|
|
|
150
161
|
if (!meeting && meetingId) {
|
|
@@ -161,27 +172,27 @@ class Metrics {
|
|
|
161
172
|
if (event === eventType.MEDIA_QUALITY) {
|
|
162
173
|
data.event = event;
|
|
163
174
|
meeting.sendMediaQualityAnalyzerMetrics(data);
|
|
164
|
-
}
|
|
165
|
-
else {
|
|
175
|
+
} else {
|
|
166
176
|
meeting.callEvents.push(event);
|
|
167
177
|
data.event = event;
|
|
168
178
|
meeting.sendCallAnalyzerMetrics(data);
|
|
169
179
|
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
180
|
+
} else {
|
|
181
|
+
LoggerProxy.logger.info(
|
|
182
|
+
`Metrics:index#postEvent --> Event received for meetingId:${meetingId}, but meeting not found in collection.`
|
|
183
|
+
);
|
|
174
184
|
}
|
|
175
185
|
}
|
|
176
186
|
|
|
177
187
|
/**
|
|
178
188
|
* Docs for Call analyzer metrics
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
189
|
+
* https://sqbu-github.cisco.com/WebExSquared/call-analyzer/wiki
|
|
190
|
+
* https://sqbu-github.cisco.com/WebExSquared/event-dictionary/blob/master/diagnostic-events.raml
|
|
191
|
+
*/
|
|
182
192
|
|
|
193
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
183
194
|
initPayload(eventType, identifiers, options) {
|
|
184
|
-
const payload = {
|
|
195
|
+
const payload: any = {
|
|
185
196
|
eventId: uuid.v4(),
|
|
186
197
|
version: 1,
|
|
187
198
|
origin: {
|
|
@@ -196,19 +207,19 @@ class Metrics {
|
|
|
196
207
|
subClientType: options.subClientType,
|
|
197
208
|
os: this.getOsName(),
|
|
198
209
|
browser: getBrowserName(),
|
|
199
|
-
browserVersion: getBrowserVersion()
|
|
200
|
-
}
|
|
210
|
+
browserVersion: getBrowserVersion(),
|
|
211
|
+
},
|
|
201
212
|
},
|
|
202
213
|
originTime: {
|
|
203
|
-
triggered: new Date().toISOString()
|
|
214
|
+
triggered: new Date().toISOString(),
|
|
204
215
|
},
|
|
205
216
|
senderCountryCode: this.webex.meetings.geoHintInfo?.countryCode,
|
|
206
217
|
event: {
|
|
207
218
|
name: eventType,
|
|
208
219
|
canProceed: true,
|
|
209
220
|
identifiers,
|
|
210
|
-
eventData: {webClientDomain: window.location.hostname}
|
|
211
|
-
}
|
|
221
|
+
eventData: {webClientDomain: window.location.hostname},
|
|
222
|
+
},
|
|
212
223
|
};
|
|
213
224
|
|
|
214
225
|
// TODO: more options should be checked and some of them should be mandatory in certain conditions
|
|
@@ -252,7 +263,7 @@ class Metrics {
|
|
|
252
263
|
* @private
|
|
253
264
|
* @memberof Metrics
|
|
254
265
|
*/
|
|
255
|
-
getOsName() {
|
|
266
|
+
private getOsName() {
|
|
256
267
|
return OSMap[getOSName()] ?? OS_NAME.OTHERS;
|
|
257
268
|
}
|
|
258
269
|
|
|
@@ -270,7 +281,21 @@ class Metrics {
|
|
|
270
281
|
* @public
|
|
271
282
|
* @memberof Metrics
|
|
272
283
|
*/
|
|
273
|
-
initMediaPayload(
|
|
284
|
+
public initMediaPayload(
|
|
285
|
+
// eslint-disable-next-line @typescript-eslint/no-shadow
|
|
286
|
+
eventType: string,
|
|
287
|
+
identifiers: {
|
|
288
|
+
correlationId: string;
|
|
289
|
+
locusUrl: string;
|
|
290
|
+
locusId: string;
|
|
291
|
+
},
|
|
292
|
+
options:
|
|
293
|
+
| {
|
|
294
|
+
intervalData: object;
|
|
295
|
+
clientType: string;
|
|
296
|
+
}
|
|
297
|
+
| any = {}
|
|
298
|
+
) {
|
|
274
299
|
const {audioSetupDelay, videoSetupDelay, joinTimes} = options;
|
|
275
300
|
|
|
276
301
|
const payload = {
|
|
@@ -290,11 +315,11 @@ class Metrics {
|
|
|
290
315
|
osVersion: getOSVersion() || UNKNOWN,
|
|
291
316
|
subClientType: options.subClientType,
|
|
292
317
|
browser: getBrowserName(),
|
|
293
|
-
browserVersion: getBrowserVersion()
|
|
294
|
-
}
|
|
318
|
+
browserVersion: getBrowserVersion(),
|
|
319
|
+
},
|
|
295
320
|
},
|
|
296
321
|
originTime: {
|
|
297
|
-
triggered: new Date().toISOString()
|
|
322
|
+
triggered: new Date().toISOString(),
|
|
298
323
|
},
|
|
299
324
|
senderCountryCode: this.webex.meetings.geoHintInfo?.countryCode,
|
|
300
325
|
event: {
|
|
@@ -304,16 +329,16 @@ class Metrics {
|
|
|
304
329
|
intervals: [options.intervalData],
|
|
305
330
|
joinTimes,
|
|
306
331
|
eventData: {
|
|
307
|
-
webClientDomain: window.location.hostname
|
|
332
|
+
webClientDomain: window.location.hostname,
|
|
308
333
|
},
|
|
309
334
|
sourceMetadata: {
|
|
310
335
|
applicationSoftwareType: CLIENT_NAME,
|
|
311
336
|
applicationSoftwareVersion: this.webex.version,
|
|
312
337
|
mediaEngineSoftwareType: getBrowserName() || 'browser',
|
|
313
338
|
mediaEngineSoftwareVersion: getOSVersion() || UNKNOWN,
|
|
314
|
-
startTime: new Date().toISOString()
|
|
315
|
-
}
|
|
316
|
-
}
|
|
339
|
+
startTime: new Date().toISOString(),
|
|
340
|
+
},
|
|
341
|
+
},
|
|
317
342
|
};
|
|
318
343
|
|
|
319
344
|
return payload;
|
|
@@ -329,13 +354,12 @@ class Metrics {
|
|
|
329
354
|
* @returns {{showToUser: boolean, category: string, errorDescription: string,
|
|
330
355
|
* errorCode: number, errorData: *, fatal: boolean, name: string}}
|
|
331
356
|
*/
|
|
332
|
-
parseLocusError(err, showToUser) {
|
|
357
|
+
parseLocusError(err: any, showToUser: boolean) {
|
|
333
358
|
let errorCode;
|
|
334
359
|
|
|
335
360
|
if (err && err.statusCode && err.statusCode >= 500) {
|
|
336
361
|
errorCode = 1003;
|
|
337
|
-
}
|
|
338
|
-
else if (err && err.body && err.body.errorCode) {
|
|
362
|
+
} else if (err && err.body && err.body.errorCode) {
|
|
339
363
|
// locus error codes: https://sqbu-github.cisco.com/WebExSquared/locus/blob/master/server/src/main/resources/locus-error-codes.properties
|
|
340
364
|
switch (ERROR_CODE[err.body.errorCode]) {
|
|
341
365
|
case MEETING_ERRORS.FREE_USER_MAX_PARTICIPANTS_EXCEEDED:
|
|
@@ -434,26 +458,22 @@ class Metrics {
|
|
|
434
458
|
default:
|
|
435
459
|
errorCode = 4008;
|
|
436
460
|
}
|
|
437
|
-
}
|
|
438
|
-
else {
|
|
461
|
+
} else {
|
|
439
462
|
errorCode = 4008;
|
|
440
463
|
}
|
|
441
464
|
|
|
442
|
-
return this.generateErrorPayload(
|
|
443
|
-
errorCode, showToUser, error.name.LOCUS_RESPONSE, err
|
|
444
|
-
);
|
|
465
|
+
return this.generateErrorPayload(errorCode, showToUser, error.name.LOCUS_RESPONSE, err);
|
|
445
466
|
}
|
|
446
467
|
|
|
447
|
-
|
|
448
468
|
generateErrorPayload(errorCode, shownToUser, name, err) {
|
|
449
469
|
if (error.errors[errorCode]) {
|
|
450
|
-
const errorPayload = {
|
|
470
|
+
const errorPayload: any = {
|
|
451
471
|
shownToUser: shownToUser || false,
|
|
452
472
|
category: error.errors[errorCode][2],
|
|
453
473
|
errorDescription: error.errors[errorCode][0],
|
|
454
474
|
errorCode,
|
|
455
475
|
fatal: !includes(error.notFatalErrorList, errorCode),
|
|
456
|
-
name: name || error.name.OTHER
|
|
476
|
+
name: name || error.name.OTHER,
|
|
457
477
|
};
|
|
458
478
|
|
|
459
479
|
if (err && err.body) {
|
|
@@ -480,8 +500,14 @@ class Metrics {
|
|
|
480
500
|
let browserInfo;
|
|
481
501
|
const clientInfo = util.format('client=%s', `${this.webex.meetings?.metrics?.clientName}`);
|
|
482
502
|
|
|
483
|
-
if (
|
|
484
|
-
|
|
503
|
+
if (
|
|
504
|
+
['chrome', 'firefox', 'msie', 'msedge', 'safari'].indexOf(getBrowserName().toLowerCase()) !==
|
|
505
|
+
-1
|
|
506
|
+
) {
|
|
507
|
+
browserInfo = util.format(
|
|
508
|
+
'browser=%s',
|
|
509
|
+
`${getBrowserName().toLowerCase()}/${getBrowserVersion().split('.')[0]}`
|
|
510
|
+
);
|
|
485
511
|
}
|
|
486
512
|
const osInfo = util.format('os=%s', `${getOSName()}/${getOSVersion().split('.')[0]}`);
|
|
487
513
|
|
|
@@ -489,12 +515,18 @@ class Metrics {
|
|
|
489
515
|
userAgentOption = `(${browserInfo}`;
|
|
490
516
|
}
|
|
491
517
|
if (osInfo) {
|
|
492
|
-
userAgentOption = userAgentOption
|
|
518
|
+
userAgentOption = userAgentOption
|
|
519
|
+
? `${userAgentOption}; ${clientInfo}; ${osInfo}`
|
|
520
|
+
: `${clientInfo}; (${osInfo}`;
|
|
493
521
|
}
|
|
494
522
|
if (userAgentOption) {
|
|
495
523
|
userAgentOption += ')';
|
|
496
524
|
|
|
497
|
-
return util.format(
|
|
525
|
+
return util.format(
|
|
526
|
+
'webex-js-sdk/%s %s',
|
|
527
|
+
`${process.env.NODE_ENV}-${this.webex.version}`,
|
|
528
|
+
userAgentOption
|
|
529
|
+
);
|
|
498
530
|
}
|
|
499
531
|
|
|
500
532
|
return util.format('webex-js-sdk/%s', `${process.env.NODE_ENV}-${this.webex.version}`);
|
|
@@ -515,11 +547,11 @@ class Metrics {
|
|
|
515
547
|
*
|
|
516
548
|
* @returns {void}
|
|
517
549
|
*/
|
|
518
|
-
sendBehavioralMetric(metricName, metricFields = {}, metricTags = {}) {
|
|
550
|
+
sendBehavioralMetric(metricName: string, metricFields: object = {}, metricTags: object = {}) {
|
|
519
551
|
this.webex.internal.metrics.submitClientMetrics(metricName, {
|
|
520
552
|
type: this.webex.config.metrics.type,
|
|
521
553
|
fields: metricFields,
|
|
522
|
-
tags: metricTags
|
|
554
|
+
tags: metricTags,
|
|
523
555
|
});
|
|
524
556
|
}
|
|
525
557
|
}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
1
|
/* eslint-disable require-jsdoc */
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
MediaRequest as WcmeMediaRequest,
|
|
4
|
+
Policy,
|
|
5
|
+
ActiveSpeakerInfo,
|
|
6
|
+
ReceiverSelectedInfo,
|
|
7
|
+
CodecInfo as WcmeCodecInfo,
|
|
8
|
+
H264Codec,
|
|
9
|
+
} from '@webex/internal-media-core';
|
|
10
|
+
import {cloneDeep} from 'lodash';
|
|
3
11
|
|
|
4
12
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
5
13
|
|
|
6
14
|
import {ReceiveSlot, ReceiveSlotId} from './receiveSlot';
|
|
15
|
+
import {getMaxFs} from './remoteMedia';
|
|
7
16
|
|
|
8
17
|
export interface ActiveSpeakerPolicyInfo {
|
|
9
18
|
policy: 'active-speaker';
|
|
@@ -47,22 +56,32 @@ const CODEC_DEFAULTS = {
|
|
|
47
56
|
},
|
|
48
57
|
};
|
|
49
58
|
|
|
50
|
-
type
|
|
59
|
+
type DegradationPreferences = {
|
|
60
|
+
maxMacroblocksLimit: number;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
type SendMediaRequestsCallback = (mediaRequests: WcmeMediaRequest[]) => void;
|
|
51
64
|
|
|
52
65
|
export class MediaRequestManager {
|
|
53
66
|
private sendMediaRequestsCallback: SendMediaRequestsCallback;
|
|
54
67
|
|
|
55
|
-
private counter;
|
|
68
|
+
private counter: number;
|
|
56
69
|
|
|
57
70
|
private clientRequests: {[key: MediaRequestId]: MediaRequest};
|
|
58
71
|
|
|
59
72
|
private slotsActiveInLastMediaRequest: {[key: ReceiveSlotId]: ReceiveSlot};
|
|
60
73
|
|
|
61
|
-
|
|
74
|
+
private degradationPreferences: DegradationPreferences;
|
|
75
|
+
|
|
76
|
+
constructor(
|
|
77
|
+
degradationPreferences: DegradationPreferences,
|
|
78
|
+
sendMediaRequestsCallback: SendMediaRequestsCallback
|
|
79
|
+
) {
|
|
62
80
|
this.sendMediaRequestsCallback = sendMediaRequestsCallback;
|
|
63
81
|
this.counter = 0;
|
|
64
82
|
this.clientRequests = {};
|
|
65
83
|
this.slotsActiveInLastMediaRequest = {};
|
|
84
|
+
this.degradationPreferences = degradationPreferences;
|
|
66
85
|
}
|
|
67
86
|
|
|
68
87
|
private resetInactiveReceiveSlots() {
|
|
@@ -90,32 +109,79 @@ export class MediaRequestManager {
|
|
|
90
109
|
this.slotsActiveInLastMediaRequest = activeSlots;
|
|
91
110
|
}
|
|
92
111
|
|
|
112
|
+
public setDegradationPreferences(degradationPreferences: DegradationPreferences) {
|
|
113
|
+
this.degradationPreferences = degradationPreferences;
|
|
114
|
+
this.sendRequests(); // re-send requests after preferences are set
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
private getDegradedClientRequests() {
|
|
118
|
+
const clientRequests = cloneDeep(this.clientRequests);
|
|
119
|
+
const maxFsLimits = [
|
|
120
|
+
getMaxFs('best'),
|
|
121
|
+
getMaxFs('large'),
|
|
122
|
+
getMaxFs('medium'),
|
|
123
|
+
getMaxFs('small'),
|
|
124
|
+
getMaxFs('very small'),
|
|
125
|
+
getMaxFs('thumbnail'),
|
|
126
|
+
];
|
|
127
|
+
|
|
128
|
+
// reduce max-fs until total macroblocks is below limit
|
|
129
|
+
for (let i = 0; i < maxFsLimits.length; i += 1) {
|
|
130
|
+
let totalMacroblocksRequested = 0;
|
|
131
|
+
Object.values(clientRequests).forEach((mr) => {
|
|
132
|
+
if (mr.codecInfo) {
|
|
133
|
+
mr.codecInfo.maxFs = Math.min(
|
|
134
|
+
mr.codecInfo.maxFs || CODEC_DEFAULTS.h264.maxFs,
|
|
135
|
+
maxFsLimits[i]
|
|
136
|
+
);
|
|
137
|
+
totalMacroblocksRequested += mr.codecInfo.maxFs * mr.receiveSlots.length;
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
if (totalMacroblocksRequested <= this.degradationPreferences.maxMacroblocksLimit) {
|
|
141
|
+
if (i !== 0) {
|
|
142
|
+
LoggerProxy.logger.warn(
|
|
143
|
+
`multistream:mediaRequestManager --> too many requests with high max-fs, frame size will be limited to ${maxFsLimits[i]}`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
} else if (i === maxFsLimits.length - 1) {
|
|
148
|
+
LoggerProxy.logger.warn(
|
|
149
|
+
`multistream:mediaRequestManager --> even with frame size limited to ${maxFsLimits[i]} you are still requesting too many streams, consider reducing the number of requests`
|
|
150
|
+
);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
return clientRequests;
|
|
155
|
+
}
|
|
156
|
+
|
|
93
157
|
private sendRequests() {
|
|
94
|
-
const wcmeMediaRequests:
|
|
158
|
+
const wcmeMediaRequests: WcmeMediaRequest[] = [];
|
|
95
159
|
|
|
96
|
-
|
|
160
|
+
const clientRequests = this.getDegradedClientRequests();
|
|
161
|
+
const maxPayloadBitsPerSecond = 10 * 1000 * 1000;
|
|
97
162
|
|
|
98
163
|
// map all the client media requests to wcme media requests
|
|
99
|
-
Object.values(
|
|
164
|
+
Object.values(clientRequests).forEach((mr) => {
|
|
100
165
|
wcmeMediaRequests.push(
|
|
101
|
-
new
|
|
166
|
+
new WcmeMediaRequest(
|
|
102
167
|
mr.policyInfo.policy === 'active-speaker'
|
|
103
|
-
?
|
|
104
|
-
:
|
|
168
|
+
? Policy.ActiveSpeaker
|
|
169
|
+
: Policy.ReceiverSelected,
|
|
105
170
|
mr.policyInfo.policy === 'active-speaker'
|
|
106
|
-
? new
|
|
171
|
+
? new ActiveSpeakerInfo(
|
|
107
172
|
mr.policyInfo.priority,
|
|
108
173
|
mr.policyInfo.crossPriorityDuplication,
|
|
109
174
|
mr.policyInfo.crossPolicyDuplication,
|
|
110
175
|
mr.policyInfo.preferLiveVideo
|
|
111
176
|
)
|
|
112
|
-
: new
|
|
177
|
+
: new ReceiverSelectedInfo(mr.policyInfo.csi),
|
|
113
178
|
mr.receiveSlots.map((receiveSlot) => receiveSlot.wcmeReceiveSlot),
|
|
179
|
+
maxPayloadBitsPerSecond,
|
|
114
180
|
mr.codecInfo && [
|
|
115
|
-
new
|
|
181
|
+
new WcmeCodecInfo(
|
|
116
182
|
0x80,
|
|
117
|
-
new
|
|
118
|
-
mr.codecInfo.maxFs
|
|
183
|
+
new H264Codec(
|
|
184
|
+
mr.codecInfo.maxFs,
|
|
119
185
|
mr.codecInfo.maxFps || CODEC_DEFAULTS.h264.maxFps,
|
|
120
186
|
mr.codecInfo.maxMbps || CODEC_DEFAULTS.h264.maxMbps,
|
|
121
187
|
mr.codecInfo.maxWidth,
|
|
@@ -19,6 +19,7 @@ export class MultistreamMedia {
|
|
|
19
19
|
this.meeting = meeting;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
// eslint-disable-next-line valid-jsdoc
|
|
22
23
|
/**
|
|
23
24
|
* throws if we don't have a media connection created
|
|
24
25
|
*/
|
|
@@ -47,6 +48,7 @@ export class MultistreamMedia {
|
|
|
47
48
|
// todo: depending on how muting is done with Local tracks, this code here might need to change...
|
|
48
49
|
|
|
49
50
|
if (track.kind === 'audio') {
|
|
51
|
+
// @ts-ignore
|
|
50
52
|
this.meeting.setLocalAudioTrack(track);
|
|
51
53
|
this.meeting.mediaProperties.mediaDirection.sendAudio = true;
|
|
52
54
|
|
|
@@ -55,6 +57,7 @@ export class MultistreamMedia {
|
|
|
55
57
|
this.meeting.audio ||
|
|
56
58
|
createMuteState(AUDIO, this.meeting, this.meeting.mediaProperties.mediaDirection);
|
|
57
59
|
} else if (track.kind === 'video') {
|
|
60
|
+
// @ts-ignore
|
|
58
61
|
this.meeting.setLocalVideoTrack(track);
|
|
59
62
|
this.meeting.mediaProperties.mediaDirection.sendVideo = true;
|
|
60
63
|
|
|
@@ -79,9 +82,11 @@ export class MultistreamMedia {
|
|
|
79
82
|
// muting etc
|
|
80
83
|
|
|
81
84
|
if (track.kind === 'audio') {
|
|
85
|
+
// @ts-ignore
|
|
82
86
|
this.meeting.setLocalVideoTrack(null);
|
|
83
87
|
this.meeting.mediaProperties.mediaDirection.sendAudio = false;
|
|
84
88
|
} else if (track.kind === 'video') {
|
|
89
|
+
// @ts-ignore
|
|
85
90
|
this.meeting.setLocalAudioTrack(null);
|
|
86
91
|
this.meeting.mediaProperties.mediaDirection.sendVideo = false;
|
|
87
92
|
}
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
/* eslint-disable valid-jsdoc */
|
|
2
|
+
import {
|
|
3
|
+
MediaType,
|
|
4
|
+
ReceiveSlot as WcmeReceiveSlot,
|
|
5
|
+
ReceiveSlotEvents as WcmeReceiveSlotEvents,
|
|
6
|
+
SourceState,
|
|
7
|
+
} from '@webex/internal-media-core';
|
|
2
8
|
|
|
3
9
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
4
10
|
import EventsScope from '../common/events/events-scope';
|
|
@@ -7,7 +13,7 @@ export const ReceiveSlotEvents = {
|
|
|
7
13
|
SourceUpdate: 'sourceUpdate',
|
|
8
14
|
};
|
|
9
15
|
|
|
10
|
-
export type SourceState
|
|
16
|
+
export type {SourceState} from '@webex/internal-media-core';
|
|
11
17
|
export type CSI = number;
|
|
12
18
|
export type MemberId = string;
|
|
13
19
|
export type ReceiveSlotId = string;
|
|
@@ -21,31 +27,31 @@ export type FindMemberIdCallback = (csi: CSI) => MemberId | undefined;
|
|
|
21
27
|
* for example some participant's main video or audio
|
|
22
28
|
*/
|
|
23
29
|
export class ReceiveSlot extends EventsScope {
|
|
24
|
-
private readonly mcReceiveSlot:
|
|
30
|
+
private readonly mcReceiveSlot: WcmeReceiveSlot;
|
|
25
31
|
|
|
26
32
|
private readonly findMemberIdCallback: FindMemberIdCallback;
|
|
27
33
|
|
|
28
34
|
public readonly id: ReceiveSlotId;
|
|
29
35
|
|
|
30
|
-
public readonly mediaType:
|
|
36
|
+
public readonly mediaType: MediaType;
|
|
31
37
|
|
|
32
38
|
#memberId?: MemberId;
|
|
33
39
|
|
|
34
40
|
#csi?: CSI;
|
|
35
41
|
|
|
36
|
-
#sourceState:
|
|
42
|
+
#sourceState: SourceState;
|
|
37
43
|
|
|
38
44
|
/**
|
|
39
45
|
* constructor - don't use it directly, you should always use meeting.receiveSlotManager.allocateSlot()
|
|
40
46
|
* to create any receive slots
|
|
41
47
|
*
|
|
42
|
-
* @param {
|
|
43
|
-
* @param {
|
|
48
|
+
* @param {MediaType} mediaType
|
|
49
|
+
* @param {ReceiveSlot} mcReceiveSlot
|
|
44
50
|
* @param {FindMemberIdCallback} findMemberIdCallback callback for finding memberId for given CSI
|
|
45
51
|
*/
|
|
46
52
|
constructor(
|
|
47
|
-
mediaType:
|
|
48
|
-
mcReceiveSlot:
|
|
53
|
+
mediaType: MediaType,
|
|
54
|
+
mcReceiveSlot: WcmeReceiveSlot,
|
|
49
55
|
findMemberIdCallback: FindMemberIdCallback
|
|
50
56
|
) {
|
|
51
57
|
super();
|
|
@@ -92,8 +98,8 @@ export class ReceiveSlot extends EventsScope {
|
|
|
92
98
|
};
|
|
93
99
|
|
|
94
100
|
this.mcReceiveSlot.on(
|
|
95
|
-
|
|
96
|
-
(state:
|
|
101
|
+
WcmeReceiveSlotEvents.SourceUpdate,
|
|
102
|
+
(state: SourceState, csi?: number) => {
|
|
97
103
|
LoggerProxy.logger.log(
|
|
98
104
|
`ReceiveSlot#setupEventListeners --> got source update on receive slot ${this.id}, mediaType=${this.mediaType}, csi=${csi}, state=${state}`
|
|
99
105
|
);
|
|
@@ -122,7 +128,7 @@ export class ReceiveSlot extends EventsScope {
|
|
|
122
128
|
/**
|
|
123
129
|
* The underlying WCME receive slot
|
|
124
130
|
*/
|
|
125
|
-
get wcmeReceiveSlot():
|
|
131
|
+
get wcmeReceiveSlot(): WcmeReceiveSlot {
|
|
126
132
|
return this.mcReceiveSlot;
|
|
127
133
|
}
|
|
128
134
|
|