@webex/plugin-meetings 2.59.8 → 2.60.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -8
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +41 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +357 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +215 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +22 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +51 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +44 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1047 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +77 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +64 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +2 -3
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +3 -4
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +1 -2
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +1 -2
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +1 -2
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +1 -2
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +1 -2
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +50 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +3 -4
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +1 -2
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +1 -2
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +154 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +1 -2
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +1 -2
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +1 -2
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +48 -28
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +1 -2
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +1 -2
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +1 -2
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +1 -2
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +1 -2
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +1 -2
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +2 -3
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +8 -5
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +22 -9
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +8 -11
- package/dist/config.js.map +1 -1
- package/dist/constants.js +437 -435
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +3 -6
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +14 -6
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.js +127 -38
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/types.js +7 -0
- package/dist/controls-options-manager/types.js.map +1 -0
- package/dist/controls-options-manager/util.js +309 -19
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.js +116 -4
- package/dist/index.js.map +1 -1
- package/dist/interpretation/collection.js +22 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +365 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +24 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +100 -11
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -4
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +1 -2
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +1 -2
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +425 -84
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +13 -5
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +58 -3
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +253 -80
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +97 -13
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +106 -319
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +96 -153
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +1 -22
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +498 -493
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +90 -3
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +4578 -2973
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +291 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +224 -133
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +297 -199
- 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 +1 -2
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +605 -435
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +3 -4
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +74 -7
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +197 -63
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +1 -2
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +2 -3
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +25 -12
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +25 -4
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +464 -123
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.js +7 -0
- package/dist/meetings/meetings.types.js.map +1 -0
- package/dist/meetings/request.js +4 -3
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +107 -6
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +54 -2
- package/dist/member/index.js.map +1 -1
- package/dist/member/member.types.js +3 -4
- package/dist/member/member.types.js.map +1 -1
- package/dist/member/types.js +23 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +131 -29
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +11 -2
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +174 -10
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +108 -41
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +14 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +327 -234
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +14 -9
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +4 -452
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +344 -0
- package/dist/multistream/mediaRequestManager.js.map +1 -0
- package/dist/multistream/receiveSlot.js +200 -0
- package/dist/multistream/receiveSlot.js.map +1 -0
- package/dist/multistream/receiveSlotManager.js +174 -0
- package/dist/multistream/receiveSlotManager.js.map +1 -0
- package/dist/multistream/remoteMedia.js +268 -0
- package/dist/multistream/remoteMedia.js.map +1 -0
- package/dist/multistream/remoteMediaGroup.js +267 -0
- package/dist/multistream/remoteMediaGroup.js.map +1 -0
- package/dist/multistream/remoteMediaManager.js +1211 -0
- package/dist/multistream/remoteMediaManager.js.map +1 -0
- package/dist/multistream/sendSlotManager.js +236 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +5 -4
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +2 -3
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +2 -3
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +1 -2
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.js +265 -72
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +18 -10
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/constants.js +12 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +4 -6
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.js +21 -23
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.js +272 -220
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +4 -5
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.js +57 -46
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.js +10 -10
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js +101 -235
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +126 -180
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +115 -105
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +11 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +115 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +2 -85
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +384 -426
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +114 -80
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +1 -2
- package/dist/transcription/index.js.map +1 -1
- package/dist/webinar/collection.js +43 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +68 -0
- package/dist/webinar/index.js.map +1 -0
- package/package.json +34 -24
- package/src/annotation/annotation.types.ts +50 -0
- package/src/annotation/constants.ts +36 -0
- package/src/annotation/index.ts +328 -0
- package/src/breakouts/README.md +220 -0
- package/src/breakouts/breakout.ts +188 -0
- package/src/breakouts/collection.ts +19 -0
- package/src/breakouts/edit-lock-error.ts +25 -0
- package/src/breakouts/events.ts +56 -0
- package/src/breakouts/index.ts +925 -0
- package/src/breakouts/request.ts +55 -0
- package/src/breakouts/utils.ts +57 -0
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/webex-errors.ts +36 -12
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/common/logs/request.ts +5 -1
- package/src/common/queue.ts +22 -8
- package/src/config.ts +5 -7
- package/src/constants.ts +263 -91
- package/src/controls-options-manager/enums.ts +11 -1
- package/src/controls-options-manager/index.ts +116 -21
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +294 -14
- package/src/index.ts +40 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +332 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +110 -0
- package/src/locus-info/index.ts +449 -61
- package/src/locus-info/infoUtils.ts +14 -2
- package/src/locus-info/mediaSharesUtils.ts +64 -0
- package/src/locus-info/parser.ts +258 -47
- package/src/locus-info/selfUtils.ts +85 -2
- package/src/media/index.ts +153 -370
- package/src/media/properties.ts +106 -136
- package/src/media/util.ts +0 -21
- package/src/mediaQualityMetrics/config.ts +379 -377
- package/src/meeting/in-meeting-actions.ts +168 -0
- package/src/meeting/index.ts +3800 -2491
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +224 -138
- package/src/meeting/request.ts +207 -127
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/util.ts +590 -423
- package/src/meeting-info/index.ts +81 -8
- package/src/meeting-info/meeting-info-v2.ts +159 -13
- package/src/meeting-info/util.ts +1 -1
- package/src/meeting-info/utilv2.ts +22 -9
- package/src/meetings/collection.ts +20 -0
- package/src/meetings/index.ts +466 -124
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/request.ts +2 -0
- package/src/meetings/util.ts +116 -5
- package/src/member/index.ts +52 -1
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +139 -28
- package/src/members/collection.ts +8 -0
- package/src/members/index.ts +196 -7
- package/src/members/request.ts +97 -17
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +333 -240
- package/src/metrics/constants.ts +12 -6
- package/src/metrics/index.ts +1 -471
- package/src/multistream/mediaRequestManager.ts +440 -0
- package/src/multistream/receiveSlot.ts +184 -0
- package/src/multistream/receiveSlotManager.ts +166 -0
- package/src/multistream/remoteMedia.ts +254 -0
- package/src/multistream/remoteMediaGroup.ts +284 -0
- package/src/multistream/remoteMediaManager.ts +1145 -0
- package/src/multistream/sendSlotManager.ts +170 -0
- package/src/networkQualityMonitor/index.ts +6 -6
- package/src/reachability/index.ts +238 -45
- package/src/reachability/request.ts +17 -8
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +30 -4
- package/src/reconnection-manager/index.ts +124 -107
- package/src/recording-controller/index.ts +20 -3
- package/src/recording-controller/util.ts +26 -9
- package/src/roap/index.ts +98 -241
- package/src/roap/request.ts +74 -148
- package/src/roap/turnDiscovery.ts +62 -56
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +100 -0
- package/src/statsAnalyzer/global.ts +1 -84
- package/src/statsAnalyzer/index.ts +442 -523
- package/src/statsAnalyzer/mqaUtil.ts +105 -103
- package/src/webinar/collection.ts +31 -0
- package/src/webinar/index.ts +62 -0
- package/test/integration/spec/converged-space-meetings.js +233 -0
- package/test/integration/spec/journey.js +320 -264
- package/test/integration/spec/space-meeting.js +77 -4
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +237 -0
- package/test/unit/spec/breakouts/collection.ts +15 -0
- package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
- package/test/unit/spec/breakouts/events.ts +89 -0
- package/test/unit/spec/breakouts/index.ts +1790 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +163 -0
- package/test/unit/spec/controls-options-manager/util.js +576 -60
- package/test/unit/spec/fixture/locus.js +1 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +589 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +323 -30
- package/test/unit/spec/locus-info/index.js +1390 -16
- package/test/unit/spec/locus-info/infoUtils.js +54 -16
- package/test/unit/spec/locus-info/lib/SeqCmp.json +16 -0
- package/test/unit/spec/locus-info/lib/selfConstant.js +48 -0
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +32 -0
- package/test/unit/spec/locus-info/parser.js +116 -35
- package/test/unit/spec/locus-info/selfUtils.js +275 -0
- package/test/unit/spec/media/index.ts +274 -0
- package/test/unit/spec/media/properties.ts +75 -84
- package/test/unit/spec/meeting/in-meeting-actions.ts +82 -0
- package/test/unit/spec/meeting/index.js +7395 -3171
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +407 -212
- package/test/unit/spec/meeting/request.js +512 -42
- package/test/unit/spec/meeting/utils.js +741 -24
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +500 -6
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/collection.js +14 -0
- package/test/unit/spec/meetings/index.js +1012 -209
- package/test/unit/spec/meetings/utils.js +202 -2
- package/test/unit/spec/member/index.js +38 -8
- package/test/unit/spec/member/util.js +528 -27
- package/test/unit/spec/members/index.js +597 -3
- package/test/unit/spec/members/request.js +206 -27
- package/test/unit/spec/members/utils.js +210 -0
- package/test/unit/spec/metrics/index.js +1 -50
- package/test/unit/spec/multistream/mediaRequestManager.ts +1418 -0
- package/test/unit/spec/multistream/receiveSlot.ts +163 -0
- package/test/unit/spec/multistream/receiveSlotManager.ts +203 -0
- package/test/unit/spec/multistream/remoteMedia.ts +255 -0
- package/test/unit/spec/multistream/remoteMediaGroup.ts +662 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +1924 -0
- package/test/unit/spec/multistream/sendSlotManager.ts +242 -0
- package/test/unit/spec/networkQualityMonitor/index.js +4 -4
- package/test/unit/spec/reachability/index.ts +598 -24
- package/test/unit/spec/reachability/request.js +68 -0
- package/test/unit/spec/reconnection-manager/index.js +130 -22
- package/test/unit/spec/recording-controller/index.js +293 -218
- package/test/unit/spec/recording-controller/util.js +223 -96
- package/test/unit/spec/roap/index.ts +200 -76
- package/test/unit/spec/roap/request.ts +232 -0
- package/test/unit/spec/roap/turnDiscovery.ts +86 -48
- package/test/unit/spec/rtcMetrics/index.ts +73 -0
- package/test/unit/spec/stats-analyzer/index.js +181 -177
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +0 -45
- package/test/utils/webex-config.js +4 -0
- package/test/utils/webex-test-users.js +7 -3
- 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/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/reconnection-in-progress.d.ts +0 -9
- 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 -81
- 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 -34
- package/dist/common/queue.d.ts +0 -32
- package/dist/config.d.ts +0 -73
- package/dist/constants.d.ts +0 -926
- package/dist/controls-options-manager/constants.d.ts +0 -4
- package/dist/controls-options-manager/enums.d.ts +0 -5
- package/dist/controls-options-manager/index.d.ts +0 -120
- package/dist/controls-options-manager/util.d.ts +0 -7
- package/dist/index.d.ts +0 -4
- 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 -269
- 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 -212
- package/dist/locus-info/selfUtils.d.ts +0 -2
- package/dist/media/index.d.ts +0 -32
- package/dist/media/properties.d.ts +0 -108
- package/dist/media/util.d.ts +0 -2
- package/dist/mediaQualityMetrics/config.d.ts +0 -233
- package/dist/meeting/effectsState.d.ts +0 -42
- package/dist/meeting/effectsState.js +0 -260
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/meeting/in-meeting-actions.d.ts +0 -79
- package/dist/meeting/index.d.ts +0 -1622
- package/dist/meeting/muteState.d.ts +0 -116
- package/dist/meeting/request.d.ts +0 -255
- package/dist/meeting/state.d.ts +0 -9
- package/dist/meeting/util.d.ts +0 -2
- package/dist/meeting-info/collection.d.ts +0 -20
- package/dist/meeting-info/index.d.ts +0 -57
- package/dist/meeting-info/meeting-info-v2.d.ts +0 -93
- 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 -23
- package/dist/meetings/index.d.ts +0 -296
- package/dist/meetings/request.d.ts +0 -27
- package/dist/meetings/util.d.ts +0 -18
- package/dist/member/index.d.ts +0 -147
- package/dist/member/member.types.d.ts +0 -11
- package/dist/member/util.d.ts +0 -2
- package/dist/members/collection.d.ts +0 -24
- package/dist/members/index.d.ts +0 -298
- package/dist/members/request.d.ts +0 -50
- package/dist/members/util.d.ts +0 -2
- package/dist/metrics/config.d.ts +0 -169
- package/dist/metrics/config.js +0 -289
- package/dist/metrics/config.js.map +0 -1
- package/dist/metrics/constants.d.ts +0 -59
- package/dist/metrics/index.d.ts +0 -152
- package/dist/networkQualityMonitor/index.d.ts +0 -70
- package/dist/peer-connection-manager/index.d.ts +0 -6
- 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.d.ts +0 -6
- package/dist/peer-connection-manager/util.js +0 -110
- 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/index.d.ts +0 -139
- package/dist/reachability/request.d.ts +0 -35
- package/dist/reactions/reactions.d.ts +0 -4
- package/dist/reactions/reactions.type.d.ts +0 -32
- package/dist/reconnection-manager/index.d.ts +0 -112
- package/dist/recording-controller/enums.d.ts +0 -7
- package/dist/recording-controller/index.d.ts +0 -193
- package/dist/recording-controller/util.d.ts +0 -13
- package/dist/roap/collection.d.ts +0 -10
- package/dist/roap/collection.js +0 -63
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.d.ts +0 -47
- package/dist/roap/handler.js +0 -279
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/index.d.ts +0 -116
- package/dist/roap/request.d.ts +0 -35
- package/dist/roap/state.d.ts +0 -9
- package/dist/roap/state.js +0 -127
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/turnDiscovery.d.ts +0 -81
- package/dist/roap/util.d.ts +0 -2
- package/dist/roap/util.js +0 -76
- package/dist/roap/util.js.map +0 -1
- package/dist/statsAnalyzer/global.d.ts +0 -118
- package/dist/statsAnalyzer/index.d.ts +0 -193
- package/dist/statsAnalyzer/mqaUtil.d.ts +0 -22
- package/dist/transcription/index.d.ts +0 -64
- package/src/index.js +0 -15
- package/src/meeting/effectsState.ts +0 -209
- package/src/metrics/config.ts +0 -485
- package/src/peer-connection-manager/index.ts +0 -847
- package/src/peer-connection-manager/util.ts +0 -119
- package/src/roap/collection.ts +0 -62
- package/src/roap/handler.ts +0 -294
- package/src/roap/state.ts +0 -156
- package/src/roap/util.ts +0 -100
- package/test/unit/spec/meeting/effectsState.js +0 -281
- package/test/unit/spec/peerconnection-manager/index.js +0 -218
- package/test/unit/spec/peerconnection-manager/utils.js +0 -49
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -388
- package/test/unit/spec/roap/util.js +0 -30
|
@@ -7,6 +7,7 @@ _Object$defineProperty(exports, "__esModule", {
|
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
9
|
exports.StatsAnalyzer = exports.EVENTS = void 0;
|
|
10
|
+
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
10
11
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
11
12
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
12
13
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
@@ -16,25 +17,37 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/
|
|
|
16
17
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
|
17
18
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
18
19
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
19
|
-
var
|
|
20
|
+
var _lodash = require("lodash");
|
|
21
|
+
var _internalMediaCore = require("@webex/internal-media-core");
|
|
20
22
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
|
21
23
|
var _constants = require("../constants");
|
|
22
|
-
var _config =
|
|
24
|
+
var _config = require("../mediaQualityMetrics/config");
|
|
23
25
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
24
26
|
var _global = _interopRequireDefault(require("./global"));
|
|
25
27
|
var _mqaUtil = require("./mqaUtil");
|
|
26
28
|
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = _Reflect$construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
|
|
27
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
28
|
-
var EVENTS = {
|
|
29
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_Reflect$construct) return false; if (_Reflect$construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /* eslint-disable prefer-destructuring */
|
|
30
|
+
var EVENTS = exports.EVENTS = {
|
|
29
31
|
MEDIA_QUALITY: 'MEDIA_QUALITY',
|
|
30
|
-
NO_FRAMES_SENT: 'NO_FRAMES_SENT',
|
|
31
|
-
NO_VIDEO_ENCODED: 'NO_VIDEO_ENCODED',
|
|
32
32
|
LOCAL_MEDIA_STARTED: 'LOCAL_MEDIA_STARTED',
|
|
33
33
|
LOCAL_MEDIA_STOPPED: 'LOCAL_MEDIA_STOPPED',
|
|
34
34
|
REMOTE_MEDIA_STARTED: 'REMOTE_MEDIA_STARTED',
|
|
35
35
|
REMOTE_MEDIA_STOPPED: 'REMOTE_MEDIA_STOPPED'
|
|
36
36
|
};
|
|
37
|
-
|
|
37
|
+
var emptySender = {
|
|
38
|
+
trackLabel: '',
|
|
39
|
+
maxPacketLossRatio: 0,
|
|
40
|
+
availableBandwidth: 0,
|
|
41
|
+
bytesSent: 0,
|
|
42
|
+
meanRemoteJitter: [],
|
|
43
|
+
meanRoundTripTime: []
|
|
44
|
+
};
|
|
45
|
+
var emptyReceiver = {
|
|
46
|
+
availableBandwidth: 0,
|
|
47
|
+
bytesReceived: 0,
|
|
48
|
+
meanRtpJitter: [],
|
|
49
|
+
meanRoundTripTime: []
|
|
50
|
+
};
|
|
38
51
|
/**
|
|
39
52
|
* Stats Analyzer class that will emit events based on detected quality
|
|
40
53
|
*
|
|
@@ -42,8 +55,7 @@ var EVENTS = {
|
|
|
42
55
|
* @class StatsAnalyzer
|
|
43
56
|
* @extends {EventsScope}
|
|
44
57
|
*/
|
|
45
|
-
exports.
|
|
46
|
-
var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
58
|
+
var StatsAnalyzer = exports.StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
47
59
|
(0, _inherits2.default)(StatsAnalyzer, _EventsScope);
|
|
48
60
|
var _super = _createSuper(StatsAnalyzer);
|
|
49
61
|
/**
|
|
@@ -51,13 +63,17 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
51
63
|
* @constructor
|
|
52
64
|
* @public
|
|
53
65
|
* @param {Object} config SDK Configuration Object
|
|
66
|
+
* @param {Function} receiveSlotCallback Callback used to access receive slots.
|
|
54
67
|
* @param {Object} networkQualityMonitor class for assessing network characteristics (jitter, packetLoss, latency)
|
|
55
68
|
* @param {Object} statsResults Default properties for stats
|
|
56
69
|
*/
|
|
57
70
|
function StatsAnalyzer(config) {
|
|
58
71
|
var _this;
|
|
59
|
-
var
|
|
60
|
-
|
|
72
|
+
var receiveSlotCallback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
|
|
73
|
+
return undefined;
|
|
74
|
+
};
|
|
75
|
+
var networkQualityMonitor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
76
|
+
var statsResults = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : _global.default;
|
|
61
77
|
(0, _classCallCheck2.default)(this, StatsAnalyzer);
|
|
62
78
|
_this = _super.call(this);
|
|
63
79
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "config", void 0);
|
|
@@ -65,15 +81,16 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
65
81
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastEmittedStartStopEvent", void 0);
|
|
66
82
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastMqaDataSent", void 0);
|
|
67
83
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastStatsResults", void 0);
|
|
68
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localMQEStats", void 0);
|
|
69
84
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingMediaStatus", void 0);
|
|
70
85
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mqaInterval", void 0);
|
|
71
86
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mqaSentCount", void 0);
|
|
72
87
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "networkQualityMonitor", void 0);
|
|
73
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "
|
|
88
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaConnection", void 0);
|
|
74
89
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsInterval", void 0);
|
|
75
90
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsResults", void 0);
|
|
76
91
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsStarted", void 0);
|
|
92
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "successfulCandidatePair", void 0);
|
|
93
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "receiveSlotCallback", void 0);
|
|
77
94
|
/**
|
|
78
95
|
* emits started/stopped events for local/remote media by checking
|
|
79
96
|
* if given values are increasing or not. The previousValue, currentValue
|
|
@@ -97,11 +114,14 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
97
114
|
if (previousValue === undefined) previousValue = 0;
|
|
98
115
|
// eslint-disable-next-line no-param-reassign
|
|
99
116
|
if (currentValue === undefined) currentValue = 0;
|
|
117
|
+
if (!_this.lastEmittedStartStopEvent[mediaType]) {
|
|
118
|
+
_this.lastEmittedStartStopEvent[mediaType] = {};
|
|
119
|
+
}
|
|
100
120
|
var lastEmittedEvent = isLocal ? _this.lastEmittedStartStopEvent[mediaType].local : _this.lastEmittedStartStopEvent[mediaType].remote;
|
|
101
121
|
var newEvent;
|
|
102
122
|
if (currentValue - previousValue > 0) {
|
|
103
123
|
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STARTED : EVENTS.REMOTE_MEDIA_STARTED;
|
|
104
|
-
} else if (currentValue === previousValue && currentValue
|
|
124
|
+
} else if (currentValue === previousValue && currentValue > 0) {
|
|
105
125
|
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STOPPED : EVENTS.REMOTE_MEDIA_STOPPED;
|
|
106
126
|
}
|
|
107
127
|
if (newEvent && lastEmittedEvent !== newEvent) {
|
|
@@ -129,56 +149,39 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
129
149
|
* @returns {void}
|
|
130
150
|
*/
|
|
131
151
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parseCandidate", function (result, type, isSender, isRemote) {
|
|
152
|
+
var _this$successfulCandi;
|
|
132
153
|
if (!result || !result.id) {
|
|
133
154
|
return;
|
|
134
155
|
}
|
|
135
|
-
var RemoteCandidateType = {};
|
|
136
|
-
var RemoteTransport = {};
|
|
137
|
-
var RemoteIpAddress = {};
|
|
138
|
-
var RemoteNetworkType = {};
|
|
139
|
-
if (!result.id) return;
|
|
140
|
-
var sendRecvType = isSender ? _constants.STATS.SEND_DIRECTION : _constants.STATS.RECEIVE_DIRECTION;
|
|
141
|
-
var ipType = isRemote ? _constants.STATS.REMOTE : _constants.STATS.LOCAL;
|
|
142
|
-
if (!RemoteCandidateType[result.id]) {
|
|
143
|
-
RemoteCandidateType[result.id] = [];
|
|
144
|
-
}
|
|
145
|
-
if (!RemoteTransport[result.id]) {
|
|
146
|
-
RemoteTransport[result.id] = [];
|
|
147
|
-
}
|
|
148
|
-
if (!RemoteIpAddress[result.id]) {
|
|
149
|
-
RemoteIpAddress[result.id] = [];
|
|
150
|
-
}
|
|
151
|
-
if (!RemoteNetworkType[result.id]) {
|
|
152
|
-
RemoteNetworkType[result.id] = [];
|
|
153
|
-
}
|
|
154
|
-
if (result.candidateType && RemoteCandidateType[result.id].indexOf(result.candidateType) === -1) {
|
|
155
|
-
RemoteCandidateType[result.id].push(result.candidateType);
|
|
156
|
-
}
|
|
157
|
-
if (result.protocol && RemoteTransport[result.id].indexOf(result.protocol) === -1) {
|
|
158
|
-
RemoteTransport[result.id].push(result.protocol.toUpperCase());
|
|
159
|
-
}
|
|
160
|
-
if (result.ip && RemoteIpAddress[result.id].indexOf("".concat(result.ip, ":").concat(result.portNumber)) === -1) {
|
|
161
|
-
RemoteIpAddress[result.id].push("".concat(result.ip)); // TODO: Add ports
|
|
162
|
-
}
|
|
163
156
|
|
|
164
|
-
|
|
165
|
-
|
|
157
|
+
// We only care about the successful local candidate
|
|
158
|
+
if (((_this$successfulCandi = _this.successfulCandidatePair) === null || _this$successfulCandi === void 0 ? void 0 : _this$successfulCandi.localCandidateId) !== result.id) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
var transport;
|
|
162
|
+
if (result.relayProtocol) {
|
|
163
|
+
transport = result.relayProtocol.toUpperCase();
|
|
164
|
+
} else if (result.protocol) {
|
|
165
|
+
transport = result.protocol.toUpperCase();
|
|
166
166
|
}
|
|
167
|
+
var sendRecvType = isSender ? _constants.STATS.SEND_DIRECTION : _constants.STATS.RECEIVE_DIRECTION;
|
|
168
|
+
var ipType = isRemote ? _constants.STATS.REMOTE : _constants.STATS.LOCAL;
|
|
167
169
|
_this.statsResults.internal.candidates[result.id] = {
|
|
168
|
-
candidateType:
|
|
169
|
-
ipAddress:
|
|
170
|
+
candidateType: result.candidateType,
|
|
171
|
+
ipAddress: result.ip,
|
|
172
|
+
// TODO: add ports
|
|
170
173
|
portNumber: result.port,
|
|
171
|
-
networkType:
|
|
174
|
+
networkType: result.networkType,
|
|
172
175
|
priority: result.priority,
|
|
173
|
-
transport:
|
|
176
|
+
transport: transport,
|
|
174
177
|
timestamp: result.time,
|
|
175
178
|
id: result.id,
|
|
176
179
|
type: result.type
|
|
177
180
|
};
|
|
178
|
-
_this.statsResults.connectionType[ipType].candidateType =
|
|
179
|
-
_this.statsResults.connectionType[ipType].ipAddress =
|
|
180
|
-
_this.statsResults.connectionType[ipType].networkType =
|
|
181
|
-
_this.statsResults.connectionType[ipType].transport =
|
|
181
|
+
_this.statsResults.connectionType[ipType].candidateType = result.candidateType;
|
|
182
|
+
_this.statsResults.connectionType[ipType].ipAddress = result.ipAddress;
|
|
183
|
+
_this.statsResults.connectionType[ipType].networkType = result.networkType === _constants.NETWORK_TYPE.VPN ? _constants.NETWORK_TYPE.UNKNOWN : result.networkType;
|
|
184
|
+
_this.statsResults.connectionType[ipType].transport = transport;
|
|
182
185
|
_this.statsResults[type][sendRecvType].totalRoundTripTime = result.totalRoundTripTime;
|
|
183
186
|
});
|
|
184
187
|
_this.statsStarted = false;
|
|
@@ -188,141 +191,33 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
188
191
|
_this.networkQualityMonitor = networkQualityMonitor;
|
|
189
192
|
_this.correlationId = config.correlationId;
|
|
190
193
|
_this.mqaSentCount = -1;
|
|
191
|
-
_this.lastMqaDataSent = {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
recv: {}
|
|
196
|
-
},
|
|
197
|
-
audio: {
|
|
198
|
-
send: {},
|
|
199
|
-
recv: {}
|
|
200
|
-
},
|
|
201
|
-
share: {
|
|
202
|
-
send: {},
|
|
203
|
-
recv: {}
|
|
204
|
-
}
|
|
205
|
-
},
|
|
206
|
-
video: {
|
|
207
|
-
send: {},
|
|
208
|
-
recv: {}
|
|
209
|
-
},
|
|
210
|
-
audio: {
|
|
211
|
-
send: {},
|
|
212
|
-
recv: {}
|
|
213
|
-
},
|
|
214
|
-
share: {
|
|
215
|
-
send: {},
|
|
216
|
-
recv: {}
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
_this.localMQEStats = {
|
|
220
|
-
audio: {
|
|
221
|
-
RX: {
|
|
222
|
-
packetsLost: [],
|
|
223
|
-
jitter: [],
|
|
224
|
-
latency: [],
|
|
225
|
-
bitRate: []
|
|
226
|
-
},
|
|
227
|
-
TX: {
|
|
228
|
-
packetsLost: [],
|
|
229
|
-
jitter: [],
|
|
230
|
-
latency: [],
|
|
231
|
-
bitRate: []
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
video: {
|
|
235
|
-
RX: {
|
|
236
|
-
packetsLost: [],
|
|
237
|
-
jitter: [],
|
|
238
|
-
latency: [],
|
|
239
|
-
bitRate: [],
|
|
240
|
-
frameRate: [],
|
|
241
|
-
resolutionWidth: [],
|
|
242
|
-
resolutionHeight: [],
|
|
243
|
-
requestedKeyFrame: [],
|
|
244
|
-
receivedKeyFrame: []
|
|
245
|
-
},
|
|
246
|
-
TX: {
|
|
247
|
-
packetsLost: [],
|
|
248
|
-
jitter: [],
|
|
249
|
-
latency: [],
|
|
250
|
-
bitRate: [],
|
|
251
|
-
frameRate: [],
|
|
252
|
-
resolutionWidth: [],
|
|
253
|
-
resolutionHeight: [],
|
|
254
|
-
requestedKeyFrame: [],
|
|
255
|
-
receivedKeyFrame: []
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
};
|
|
259
|
-
_this.lastEmittedStartStopEvent = {
|
|
260
|
-
audio: {
|
|
261
|
-
local: undefined,
|
|
262
|
-
remote: undefined
|
|
263
|
-
},
|
|
264
|
-
video: {
|
|
265
|
-
local: undefined,
|
|
266
|
-
remote: undefined
|
|
267
|
-
},
|
|
268
|
-
share: {
|
|
269
|
-
local: undefined,
|
|
270
|
-
remote: undefined
|
|
271
|
-
}
|
|
272
|
-
};
|
|
194
|
+
_this.lastMqaDataSent = {};
|
|
195
|
+
_this.lastEmittedStartStopEvent = {};
|
|
196
|
+
_this.receiveSlotCallback = receiveSlotCallback;
|
|
197
|
+
_this.successfulCandidatePair = {};
|
|
273
198
|
return _this;
|
|
274
199
|
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Resets cumulative stats arrays.
|
|
203
|
+
*
|
|
204
|
+
* @public
|
|
205
|
+
* @memberof StatsAnalyzer
|
|
206
|
+
* @returns {void}
|
|
207
|
+
*/
|
|
275
208
|
(0, _createClass2.default)(StatsAnalyzer, [{
|
|
276
|
-
key: "populateResults",
|
|
277
|
-
value: function populateResults(lastMqa) {
|
|
278
|
-
// Audio
|
|
279
|
-
|
|
280
|
-
this.localMQEStats.audio.RX.packetsLost.push(lastMqa.audioReceive[0].common.mediaHopByHopLost);
|
|
281
|
-
this.localMQEStats.audio.RX.jitter.push(lastMqa.audioReceive[0].streams[0].common.rtpJitter);
|
|
282
|
-
this.localMQEStats.audio.RX.latency.push(lastMqa.audioReceive[0].common.roundTripTime);
|
|
283
|
-
this.localMQEStats.audio.RX.bitRate.push(lastMqa.audioReceive[0].streams[0].common.receivedBitrate);
|
|
284
|
-
this.localMQEStats.audio.TX.packetsLost.push(lastMqa.audioTransmit[0].common.remoteLossRate);
|
|
285
|
-
this.localMQEStats.audio.TX.jitter.push(lastMqa.audioTransmit[0].common.remoteJitter);
|
|
286
|
-
this.localMQEStats.audio.TX.latency.push(lastMqa.audioTransmit[0].common.roundTripTime);
|
|
287
|
-
this.localMQEStats.audio.TX.bitRate.push(lastMqa.audioTransmit[0].streams[0].common.transmittedBitrate);
|
|
288
|
-
|
|
289
|
-
// Video
|
|
290
|
-
|
|
291
|
-
this.localMQEStats.video.RX.packetsLost.push(lastMqa.videoReceive[0].common.mediaHopByHopLost);
|
|
292
|
-
this.localMQEStats.video.RX.jitter.push(lastMqa.videoReceive[0].streams[0].common.rtpJitter);
|
|
293
|
-
this.localMQEStats.video.RX.latency.push(lastMqa.videoReceive[0].streams[0].common.roundTripTime);
|
|
294
|
-
this.localMQEStats.video.RX.bitRate.push(lastMqa.videoReceive[0].streams[0].common.receivedBitrate);
|
|
295
|
-
this.localMQEStats.video.RX.frameRate.push(lastMqa.videoReceive[0].streams[0].common.receivedFrameRate);
|
|
296
|
-
this.localMQEStats.video.RX.resolutionWidth.push(lastMqa.videoReceive[0].streams[0].receivedWidth);
|
|
297
|
-
this.localMQEStats.video.RX.resolutionHeight.push(lastMqa.videoReceive[0].streams[0].receivedHeight);
|
|
298
|
-
this.localMQEStats.video.RX.requestedKeyFrame.push();
|
|
299
|
-
this.localMQEStats.video.RX.receivedKeyFrame.push();
|
|
300
|
-
this.localMQEStats.video.TX.packetsLost.push(lastMqa.videoTransmit[0].common.remoteLossRate);
|
|
301
|
-
this.localMQEStats.video.TX.jitter.push(lastMqa.videoTransmit[0].common.remoteJitter);
|
|
302
|
-
this.localMQEStats.video.TX.latency.push(lastMqa.videoTransmit[0].common.roundTripTime);
|
|
303
|
-
this.localMQEStats.video.TX.bitRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedBitrate);
|
|
304
|
-
this.localMQEStats.video.TX.frameRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedFrameRate);
|
|
305
|
-
this.localMQEStats.video.TX.resolutionWidth.push(lastMqa.videoTransmit[0].streams[0].transmittedWidth);
|
|
306
|
-
this.localMQEStats.video.TX.resolutionHeight.push(lastMqa.videoTransmit[0].streams[0].transmittedHeight);
|
|
307
|
-
this.localMQEStats.video.TX.requestedKeyFrame.push(lastMqa.videoTransmit[0].streams[0].requestedKeyFrames);
|
|
308
|
-
this.localMQEStats.video.TX.receivedKeyFrame.push();
|
|
309
|
-
}
|
|
310
|
-
}, {
|
|
311
209
|
key: "resetStatsResults",
|
|
312
210
|
value: function resetStatsResults() {
|
|
313
|
-
|
|
314
|
-
this.statsResults.
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
this.statsResults.audio.send.meanRoundTripTime = [];
|
|
324
|
-
this.statsResults.video.send.meanRoundTripTime = [];
|
|
325
|
-
this.statsResults.share.send.meanRoundTripTime = [];
|
|
211
|
+
var _this2 = this;
|
|
212
|
+
(0, _keys.default)(this.statsResults).forEach(function (mediaType) {
|
|
213
|
+
if (mediaType.includes('recv')) {
|
|
214
|
+
_this2.statsResults[mediaType].recv.meanRtpJitter = [];
|
|
215
|
+
}
|
|
216
|
+
if (mediaType.includes('send')) {
|
|
217
|
+
_this2.statsResults[mediaType].send.meanRemoteJitter = [];
|
|
218
|
+
_this2.statsResults[mediaType].send.meanRoundTripTime = [];
|
|
219
|
+
}
|
|
220
|
+
});
|
|
326
221
|
}
|
|
327
222
|
|
|
328
223
|
/**
|
|
@@ -340,7 +235,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
340
235
|
}
|
|
341
236
|
|
|
342
237
|
/**
|
|
343
|
-
* captures MQA data from
|
|
238
|
+
* captures MQA data from media connection
|
|
344
239
|
*
|
|
345
240
|
* @public
|
|
346
241
|
* @memberof StatsAnalyzer
|
|
@@ -349,96 +244,92 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
349
244
|
}, {
|
|
350
245
|
key: "sendMqaData",
|
|
351
246
|
value: function sendMqaData() {
|
|
352
|
-
var
|
|
353
|
-
var
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
isShareStream: true
|
|
247
|
+
var _this3 = this;
|
|
248
|
+
var newMqa = (0, _lodash.cloneDeep)(_config.emptyMqaInterval);
|
|
249
|
+
(0, _keys.default)(this.statsResults).forEach(function (mediaType) {
|
|
250
|
+
if (mediaType.includes('audio-send') || mediaType.includes('audio-share-send')) {
|
|
251
|
+
var audioSender = (0, _lodash.cloneDeep)(_config.emptyAudioTransmit);
|
|
252
|
+
(0, _mqaUtil.getAudioSenderMqa)({
|
|
253
|
+
audioSender: audioSender,
|
|
254
|
+
statsResults: _this3.statsResults,
|
|
255
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
256
|
+
mediaType: mediaType
|
|
257
|
+
});
|
|
258
|
+
newMqa.audioTransmit.push(audioSender);
|
|
259
|
+
} else if (mediaType.includes('audio-recv') || mediaType.includes('audio-share-recv')) {
|
|
260
|
+
var audioReceiver = (0, _lodash.cloneDeep)(_config.emptyAudioReceive);
|
|
261
|
+
(0, _mqaUtil.getAudioReceiverMqa)({
|
|
262
|
+
audioReceiver: audioReceiver,
|
|
263
|
+
statsResults: _this3.statsResults,
|
|
264
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
265
|
+
mediaType: mediaType
|
|
266
|
+
});
|
|
267
|
+
newMqa.audioReceive.push(audioReceiver);
|
|
268
|
+
} else if (mediaType.includes('video-send') || mediaType.includes('video-share-send')) {
|
|
269
|
+
var videoSender = (0, _lodash.cloneDeep)(_config.emptyVideoTransmit);
|
|
270
|
+
(0, _mqaUtil.getVideoSenderMqa)({
|
|
271
|
+
videoSender: videoSender,
|
|
272
|
+
statsResults: _this3.statsResults,
|
|
273
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
274
|
+
mediaType: mediaType
|
|
275
|
+
});
|
|
276
|
+
newMqa.videoTransmit.push(videoSender);
|
|
277
|
+
} else if (mediaType.includes('video-recv') || mediaType.includes('video-share-recv')) {
|
|
278
|
+
var videoReceiver = (0, _lodash.cloneDeep)(_config.emptyVideoReceive);
|
|
279
|
+
(0, _mqaUtil.getVideoReceiverMqa)({
|
|
280
|
+
videoReceiver: videoReceiver,
|
|
281
|
+
statsResults: _this3.statsResults,
|
|
282
|
+
lastMqaDataSent: _this3.lastMqaDataSent,
|
|
283
|
+
mediaType: mediaType
|
|
284
|
+
});
|
|
285
|
+
newMqa.videoReceive.push(videoReceiver);
|
|
286
|
+
}
|
|
393
287
|
});
|
|
394
|
-
|
|
288
|
+
newMqa.intervalMetadata.peerReflexiveIP = this.statsResults.connectionType.local.ipAddress;
|
|
395
289
|
|
|
396
290
|
// Adding peripheral information
|
|
397
|
-
|
|
398
|
-
_config.default.intervals[0].intervalMetadata.peripherals.push({
|
|
291
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
399
292
|
information: _constants._UNKNOWN_,
|
|
400
293
|
name: _constants.MEDIA_DEVICES.SPEAKER
|
|
401
294
|
});
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
295
|
+
if (this.statsResults['audio-send']) {
|
|
296
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
297
|
+
information: this.statsResults['audio-send'].trackLabel || _constants._UNKNOWN_,
|
|
298
|
+
name: _constants.MEDIA_DEVICES.MICROPHONE
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
if (this.statsResults['video-send']) {
|
|
302
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
303
|
+
information: this.statsResults['video-send'].trackLabel || _constants._UNKNOWN_,
|
|
304
|
+
name: _constants.MEDIA_DEVICES.CAMERA
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
newMqa.networkType = this.statsResults.connectionType.local.networkType;
|
|
413
308
|
this.mqaSentCount += 1;
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
417
|
-
this.lastMqaDataSent = (0, _cloneDeep2.default)(this.statsResults);
|
|
418
|
-
this.populateResults(_config.default.intervals[0]);
|
|
309
|
+
newMqa.intervalNumber = this.mqaSentCount;
|
|
419
310
|
this.resetStatsResults();
|
|
420
311
|
this.emit({
|
|
421
312
|
file: 'statsAnalyzer',
|
|
422
313
|
function: 'sendMqaData'
|
|
423
314
|
}, EVENTS.MEDIA_QUALITY, {
|
|
424
|
-
data:
|
|
315
|
+
data: newMqa,
|
|
425
316
|
// @ts-ignore
|
|
426
|
-
networkType:
|
|
317
|
+
networkType: newMqa.networkType
|
|
427
318
|
});
|
|
428
319
|
}
|
|
429
320
|
|
|
430
321
|
/**
|
|
431
|
-
* updated the
|
|
322
|
+
* updated the media connection when changed
|
|
432
323
|
*
|
|
433
324
|
* @private
|
|
434
|
-
* @memberof
|
|
435
|
-
* @param {
|
|
325
|
+
* @memberof StatsAnalyzer
|
|
326
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
436
327
|
* @returns {void}
|
|
437
328
|
*/
|
|
438
329
|
}, {
|
|
439
|
-
key: "
|
|
440
|
-
value: function
|
|
441
|
-
this.
|
|
330
|
+
key: "updateMediaConnection",
|
|
331
|
+
value: function updateMediaConnection(mediaConnection) {
|
|
332
|
+
this.mediaConnection = mediaConnection;
|
|
442
333
|
}
|
|
443
334
|
|
|
444
335
|
/**
|
|
@@ -446,24 +337,24 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
446
337
|
*
|
|
447
338
|
* @public
|
|
448
339
|
* @memberof StatsAnalyzer
|
|
449
|
-
* @param {
|
|
340
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
450
341
|
* @returns {Promise}
|
|
451
342
|
*/
|
|
452
343
|
}, {
|
|
453
344
|
key: "startAnalyzer",
|
|
454
|
-
value: function startAnalyzer(
|
|
455
|
-
var
|
|
345
|
+
value: function startAnalyzer(mediaConnection) {
|
|
346
|
+
var _this4 = this;
|
|
456
347
|
if (!this.statsStarted) {
|
|
457
348
|
this.statsStarted = true;
|
|
458
|
-
this.
|
|
349
|
+
this.mediaConnection = mediaConnection;
|
|
459
350
|
return this.getStatsAndParse().then(function () {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
},
|
|
351
|
+
_this4.statsInterval = setInterval(function () {
|
|
352
|
+
_this4.getStatsAndParse();
|
|
353
|
+
}, _this4.config.analyzerInterval);
|
|
463
354
|
// Trigger initial fetch
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
355
|
+
_this4.sendMqaData();
|
|
356
|
+
_this4.mqaInterval = setInterval(function () {
|
|
357
|
+
_this4.sendMqaData();
|
|
467
358
|
}, _constants.MQA_INTEVAL);
|
|
468
359
|
});
|
|
469
360
|
}
|
|
@@ -480,7 +371,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
480
371
|
}, {
|
|
481
372
|
key: "stopAnalyzer",
|
|
482
373
|
value: function stopAnalyzer() {
|
|
483
|
-
var
|
|
374
|
+
var _this5 = this;
|
|
484
375
|
var sendOneLastMqa = this.mqaInterval && this.statsInterval;
|
|
485
376
|
if (this.statsInterval) {
|
|
486
377
|
clearInterval(this.statsInterval);
|
|
@@ -492,8 +383,8 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
492
383
|
}
|
|
493
384
|
if (sendOneLastMqa) {
|
|
494
385
|
return this.getStatsAndParse().then(function () {
|
|
495
|
-
|
|
496
|
-
|
|
386
|
+
_this5.sendMqaData();
|
|
387
|
+
_this5.mediaConnection = null;
|
|
497
388
|
});
|
|
498
389
|
}
|
|
499
390
|
return _promise.default.resolve();
|
|
@@ -515,6 +406,32 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
515
406
|
if (!getStatsResult) {
|
|
516
407
|
return;
|
|
517
408
|
}
|
|
409
|
+
|
|
410
|
+
// Generate empty stats results
|
|
411
|
+
if (!this.statsResults[type]) {
|
|
412
|
+
this.statsResults[type] = {};
|
|
413
|
+
}
|
|
414
|
+
if (isSender && !this.statsResults[type].send) {
|
|
415
|
+
this.statsResults[type].send = (0, _lodash.cloneDeep)(emptySender);
|
|
416
|
+
} else if (!isSender && !this.statsResults[type].recv) {
|
|
417
|
+
this.statsResults[type].recv = (0, _lodash.cloneDeep)(emptyReceiver);
|
|
418
|
+
}
|
|
419
|
+
if (!this.statsResults.resolutions[type]) {
|
|
420
|
+
this.statsResults.resolutions[type] = {};
|
|
421
|
+
}
|
|
422
|
+
if (isSender && !this.statsResults.resolutions[type].send) {
|
|
423
|
+
this.statsResults.resolutions[type].send = (0, _lodash.cloneDeep)(emptySender);
|
|
424
|
+
} else if (!isSender && !this.statsResults.resolutions[type].recv) {
|
|
425
|
+
this.statsResults.resolutions[type].recv = (0, _lodash.cloneDeep)(emptyReceiver);
|
|
426
|
+
}
|
|
427
|
+
if (!this.statsResults.internal[type]) {
|
|
428
|
+
this.statsResults.internal[type] = {};
|
|
429
|
+
}
|
|
430
|
+
if (isSender && !this.statsResults.internal[type].send) {
|
|
431
|
+
this.statsResults.internal[type].send = (0, _lodash.cloneDeep)(emptySender);
|
|
432
|
+
} else if (!isSender && !this.statsResults.internal[type].recv) {
|
|
433
|
+
this.statsResults.internal[type].recv = (0, _lodash.cloneDeep)(emptyReceiver);
|
|
434
|
+
}
|
|
518
435
|
switch (getStatsResult.type) {
|
|
519
436
|
case 'outbound-rtp':
|
|
520
437
|
this.processOutboundRTPResult(getStatsResult, type);
|
|
@@ -522,6 +439,9 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
522
439
|
case 'inbound-rtp':
|
|
523
440
|
this.processInboundRTPResult(getStatsResult, type);
|
|
524
441
|
break;
|
|
442
|
+
case 'track':
|
|
443
|
+
this.processTrackResult(getStatsResult, type);
|
|
444
|
+
break;
|
|
525
445
|
case 'remote-inbound-rtp':
|
|
526
446
|
case 'remote-outbound-rtp':
|
|
527
447
|
// @ts-ignore
|
|
@@ -546,21 +466,35 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
546
466
|
/**
|
|
547
467
|
* Filters the get stats results for types
|
|
548
468
|
* @private
|
|
549
|
-
* @param {Array}
|
|
469
|
+
* @param {Array} statsItem
|
|
550
470
|
* @param {String} type
|
|
551
471
|
* @param {boolean} isSender
|
|
552
472
|
* @returns {void}
|
|
553
473
|
*/
|
|
554
474
|
}, {
|
|
555
475
|
key: "filterAndParseGetStatsResults",
|
|
556
|
-
value: function filterAndParseGetStatsResults(
|
|
557
|
-
var
|
|
476
|
+
value: function filterAndParseGetStatsResults(statsItem, type, isSender) {
|
|
477
|
+
var _this6 = this;
|
|
558
478
|
var types = _constants.DEFAULT_GET_STATS_FILTER.types;
|
|
559
|
-
|
|
479
|
+
|
|
480
|
+
// get the successful candidate pair before parsing stats.
|
|
481
|
+
statsItem.report.forEach(function (report) {
|
|
482
|
+
if (report.type === 'candidate-pair' && report.state === 'succeeded') {
|
|
483
|
+
_this6.successfulCandidatePair = report;
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
statsItem.report.forEach(function (result) {
|
|
560
487
|
if (types.includes(result.type)) {
|
|
561
|
-
|
|
488
|
+
_this6.parseGetStatsResult(result, type, isSender);
|
|
562
489
|
}
|
|
563
490
|
});
|
|
491
|
+
if (this.statsResults[type]) {
|
|
492
|
+
this.statsResults[type].direction = statsItem.currentDirection;
|
|
493
|
+
this.statsResults[type].trackLabel = statsItem.localTrackLabel;
|
|
494
|
+
this.statsResults[type].csi = statsItem.csi;
|
|
495
|
+
// reset the successful candidate pair.
|
|
496
|
+
this.successfulCandidatePair = {};
|
|
497
|
+
}
|
|
564
498
|
}
|
|
565
499
|
|
|
566
500
|
/**
|
|
@@ -575,7 +509,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
575
509
|
if (!result) {
|
|
576
510
|
return;
|
|
577
511
|
}
|
|
578
|
-
if (type
|
|
512
|
+
if (type.includes('audio-send')) {
|
|
579
513
|
this.statsResults[type].send.audioLevel = result.audioLevel;
|
|
580
514
|
this.statsResults[type].send.totalAudioEnergy = result.totalAudioEnergy;
|
|
581
515
|
}
|
|
@@ -591,144 +525,149 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
591
525
|
* @returns {void}
|
|
592
526
|
*/
|
|
593
527
|
function compareLastStatsResult() {
|
|
528
|
+
var _this7 = this;
|
|
594
529
|
if (this.lastStatsResults !== null && this.meetingMediaStatus) {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
530
|
+
var getCurrentStatsTotals = function getCurrentStatsTotals(keyPrefix, value) {
|
|
531
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
532
|
+
return key.startsWith(keyPrefix);
|
|
533
|
+
}).reduce(function (prev, cur) {
|
|
534
|
+
var _this7$statsResults$c;
|
|
535
|
+
return prev + (((_this7$statsResults$c = _this7.statsResults[cur]) === null || _this7$statsResults$c === void 0 ? void 0 : _this7$statsResults$c.recv[value]) || 0);
|
|
536
|
+
}, 0);
|
|
537
|
+
};
|
|
538
|
+
var getPreviousStatsTotals = function getPreviousStatsTotals(keyPrefix, value) {
|
|
539
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
540
|
+
return key.startsWith(keyPrefix);
|
|
541
|
+
}).reduce(function (prev, cur) {
|
|
542
|
+
var _this7$lastStatsResul;
|
|
543
|
+
return prev + (((_this7$lastStatsResul = _this7.lastStatsResults[cur]) === null || _this7$lastStatsResul === void 0 ? void 0 : _this7$lastStatsResul.recv[value]) || 0);
|
|
544
|
+
}, 0);
|
|
545
|
+
};
|
|
546
|
+
var getCurrentResolutionsStatsTotals = function getCurrentResolutionsStatsTotals(keyPrefix, value) {
|
|
547
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
548
|
+
return key.startsWith(keyPrefix);
|
|
549
|
+
}).reduce(function (prev, cur) {
|
|
550
|
+
var _this7$statsResults$r;
|
|
551
|
+
return prev + (((_this7$statsResults$r = _this7.statsResults.resolutions[cur]) === null || _this7$statsResults$r === void 0 ? void 0 : _this7$statsResults$r.recv[value]) || 0);
|
|
552
|
+
}, 0);
|
|
553
|
+
};
|
|
554
|
+
var getPreviousResolutionsStatsTotals = function getPreviousResolutionsStatsTotals(keyPrefix, value) {
|
|
555
|
+
return (0, _keys.default)(_this7.statsResults).filter(function (key) {
|
|
556
|
+
return key.startsWith(keyPrefix);
|
|
557
|
+
}).reduce(function (prev, cur) {
|
|
558
|
+
var _this7$lastStatsResul2;
|
|
559
|
+
return prev + (((_this7$lastStatsResul2 = _this7.lastStatsResults.resolutions[cur]) === null || _this7$lastStatsResul2 === void 0 ? void 0 : _this7$lastStatsResul2.recv[value]) || 0);
|
|
560
|
+
}, 0);
|
|
561
|
+
};
|
|
562
|
+
if (this.meetingMediaStatus.expected.sendAudio && this.lastStatsResults['audio-send']) {
|
|
563
|
+
// compare audio stats sent
|
|
564
|
+
// NOTE: relies on there being only one sender.
|
|
565
|
+
var currentStats = this.statsResults['audio-send'].send;
|
|
566
|
+
var previousStats = this.lastStatsResults['audio-send'].send;
|
|
602
567
|
if (currentStats.totalPacketsSent === previousStats.totalPacketsSent || currentStats.totalPacketsSent === 0) {
|
|
603
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
568
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio RTP packets sent", currentStats.totalPacketsSent);
|
|
604
569
|
} else {
|
|
605
570
|
if (currentStats.totalAudioEnergy === previousStats.totalAudioEnergy || currentStats.totalAudioEnergy === 0) {
|
|
606
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
571
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio Energy present", currentStats.totalAudioEnergy);
|
|
607
572
|
}
|
|
608
573
|
if (currentStats.audioLevel === 0) {
|
|
609
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
574
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> audio level is 0 for the user");
|
|
610
575
|
}
|
|
611
576
|
}
|
|
612
|
-
this.emitStartStopEvents(
|
|
577
|
+
this.emitStartStopEvents('audio', previousStats.totalPacketsSent, currentStats.totalPacketsSent, true);
|
|
613
578
|
}
|
|
614
579
|
if (this.meetingMediaStatus.expected.receiveAudio) {
|
|
615
580
|
// compare audio stats received
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
581
|
+
var currentPacketsReceived = getCurrentStatsTotals('audio-recv', 'totalPacketsReceived');
|
|
582
|
+
var previousPacketsReceived = getPreviousStatsTotals('audio-recv', 'totalPacketsReceived');
|
|
583
|
+
var currentSamplesReceived = getCurrentStatsTotals('audio-recv', 'totalSamplesReceived');
|
|
584
|
+
var previousSamplesReceived = getPreviousStatsTotals('audio-recv', 'totalSamplesReceived');
|
|
585
|
+
if (currentPacketsReceived === previousPacketsReceived || currentPacketsReceived === 0) {
|
|
586
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio RTP packets received", currentPacketsReceived);
|
|
587
|
+
} else if (currentSamplesReceived === previousSamplesReceived || currentSamplesReceived === 0) {
|
|
588
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio samples received", currentSamplesReceived);
|
|
622
589
|
}
|
|
623
|
-
this.emitStartStopEvents(
|
|
590
|
+
this.emitStartStopEvents('audio', previousPacketsReceived, currentPacketsReceived, false);
|
|
624
591
|
}
|
|
625
|
-
|
|
626
|
-
if (this.meetingMediaStatus.expected.sendVideo) {
|
|
592
|
+
if (this.meetingMediaStatus.expected.sendVideo && this.lastStatsResults['video-send']) {
|
|
627
593
|
// compare video stats sent
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
if (
|
|
631
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
632
|
-
} else
|
|
633
|
-
if (
|
|
634
|
-
|
|
635
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " Frames Encoded"));
|
|
636
|
-
this.emit({
|
|
637
|
-
file: 'statsAnalyzer',
|
|
638
|
-
function: 'compareLastStatsResult'
|
|
639
|
-
}, EVENTS.NO_VIDEO_ENCODED, {
|
|
640
|
-
mediaType: mediaType
|
|
641
|
-
});
|
|
594
|
+
var _currentStats = this.statsResults['video-send'].send;
|
|
595
|
+
var _previousStats = this.lastStatsResults['video-send'].send;
|
|
596
|
+
if (_currentStats.totalPacketsSent === _previousStats.totalPacketsSent || _currentStats.totalPacketsSent === 0) {
|
|
597
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video RTP packets sent", _currentStats.totalPacketsSent);
|
|
598
|
+
} else {
|
|
599
|
+
if (_currentStats.framesEncoded === _previousStats.framesEncoded || _currentStats.framesEncoded === 0) {
|
|
600
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video Frames Encoded", _currentStats.framesEncoded);
|
|
642
601
|
}
|
|
643
|
-
if (this.statsResults.resolutions[
|
|
644
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
645
|
-
}
|
|
646
|
-
|
|
647
|
-
// Video is encoded but frames are not sent
|
|
648
|
-
if (currentStats.framesEncoded !== previousStats.framesEncoded && (currentStats.framesSent === previousStats.framesSent || currentStats.framesSent === 0)) {
|
|
649
|
-
this.lastEmittedStartStopEvent[mediaType].local = EVENTS.NO_FRAMES_SENT;
|
|
650
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " frames sent even though frames are encoded"));
|
|
651
|
-
this.emit({
|
|
652
|
-
file: 'statsAnalyzer',
|
|
653
|
-
function: 'compareLastStatsResult'
|
|
654
|
-
}, EVENTS.NO_FRAMES_SENT, {
|
|
655
|
-
mediaType: mediaType
|
|
656
|
-
});
|
|
602
|
+
if (this.statsResults.resolutions['video-send'].send.framesSent === this.lastStatsResults.resolutions['video-send'].send.framesSent || this.statsResults.resolutions['video-send'].send.framesSent === 0) {
|
|
603
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video Frames sent", this.statsResults.resolutions['video-send'].send.framesSent);
|
|
657
604
|
}
|
|
658
605
|
}
|
|
659
|
-
this.emitStartStopEvents(
|
|
606
|
+
this.emitStartStopEvents('video', _previousStats.framesSent, _currentStats.framesSent, true);
|
|
660
607
|
}
|
|
661
608
|
if (this.meetingMediaStatus.expected.receiveVideo) {
|
|
662
|
-
// compare video stats
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
609
|
+
// compare video stats received
|
|
610
|
+
var _currentPacketsReceived = getCurrentStatsTotals('video-recv', 'totalPacketsReceived');
|
|
611
|
+
var _previousPacketsReceived = getPreviousStatsTotals('video-recv', 'totalPacketsReceived');
|
|
612
|
+
var currentFramesReceived = getCurrentResolutionsStatsTotals('video-recv', 'framesReceived');
|
|
613
|
+
var previousFramesReceived = getPreviousResolutionsStatsTotals('video-recv', 'framesReceived');
|
|
614
|
+
var currentFramesDecoded = getCurrentStatsTotals('video-recv', 'framesDecoded');
|
|
615
|
+
var previousFramesDecoded = getPreviousStatsTotals('video-recv', 'framesDecoded');
|
|
616
|
+
var currentFramesDropped = getCurrentResolutionsStatsTotals('video-recv', 'framesDropped');
|
|
617
|
+
var previousFramesDropped = getPreviousResolutionsStatsTotals('video-recv', 'framesDropped');
|
|
618
|
+
if (_currentPacketsReceived === _previousPacketsReceived || _currentPacketsReceived === 0) {
|
|
619
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video RTP packets received", _currentPacketsReceived);
|
|
668
620
|
} else {
|
|
669
|
-
if (
|
|
670
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
621
|
+
if (currentFramesReceived === previousFramesReceived || currentFramesReceived === 0) {
|
|
622
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video frames received", currentFramesReceived);
|
|
671
623
|
}
|
|
672
|
-
if (
|
|
673
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
624
|
+
if (currentFramesDecoded === previousFramesDecoded || currentFramesDecoded === 0) {
|
|
625
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video frames decoded", currentFramesDecoded);
|
|
674
626
|
}
|
|
675
|
-
if (
|
|
676
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
627
|
+
if (currentFramesDropped - previousFramesDropped > 10) {
|
|
628
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> video frames are getting dropped", currentFramesDropped - previousFramesDropped);
|
|
677
629
|
}
|
|
678
630
|
}
|
|
679
|
-
this.emitStartStopEvents(
|
|
631
|
+
this.emitStartStopEvents('video', previousFramesDecoded, currentFramesDecoded, false);
|
|
680
632
|
}
|
|
681
|
-
|
|
682
|
-
if (this.meetingMediaStatus.expected.sendShare) {
|
|
633
|
+
if (this.meetingMediaStatus.expected.sendShare && this.lastStatsResults['video-share-send']) {
|
|
683
634
|
// compare share stats sent
|
|
684
635
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
if (
|
|
688
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
689
|
-
} else
|
|
690
|
-
if (
|
|
691
|
-
|
|
692
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " frames getting encoded"));
|
|
693
|
-
this.emit({
|
|
694
|
-
file: 'statsAnalyzer',
|
|
695
|
-
function: 'compareLastStatsResult'
|
|
696
|
-
}, EVENTS.NO_VIDEO_ENCODED, {
|
|
697
|
-
mediaType: mediaType
|
|
698
|
-
});
|
|
699
|
-
}
|
|
700
|
-
if (this.statsResults.resolutions[mediaType].send.framesSent === this.lastStatsResults.resolutions[mediaType].send.framesSent || this.statsResults.resolutions[mediaType].send.framesSent === 0) {
|
|
701
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " frames sent"));
|
|
636
|
+
var _currentStats2 = this.statsResults['video-share-send'].send;
|
|
637
|
+
var _previousStats2 = this.lastStatsResults['video-share-send'].send;
|
|
638
|
+
if (_currentStats2.totalPacketsSent === _previousStats2.totalPacketsSent || _currentStats2.totalPacketsSent === 0) {
|
|
639
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share RTP packets sent", _currentStats2.totalPacketsSent);
|
|
640
|
+
} else {
|
|
641
|
+
if (_currentStats2.framesEncoded === _previousStats2.framesEncoded || _currentStats2.framesEncoded === 0) {
|
|
642
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames getting encoded", _currentStats2.framesEncoded);
|
|
702
643
|
}
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
if (currentStats.framesEncoded !== previousStats.framesEncoded && (currentStats.framesSent === previousStats.framesSent || currentStats.framesSent === 0)) {
|
|
706
|
-
this.lastEmittedStartStopEvent[mediaType].local = EVENTS.NO_FRAMES_SENT;
|
|
707
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No ".concat(mediaType, " Frames sent even though frames are being encoded"));
|
|
708
|
-
this.emit({
|
|
709
|
-
file: 'statsAnalyzer',
|
|
710
|
-
function: 'compareLastStatsResult'
|
|
711
|
-
}, EVENTS.NO_FRAMES_SENT, {
|
|
712
|
-
mediaType: mediaType
|
|
713
|
-
});
|
|
644
|
+
if (this.statsResults.resolutions['video-share-send'].send.framesSent === this.lastStatsResults.resolutions['video-share-send'].send.framesSent || this.statsResults.resolutions['video-share-send'].send.framesSent === 0) {
|
|
645
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames sent", this.statsResults.resolutions['video-share-send'].send.framesSent);
|
|
714
646
|
}
|
|
715
647
|
}
|
|
716
|
-
|
|
648
|
+
}
|
|
649
|
+
if (this.meetingMediaStatus.expected.sendShare) {
|
|
717
650
|
// TODO:need to check receive share value
|
|
718
|
-
// compare share stats
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
651
|
+
// compare share stats received
|
|
652
|
+
var _currentPacketsReceived2 = getCurrentStatsTotals('video-share-recv', 'totalPacketsReceived');
|
|
653
|
+
var _previousPacketsReceived2 = getPreviousStatsTotals('video-share-recv', 'totalPacketsReceived');
|
|
654
|
+
var _currentFramesReceived = getCurrentResolutionsStatsTotals('video-share-recv', 'framesReceived');
|
|
655
|
+
var _previousFramesReceived = getPreviousResolutionsStatsTotals('video-share-recv', 'framesReceived');
|
|
656
|
+
var _currentFramesDecoded = getCurrentStatsTotals('video-share-recv', 'framesDecoded');
|
|
657
|
+
var _previousFramesDecoded = getPreviousStatsTotals('video-share-recv', 'framesDecoded');
|
|
658
|
+
var _currentFramesDropped = getCurrentResolutionsStatsTotals('video-share-recv', 'framesDropped');
|
|
659
|
+
var _previousFramesDropped = getPreviousResolutionsStatsTotals('video-share-recv', 'framesDropped');
|
|
660
|
+
if (_currentPacketsReceived2 === _previousPacketsReceived2 || _currentPacketsReceived2 === 0) {
|
|
661
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share RTP packets received", _currentPacketsReceived2);
|
|
723
662
|
} else {
|
|
724
|
-
if (
|
|
725
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
663
|
+
if (_currentFramesReceived === _previousFramesReceived || _currentFramesReceived === 0) {
|
|
664
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames received", _currentFramesReceived);
|
|
726
665
|
}
|
|
727
|
-
if (
|
|
728
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
666
|
+
if (_currentFramesDecoded === _previousFramesDecoded || _currentFramesDecoded === 0) {
|
|
667
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames decoded", _currentFramesDecoded);
|
|
729
668
|
}
|
|
730
|
-
if (
|
|
731
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
669
|
+
if (_currentFramesDropped - _previousFramesDropped > 10) {
|
|
670
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> share frames are getting dropped", _currentFramesDropped - _previousFramesDropped);
|
|
732
671
|
}
|
|
733
672
|
}
|
|
734
673
|
|
|
@@ -749,39 +688,57 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
749
688
|
}, {
|
|
750
689
|
key: "getStatsAndParse",
|
|
751
690
|
value: function getStatsAndParse() {
|
|
752
|
-
var
|
|
753
|
-
if (!this.
|
|
691
|
+
var _this8 = this;
|
|
692
|
+
if (!this.mediaConnection) {
|
|
754
693
|
return _promise.default.resolve();
|
|
755
694
|
}
|
|
756
|
-
if (this.
|
|
757
|
-
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse -->
|
|
695
|
+
if (this.mediaConnection && this.mediaConnection.getConnectionState() === _internalMediaCore.ConnectionState.Failed) {
|
|
696
|
+
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> media connection is in failed state');
|
|
758
697
|
return _promise.default.resolve();
|
|
759
698
|
}
|
|
760
699
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Collecting Stats');
|
|
761
|
-
return
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
700
|
+
return this.mediaConnection.getTransceiverStats().then(function (transceiverStats) {
|
|
701
|
+
transceiverStats.video.receivers.forEach(function (receiver, i) {
|
|
702
|
+
return _this8.filterAndParseGetStatsResults(receiver, "video-recv-".concat(i), false);
|
|
703
|
+
});
|
|
704
|
+
transceiverStats.audio.receivers.forEach(function (receiver, i) {
|
|
705
|
+
return _this8.filterAndParseGetStatsResults(receiver, "audio-recv-".concat(i), false);
|
|
706
|
+
});
|
|
707
|
+
transceiverStats.screenShareVideo.receivers.forEach(function (receiver, i) {
|
|
708
|
+
return _this8.filterAndParseGetStatsResults(receiver, "video-share-recv-".concat(i), false);
|
|
709
|
+
});
|
|
710
|
+
transceiverStats.screenShareAudio.receivers.forEach(function (receiver, i) {
|
|
711
|
+
return _this8.filterAndParseGetStatsResults(receiver, "audio-share-recv-".concat(i), false);
|
|
712
|
+
});
|
|
713
|
+
transceiverStats.video.senders.forEach(function (sender, i) {
|
|
714
|
+
if (i > 0) {
|
|
715
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
716
|
+
}
|
|
717
|
+
_this8.filterAndParseGetStatsResults(sender, 'video-send', true);
|
|
718
|
+
});
|
|
719
|
+
transceiverStats.audio.senders.forEach(function (sender, i) {
|
|
720
|
+
if (i > 0) {
|
|
721
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
722
|
+
}
|
|
723
|
+
_this8.filterAndParseGetStatsResults(sender, 'audio-send', true);
|
|
724
|
+
});
|
|
725
|
+
transceiverStats.screenShareVideo.senders.forEach(function (sender, i) {
|
|
726
|
+
if (i > 0) {
|
|
727
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
728
|
+
}
|
|
729
|
+
_this8.filterAndParseGetStatsResults(sender, 'video-share-send', true);
|
|
730
|
+
});
|
|
731
|
+
transceiverStats.screenShareAudio.senders.forEach(function (sender, i) {
|
|
732
|
+
if (i > 0) {
|
|
733
|
+
throw new Error('Stats Analyzer does not support multiple senders.');
|
|
734
|
+
}
|
|
735
|
+
_this8.filterAndParseGetStatsResults(sender, 'audio-share-send', true);
|
|
736
|
+
});
|
|
737
|
+
_this8.compareLastStatsResult();
|
|
782
738
|
|
|
783
739
|
// Save the last results to compare with the current
|
|
784
|
-
|
|
740
|
+
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
741
|
+
_this8.lastStatsResults = JSON.parse((0, _stringify.default)(_this8.statsResults));
|
|
785
742
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Finished Collecting Stats');
|
|
786
743
|
});
|
|
787
744
|
}
|
|
@@ -790,17 +747,21 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
790
747
|
* Processes OutboundRTP stats result and stores
|
|
791
748
|
* @private
|
|
792
749
|
* @param {*} result
|
|
793
|
-
* @param {*}
|
|
750
|
+
* @param {*} mediaType
|
|
794
751
|
* @returns {void}
|
|
795
752
|
*/
|
|
796
753
|
}, {
|
|
797
754
|
key: "processOutboundRTPResult",
|
|
798
|
-
value: function processOutboundRTPResult(result,
|
|
799
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
755
|
+
value: function processOutboundRTPResult(result, mediaType) {
|
|
800
756
|
var sendrecvType = _constants.STATS.SEND_DIRECTION;
|
|
801
|
-
this.processTrackResult(result, type, sendrecvType);
|
|
802
757
|
if (result.bytesSent) {
|
|
803
758
|
var kilobytes = 0;
|
|
759
|
+
if (result.frameWidth && result.frameHeight) {
|
|
760
|
+
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
761
|
+
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
762
|
+
this.statsResults.resolutions[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
763
|
+
this.statsResults.resolutions[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
764
|
+
}
|
|
804
765
|
if (!this.statsResults.internal[mediaType][sendrecvType].prevBytesSent) {
|
|
805
766
|
this.statsResults.internal[mediaType][sendrecvType].prevBytesSent = result.bytesSent;
|
|
806
767
|
}
|
|
@@ -847,17 +808,22 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
847
808
|
* Processes InboundRTP stats result and stores
|
|
848
809
|
* @private
|
|
849
810
|
* @param {*} result
|
|
850
|
-
* @param {*}
|
|
811
|
+
* @param {*} mediaType
|
|
851
812
|
* @returns {void}
|
|
852
813
|
*/
|
|
853
814
|
}, {
|
|
854
815
|
key: "processInboundRTPResult",
|
|
855
|
-
value: function processInboundRTPResult(result,
|
|
856
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
816
|
+
value: function processInboundRTPResult(result, mediaType) {
|
|
857
817
|
var sendrecvType = _constants.STATS.RECEIVE_DIRECTION;
|
|
858
|
-
this.processTrackResult(result, type, sendrecvType);
|
|
859
818
|
if (result.bytesReceived) {
|
|
860
819
|
var kilobytes = 0;
|
|
820
|
+
var receiveSlot = this.receiveSlotCallback(result.ssrc);
|
|
821
|
+
var idAndCsi = receiveSlot ? "id: \"".concat(receiveSlot.id || '', "\"").concat(receiveSlot.csi ? " and csi: ".concat(receiveSlot.csi) : '') : '';
|
|
822
|
+
if (result.frameWidth && result.frameHeight) {
|
|
823
|
+
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
824
|
+
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
825
|
+
this.statsResults.resolutions[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
826
|
+
}
|
|
861
827
|
if (!this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived) {
|
|
862
828
|
this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived = result.bytesReceived;
|
|
863
829
|
}
|
|
@@ -886,13 +852,15 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
886
852
|
this.statsResults[mediaType][sendrecvType].packetsReceived = result.packetsReceived - this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived;
|
|
887
853
|
this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived = result.packetsReceived;
|
|
888
854
|
if (this.statsResults[mediaType][sendrecvType].packetsReceived === 0) {
|
|
889
|
-
|
|
855
|
+
if (receiveSlot) {
|
|
856
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#processInboundRTPResult --> No packets received for receive slot ".concat(idAndCsi), this.statsResults[mediaType][sendrecvType].packetsReceived);
|
|
857
|
+
}
|
|
890
858
|
}
|
|
891
859
|
|
|
892
860
|
// Check the over all packet Lost ratio
|
|
893
861
|
this.statsResults[mediaType][sendrecvType].currentPacketLossRatio = this.statsResults[mediaType][sendrecvType].currentPacketsLost > 0 ? this.statsResults[mediaType][sendrecvType].currentPacketsLost / (this.statsResults[mediaType][sendrecvType].packetsReceived + this.statsResults[mediaType][sendrecvType].currentPacketsLost) : 0;
|
|
894
862
|
if (this.statsResults[mediaType][sendrecvType].currentPacketLossRatio > 3) {
|
|
895
|
-
_loggerProxy.default.logger.info(
|
|
863
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#processInboundRTPResult --> Packets getting lost from the receiver with slot ".concat(idAndCsi), this.statsResults[mediaType][sendrecvType].currentPacketLossRatio);
|
|
896
864
|
}
|
|
897
865
|
|
|
898
866
|
// TODO: check the packet loss value is negative values here
|
|
@@ -935,30 +903,20 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
935
903
|
* @private
|
|
936
904
|
* @param {*} result
|
|
937
905
|
* @param {*} mediaType
|
|
938
|
-
* @param {*} sendrecvType
|
|
939
906
|
* @returns {void}
|
|
940
907
|
* @memberof StatsAnalyzer
|
|
941
908
|
*/
|
|
942
|
-
function processTrackResult(result, mediaType
|
|
943
|
-
if (!result ||
|
|
909
|
+
function processTrackResult(result, mediaType) {
|
|
910
|
+
if (!result || result.type !== 'track') {
|
|
944
911
|
return;
|
|
945
912
|
}
|
|
946
|
-
|
|
947
|
-
return;
|
|
948
|
-
}
|
|
949
|
-
if (result.frameWidth && result.frameHeight) {
|
|
950
|
-
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
951
|
-
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
952
|
-
}
|
|
913
|
+
var sendrecvType = result.remoteSource === true ? _constants.STATS.RECEIVE_DIRECTION : _constants.STATS.SEND_DIRECTION;
|
|
953
914
|
if (sendrecvType === _constants.STATS.RECEIVE_DIRECTION) {
|
|
954
915
|
this.statsResults.resolutions[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
955
916
|
this.statsResults.resolutions[mediaType][sendrecvType].framesDecoded = result.framesDecoded;
|
|
956
917
|
this.statsResults.resolutions[mediaType][sendrecvType].framesDropped = result.framesDropped;
|
|
957
|
-
} else if (sendrecvType === _constants.STATS.SEND_DIRECTION) {
|
|
958
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
959
|
-
this.statsResults.resolutions[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
960
918
|
}
|
|
961
|
-
if (result.trackIdentifier && mediaType
|
|
919
|
+
if (result.trackIdentifier && !mediaType.includes('audio')) {
|
|
962
920
|
this.statsResults.resolutions[mediaType][sendrecvType].trackIdentifier = result.trackIdentifier;
|
|
963
921
|
var jitterBufferDelay = result && result.jitterBufferDelay;
|
|
964
922
|
var jitterBufferEmittedCount = result && result.jitterBufferEmittedCount;
|
|
@@ -981,7 +939,8 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
981
939
|
}, {
|
|
982
940
|
key: "compareSentAndReceived",
|
|
983
941
|
value: function compareSentAndReceived(result, type) {
|
|
984
|
-
|
|
942
|
+
// Don't compare on transceivers without a sender.
|
|
943
|
+
if (!type || !this.statsResults.internal[type].send) {
|
|
985
944
|
return;
|
|
986
945
|
}
|
|
987
946
|
var mediaType = type;
|
|
@@ -1015,5 +974,4 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
1015
974
|
}]);
|
|
1016
975
|
return StatsAnalyzer;
|
|
1017
976
|
}(_eventsScope.default);
|
|
1018
|
-
exports.StatsAnalyzer = StatsAnalyzer;
|
|
1019
977
|
//# sourceMappingURL=index.js.map
|