@webex/plugin-meetings 2.59.8-next.2 → 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 +1 -2
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +1 -2
- 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 +9 -12
- package/dist/config.js.map +1 -1
- package/dist/constants.js +437 -433
- 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 +126 -37
- 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 +95 -6
- 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 +408 -67
- 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 +251 -78
- 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 +4579 -2951
- 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 +295 -197
- 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 +602 -432
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +1 -2
- 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 +23 -2
- 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 +172 -8
- 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 -7
- 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 +258 -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 -93
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +374 -374
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +100 -66
- 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 +27 -18
- 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 +7 -9
- package/src/constants.ts +263 -89
- 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 +3801 -2457
- 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 -4
- 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 -240
- 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 -92
- package/src/statsAnalyzer/index.ts +429 -447
- 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 +7420 -3125
- 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 -77
- 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 +205 -50
- 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/meeting/effectsState.js +0 -260
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -289
- package/dist/metrics/config.js.map +0 -1
- package/dist/peer-connection-manager/index.js +0 -671
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -110
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/roap/collection.js +0 -63
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -279
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/state.js +0 -127
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/util.js +0 -76
- package/dist/roap/util.js.map +0 -1
- 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"));
|
|
@@ -17,22 +18,36 @@ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime
|
|
|
17
18
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
|
18
19
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
19
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
32
|
LOCAL_MEDIA_STARTED: 'LOCAL_MEDIA_STARTED',
|
|
31
33
|
LOCAL_MEDIA_STOPPED: 'LOCAL_MEDIA_STOPPED',
|
|
32
34
|
REMOTE_MEDIA_STARTED: 'REMOTE_MEDIA_STARTED',
|
|
33
35
|
REMOTE_MEDIA_STOPPED: 'REMOTE_MEDIA_STOPPED'
|
|
34
36
|
};
|
|
35
|
-
|
|
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
|
+
};
|
|
36
51
|
/**
|
|
37
52
|
* Stats Analyzer class that will emit events based on detected quality
|
|
38
53
|
*
|
|
@@ -40,8 +55,7 @@ var EVENTS = {
|
|
|
40
55
|
* @class StatsAnalyzer
|
|
41
56
|
* @extends {EventsScope}
|
|
42
57
|
*/
|
|
43
|
-
exports.
|
|
44
|
-
var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
58
|
+
var StatsAnalyzer = exports.StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
45
59
|
(0, _inherits2.default)(StatsAnalyzer, _EventsScope);
|
|
46
60
|
var _super = _createSuper(StatsAnalyzer);
|
|
47
61
|
/**
|
|
@@ -49,13 +63,17 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
49
63
|
* @constructor
|
|
50
64
|
* @public
|
|
51
65
|
* @param {Object} config SDK Configuration Object
|
|
66
|
+
* @param {Function} receiveSlotCallback Callback used to access receive slots.
|
|
52
67
|
* @param {Object} networkQualityMonitor class for assessing network characteristics (jitter, packetLoss, latency)
|
|
53
68
|
* @param {Object} statsResults Default properties for stats
|
|
54
69
|
*/
|
|
55
70
|
function StatsAnalyzer(config) {
|
|
56
71
|
var _this;
|
|
57
|
-
var
|
|
58
|
-
|
|
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;
|
|
59
77
|
(0, _classCallCheck2.default)(this, StatsAnalyzer);
|
|
60
78
|
_this = _super.call(this);
|
|
61
79
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "config", void 0);
|
|
@@ -63,15 +81,16 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
63
81
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastEmittedStartStopEvent", void 0);
|
|
64
82
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastMqaDataSent", void 0);
|
|
65
83
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "lastStatsResults", void 0);
|
|
66
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "localMQEStats", void 0);
|
|
67
84
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "meetingMediaStatus", void 0);
|
|
68
85
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mqaInterval", void 0);
|
|
69
86
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mqaSentCount", void 0);
|
|
70
87
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "networkQualityMonitor", void 0);
|
|
71
|
-
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "
|
|
88
|
+
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "mediaConnection", void 0);
|
|
72
89
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsInterval", void 0);
|
|
73
90
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "statsResults", void 0);
|
|
74
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);
|
|
75
94
|
/**
|
|
76
95
|
* emits started/stopped events for local/remote media by checking
|
|
77
96
|
* if given values are increasing or not. The previousValue, currentValue
|
|
@@ -95,6 +114,9 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
95
114
|
if (previousValue === undefined) previousValue = 0;
|
|
96
115
|
// eslint-disable-next-line no-param-reassign
|
|
97
116
|
if (currentValue === undefined) currentValue = 0;
|
|
117
|
+
if (!_this.lastEmittedStartStopEvent[mediaType]) {
|
|
118
|
+
_this.lastEmittedStartStopEvent[mediaType] = {};
|
|
119
|
+
}
|
|
98
120
|
var lastEmittedEvent = isLocal ? _this.lastEmittedStartStopEvent[mediaType].local : _this.lastEmittedStartStopEvent[mediaType].remote;
|
|
99
121
|
var newEvent;
|
|
100
122
|
if (currentValue - previousValue > 0) {
|
|
@@ -127,56 +149,39 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
127
149
|
* @returns {void}
|
|
128
150
|
*/
|
|
129
151
|
(0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "parseCandidate", function (result, type, isSender, isRemote) {
|
|
152
|
+
var _this$successfulCandi;
|
|
130
153
|
if (!result || !result.id) {
|
|
131
154
|
return;
|
|
132
155
|
}
|
|
133
|
-
var RemoteCandidateType = {};
|
|
134
|
-
var RemoteTransport = {};
|
|
135
|
-
var RemoteIpAddress = {};
|
|
136
|
-
var RemoteNetworkType = {};
|
|
137
|
-
if (!result.id) return;
|
|
138
|
-
var sendRecvType = isSender ? _constants.STATS.SEND_DIRECTION : _constants.STATS.RECEIVE_DIRECTION;
|
|
139
|
-
var ipType = isRemote ? _constants.STATS.REMOTE : _constants.STATS.LOCAL;
|
|
140
|
-
if (!RemoteCandidateType[result.id]) {
|
|
141
|
-
RemoteCandidateType[result.id] = [];
|
|
142
|
-
}
|
|
143
|
-
if (!RemoteTransport[result.id]) {
|
|
144
|
-
RemoteTransport[result.id] = [];
|
|
145
|
-
}
|
|
146
|
-
if (!RemoteIpAddress[result.id]) {
|
|
147
|
-
RemoteIpAddress[result.id] = [];
|
|
148
|
-
}
|
|
149
|
-
if (!RemoteNetworkType[result.id]) {
|
|
150
|
-
RemoteNetworkType[result.id] = [];
|
|
151
|
-
}
|
|
152
|
-
if (result.candidateType && RemoteCandidateType[result.id].indexOf(result.candidateType) === -1) {
|
|
153
|
-
RemoteCandidateType[result.id].push(result.candidateType);
|
|
154
|
-
}
|
|
155
|
-
if (result.protocol && RemoteTransport[result.id].indexOf(result.protocol) === -1) {
|
|
156
|
-
RemoteTransport[result.id].push(result.protocol.toUpperCase());
|
|
157
|
-
}
|
|
158
|
-
if (result.ip && RemoteIpAddress[result.id].indexOf("".concat(result.ip, ":").concat(result.portNumber)) === -1) {
|
|
159
|
-
RemoteIpAddress[result.id].push("".concat(result.ip)); // TODO: Add ports
|
|
160
|
-
}
|
|
161
156
|
|
|
162
|
-
|
|
163
|
-
|
|
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();
|
|
164
166
|
}
|
|
167
|
+
var sendRecvType = isSender ? _constants.STATS.SEND_DIRECTION : _constants.STATS.RECEIVE_DIRECTION;
|
|
168
|
+
var ipType = isRemote ? _constants.STATS.REMOTE : _constants.STATS.LOCAL;
|
|
165
169
|
_this.statsResults.internal.candidates[result.id] = {
|
|
166
|
-
candidateType:
|
|
167
|
-
ipAddress:
|
|
170
|
+
candidateType: result.candidateType,
|
|
171
|
+
ipAddress: result.ip,
|
|
172
|
+
// TODO: add ports
|
|
168
173
|
portNumber: result.port,
|
|
169
|
-
networkType:
|
|
174
|
+
networkType: result.networkType,
|
|
170
175
|
priority: result.priority,
|
|
171
|
-
transport:
|
|
176
|
+
transport: transport,
|
|
172
177
|
timestamp: result.time,
|
|
173
178
|
id: result.id,
|
|
174
179
|
type: result.type
|
|
175
180
|
};
|
|
176
|
-
_this.statsResults.connectionType[ipType].candidateType =
|
|
177
|
-
_this.statsResults.connectionType[ipType].ipAddress =
|
|
178
|
-
_this.statsResults.connectionType[ipType].networkType =
|
|
179
|
-
_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;
|
|
180
185
|
_this.statsResults[type][sendRecvType].totalRoundTripTime = result.totalRoundTripTime;
|
|
181
186
|
});
|
|
182
187
|
_this.statsStarted = false;
|
|
@@ -186,141 +191,33 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
186
191
|
_this.networkQualityMonitor = networkQualityMonitor;
|
|
187
192
|
_this.correlationId = config.correlationId;
|
|
188
193
|
_this.mqaSentCount = -1;
|
|
189
|
-
_this.lastMqaDataSent = {
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
recv: {}
|
|
194
|
-
},
|
|
195
|
-
audio: {
|
|
196
|
-
send: {},
|
|
197
|
-
recv: {}
|
|
198
|
-
},
|
|
199
|
-
share: {
|
|
200
|
-
send: {},
|
|
201
|
-
recv: {}
|
|
202
|
-
}
|
|
203
|
-
},
|
|
204
|
-
video: {
|
|
205
|
-
send: {},
|
|
206
|
-
recv: {}
|
|
207
|
-
},
|
|
208
|
-
audio: {
|
|
209
|
-
send: {},
|
|
210
|
-
recv: {}
|
|
211
|
-
},
|
|
212
|
-
share: {
|
|
213
|
-
send: {},
|
|
214
|
-
recv: {}
|
|
215
|
-
}
|
|
216
|
-
};
|
|
217
|
-
_this.localMQEStats = {
|
|
218
|
-
audio: {
|
|
219
|
-
RX: {
|
|
220
|
-
packetsLost: [],
|
|
221
|
-
jitter: [],
|
|
222
|
-
latency: [],
|
|
223
|
-
bitRate: []
|
|
224
|
-
},
|
|
225
|
-
TX: {
|
|
226
|
-
packetsLost: [],
|
|
227
|
-
jitter: [],
|
|
228
|
-
latency: [],
|
|
229
|
-
bitRate: []
|
|
230
|
-
}
|
|
231
|
-
},
|
|
232
|
-
video: {
|
|
233
|
-
RX: {
|
|
234
|
-
packetsLost: [],
|
|
235
|
-
jitter: [],
|
|
236
|
-
latency: [],
|
|
237
|
-
bitRate: [],
|
|
238
|
-
frameRate: [],
|
|
239
|
-
resolutionWidth: [],
|
|
240
|
-
resolutionHeight: [],
|
|
241
|
-
requestedKeyFrame: [],
|
|
242
|
-
receivedKeyFrame: []
|
|
243
|
-
},
|
|
244
|
-
TX: {
|
|
245
|
-
packetsLost: [],
|
|
246
|
-
jitter: [],
|
|
247
|
-
latency: [],
|
|
248
|
-
bitRate: [],
|
|
249
|
-
frameRate: [],
|
|
250
|
-
resolutionWidth: [],
|
|
251
|
-
resolutionHeight: [],
|
|
252
|
-
requestedKeyFrame: [],
|
|
253
|
-
receivedKeyFrame: []
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
};
|
|
257
|
-
_this.lastEmittedStartStopEvent = {
|
|
258
|
-
audio: {
|
|
259
|
-
local: undefined,
|
|
260
|
-
remote: undefined
|
|
261
|
-
},
|
|
262
|
-
video: {
|
|
263
|
-
local: undefined,
|
|
264
|
-
remote: undefined
|
|
265
|
-
},
|
|
266
|
-
share: {
|
|
267
|
-
local: undefined,
|
|
268
|
-
remote: undefined
|
|
269
|
-
}
|
|
270
|
-
};
|
|
194
|
+
_this.lastMqaDataSent = {};
|
|
195
|
+
_this.lastEmittedStartStopEvent = {};
|
|
196
|
+
_this.receiveSlotCallback = receiveSlotCallback;
|
|
197
|
+
_this.successfulCandidatePair = {};
|
|
271
198
|
return _this;
|
|
272
199
|
}
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* Resets cumulative stats arrays.
|
|
203
|
+
*
|
|
204
|
+
* @public
|
|
205
|
+
* @memberof StatsAnalyzer
|
|
206
|
+
* @returns {void}
|
|
207
|
+
*/
|
|
273
208
|
(0, _createClass2.default)(StatsAnalyzer, [{
|
|
274
|
-
key: "populateResults",
|
|
275
|
-
value: function populateResults(lastMqa) {
|
|
276
|
-
// Audio
|
|
277
|
-
|
|
278
|
-
this.localMQEStats.audio.RX.packetsLost.push(lastMqa.audioReceive[0].common.mediaHopByHopLost);
|
|
279
|
-
this.localMQEStats.audio.RX.jitter.push(lastMqa.audioReceive[0].streams[0].common.rtpJitter);
|
|
280
|
-
this.localMQEStats.audio.RX.latency.push(lastMqa.audioReceive[0].common.roundTripTime);
|
|
281
|
-
this.localMQEStats.audio.RX.bitRate.push(lastMqa.audioReceive[0].streams[0].common.receivedBitrate);
|
|
282
|
-
this.localMQEStats.audio.TX.packetsLost.push(lastMqa.audioTransmit[0].common.remoteLossRate);
|
|
283
|
-
this.localMQEStats.audio.TX.jitter.push(lastMqa.audioTransmit[0].common.remoteJitter);
|
|
284
|
-
this.localMQEStats.audio.TX.latency.push(lastMqa.audioTransmit[0].common.roundTripTime);
|
|
285
|
-
this.localMQEStats.audio.TX.bitRate.push(lastMqa.audioTransmit[0].streams[0].common.transmittedBitrate);
|
|
286
|
-
|
|
287
|
-
// Video
|
|
288
|
-
|
|
289
|
-
this.localMQEStats.video.RX.packetsLost.push(lastMqa.videoReceive[0].common.mediaHopByHopLost);
|
|
290
|
-
this.localMQEStats.video.RX.jitter.push(lastMqa.videoReceive[0].streams[0].common.rtpJitter);
|
|
291
|
-
this.localMQEStats.video.RX.latency.push(lastMqa.videoReceive[0].streams[0].common.roundTripTime);
|
|
292
|
-
this.localMQEStats.video.RX.bitRate.push(lastMqa.videoReceive[0].streams[0].common.receivedBitrate);
|
|
293
|
-
this.localMQEStats.video.RX.frameRate.push(lastMqa.videoReceive[0].streams[0].common.receivedFrameRate);
|
|
294
|
-
this.localMQEStats.video.RX.resolutionWidth.push(lastMqa.videoReceive[0].streams[0].receivedWidth);
|
|
295
|
-
this.localMQEStats.video.RX.resolutionHeight.push(lastMqa.videoReceive[0].streams[0].receivedHeight);
|
|
296
|
-
this.localMQEStats.video.RX.requestedKeyFrame.push();
|
|
297
|
-
this.localMQEStats.video.RX.receivedKeyFrame.push();
|
|
298
|
-
this.localMQEStats.video.TX.packetsLost.push(lastMqa.videoTransmit[0].common.remoteLossRate);
|
|
299
|
-
this.localMQEStats.video.TX.jitter.push(lastMqa.videoTransmit[0].common.remoteJitter);
|
|
300
|
-
this.localMQEStats.video.TX.latency.push(lastMqa.videoTransmit[0].common.roundTripTime);
|
|
301
|
-
this.localMQEStats.video.TX.bitRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedBitrate);
|
|
302
|
-
this.localMQEStats.video.TX.frameRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedFrameRate);
|
|
303
|
-
this.localMQEStats.video.TX.resolutionWidth.push(lastMqa.videoTransmit[0].streams[0].transmittedWidth);
|
|
304
|
-
this.localMQEStats.video.TX.resolutionHeight.push(lastMqa.videoTransmit[0].streams[0].transmittedHeight);
|
|
305
|
-
this.localMQEStats.video.TX.requestedKeyFrame.push(lastMqa.videoTransmit[0].streams[0].requestedKeyFrames);
|
|
306
|
-
this.localMQEStats.video.TX.receivedKeyFrame.push();
|
|
307
|
-
}
|
|
308
|
-
}, {
|
|
309
209
|
key: "resetStatsResults",
|
|
310
210
|
value: function resetStatsResults() {
|
|
311
|
-
|
|
312
|
-
this.statsResults.
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
this.statsResults.audio.send.meanRoundTripTime = [];
|
|
322
|
-
this.statsResults.video.send.meanRoundTripTime = [];
|
|
323
|
-
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
|
+
});
|
|
324
221
|
}
|
|
325
222
|
|
|
326
223
|
/**
|
|
@@ -338,7 +235,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
338
235
|
}
|
|
339
236
|
|
|
340
237
|
/**
|
|
341
|
-
* captures MQA data from
|
|
238
|
+
* captures MQA data from media connection
|
|
342
239
|
*
|
|
343
240
|
* @public
|
|
344
241
|
* @memberof StatsAnalyzer
|
|
@@ -347,96 +244,92 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
347
244
|
}, {
|
|
348
245
|
key: "sendMqaData",
|
|
349
246
|
value: function sendMqaData() {
|
|
350
|
-
var
|
|
351
|
-
var
|
|
352
|
-
|
|
353
|
-
|
|
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
|
-
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
|
+
}
|
|
391
287
|
});
|
|
392
|
-
|
|
288
|
+
newMqa.intervalMetadata.peerReflexiveIP = this.statsResults.connectionType.local.ipAddress;
|
|
393
289
|
|
|
394
290
|
// Adding peripheral information
|
|
395
|
-
|
|
396
|
-
_config.default.intervals[0].intervalMetadata.peripherals.push({
|
|
291
|
+
newMqa.intervalMetadata.peripherals.push({
|
|
397
292
|
information: _constants._UNKNOWN_,
|
|
398
293
|
name: _constants.MEDIA_DEVICES.SPEAKER
|
|
399
294
|
});
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
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;
|
|
411
308
|
this.mqaSentCount += 1;
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
415
|
-
this.lastMqaDataSent = (0, _lodash.cloneDeep)(this.statsResults);
|
|
416
|
-
this.populateResults(_config.default.intervals[0]);
|
|
309
|
+
newMqa.intervalNumber = this.mqaSentCount;
|
|
417
310
|
this.resetStatsResults();
|
|
418
311
|
this.emit({
|
|
419
312
|
file: 'statsAnalyzer',
|
|
420
313
|
function: 'sendMqaData'
|
|
421
314
|
}, EVENTS.MEDIA_QUALITY, {
|
|
422
|
-
data:
|
|
315
|
+
data: newMqa,
|
|
423
316
|
// @ts-ignore
|
|
424
|
-
networkType:
|
|
317
|
+
networkType: newMqa.networkType
|
|
425
318
|
});
|
|
426
319
|
}
|
|
427
320
|
|
|
428
321
|
/**
|
|
429
|
-
* updated the
|
|
322
|
+
* updated the media connection when changed
|
|
430
323
|
*
|
|
431
324
|
* @private
|
|
432
|
-
* @memberof
|
|
433
|
-
* @param {
|
|
325
|
+
* @memberof StatsAnalyzer
|
|
326
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
434
327
|
* @returns {void}
|
|
435
328
|
*/
|
|
436
329
|
}, {
|
|
437
|
-
key: "
|
|
438
|
-
value: function
|
|
439
|
-
this.
|
|
330
|
+
key: "updateMediaConnection",
|
|
331
|
+
value: function updateMediaConnection(mediaConnection) {
|
|
332
|
+
this.mediaConnection = mediaConnection;
|
|
440
333
|
}
|
|
441
334
|
|
|
442
335
|
/**
|
|
@@ -444,24 +337,24 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
444
337
|
*
|
|
445
338
|
* @public
|
|
446
339
|
* @memberof StatsAnalyzer
|
|
447
|
-
* @param {
|
|
340
|
+
* @param {RoapMediaConnection} mediaConnection
|
|
448
341
|
* @returns {Promise}
|
|
449
342
|
*/
|
|
450
343
|
}, {
|
|
451
344
|
key: "startAnalyzer",
|
|
452
|
-
value: function startAnalyzer(
|
|
453
|
-
var
|
|
345
|
+
value: function startAnalyzer(mediaConnection) {
|
|
346
|
+
var _this4 = this;
|
|
454
347
|
if (!this.statsStarted) {
|
|
455
348
|
this.statsStarted = true;
|
|
456
|
-
this.
|
|
349
|
+
this.mediaConnection = mediaConnection;
|
|
457
350
|
return this.getStatsAndParse().then(function () {
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
},
|
|
351
|
+
_this4.statsInterval = setInterval(function () {
|
|
352
|
+
_this4.getStatsAndParse();
|
|
353
|
+
}, _this4.config.analyzerInterval);
|
|
461
354
|
// Trigger initial fetch
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
355
|
+
_this4.sendMqaData();
|
|
356
|
+
_this4.mqaInterval = setInterval(function () {
|
|
357
|
+
_this4.sendMqaData();
|
|
465
358
|
}, _constants.MQA_INTEVAL);
|
|
466
359
|
});
|
|
467
360
|
}
|
|
@@ -478,7 +371,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
478
371
|
}, {
|
|
479
372
|
key: "stopAnalyzer",
|
|
480
373
|
value: function stopAnalyzer() {
|
|
481
|
-
var
|
|
374
|
+
var _this5 = this;
|
|
482
375
|
var sendOneLastMqa = this.mqaInterval && this.statsInterval;
|
|
483
376
|
if (this.statsInterval) {
|
|
484
377
|
clearInterval(this.statsInterval);
|
|
@@ -490,8 +383,8 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
490
383
|
}
|
|
491
384
|
if (sendOneLastMqa) {
|
|
492
385
|
return this.getStatsAndParse().then(function () {
|
|
493
|
-
|
|
494
|
-
|
|
386
|
+
_this5.sendMqaData();
|
|
387
|
+
_this5.mediaConnection = null;
|
|
495
388
|
});
|
|
496
389
|
}
|
|
497
390
|
return _promise.default.resolve();
|
|
@@ -513,6 +406,32 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
513
406
|
if (!getStatsResult) {
|
|
514
407
|
return;
|
|
515
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
|
+
}
|
|
516
435
|
switch (getStatsResult.type) {
|
|
517
436
|
case 'outbound-rtp':
|
|
518
437
|
this.processOutboundRTPResult(getStatsResult, type);
|
|
@@ -547,21 +466,35 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
547
466
|
/**
|
|
548
467
|
* Filters the get stats results for types
|
|
549
468
|
* @private
|
|
550
|
-
* @param {Array}
|
|
469
|
+
* @param {Array} statsItem
|
|
551
470
|
* @param {String} type
|
|
552
471
|
* @param {boolean} isSender
|
|
553
472
|
* @returns {void}
|
|
554
473
|
*/
|
|
555
474
|
}, {
|
|
556
475
|
key: "filterAndParseGetStatsResults",
|
|
557
|
-
value: function filterAndParseGetStatsResults(
|
|
558
|
-
var
|
|
476
|
+
value: function filterAndParseGetStatsResults(statsItem, type, isSender) {
|
|
477
|
+
var _this6 = this;
|
|
559
478
|
var types = _constants.DEFAULT_GET_STATS_FILTER.types;
|
|
560
|
-
|
|
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) {
|
|
561
487
|
if (types.includes(result.type)) {
|
|
562
|
-
|
|
488
|
+
_this6.parseGetStatsResult(result, type, isSender);
|
|
563
489
|
}
|
|
564
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
|
+
}
|
|
565
498
|
}
|
|
566
499
|
|
|
567
500
|
/**
|
|
@@ -576,7 +509,7 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
576
509
|
if (!result) {
|
|
577
510
|
return;
|
|
578
511
|
}
|
|
579
|
-
if (type
|
|
512
|
+
if (type.includes('audio-send')) {
|
|
580
513
|
this.statsResults[type].send.audioLevel = result.audioLevel;
|
|
581
514
|
this.statsResults[type].send.totalAudioEnergy = result.totalAudioEnergy;
|
|
582
515
|
}
|
|
@@ -592,106 +525,149 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
592
525
|
* @returns {void}
|
|
593
526
|
*/
|
|
594
527
|
function compareLastStatsResult() {
|
|
528
|
+
var _this7 = this;
|
|
595
529
|
if (this.lastStatsResults !== null && this.meetingMediaStatus) {
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
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;
|
|
603
567
|
if (currentStats.totalPacketsSent === previousStats.totalPacketsSent || currentStats.totalPacketsSent === 0) {
|
|
604
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
568
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio RTP packets sent", currentStats.totalPacketsSent);
|
|
605
569
|
} else {
|
|
606
570
|
if (currentStats.totalAudioEnergy === previousStats.totalAudioEnergy || currentStats.totalAudioEnergy === 0) {
|
|
607
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
571
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No audio Energy present", currentStats.totalAudioEnergy);
|
|
608
572
|
}
|
|
609
573
|
if (currentStats.audioLevel === 0) {
|
|
610
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult -->
|
|
574
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> audio level is 0 for the user");
|
|
611
575
|
}
|
|
612
576
|
}
|
|
613
|
-
this.emitStartStopEvents(
|
|
577
|
+
this.emitStartStopEvents('audio', previousStats.totalPacketsSent, currentStats.totalPacketsSent, true);
|
|
614
578
|
}
|
|
615
579
|
if (this.meetingMediaStatus.expected.receiveAudio) {
|
|
616
580
|
// compare audio stats received
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
_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);
|
|
623
589
|
}
|
|
624
|
-
this.emitStartStopEvents(
|
|
590
|
+
this.emitStartStopEvents('audio', previousPacketsReceived, currentPacketsReceived, false);
|
|
625
591
|
}
|
|
626
|
-
|
|
627
|
-
if (this.meetingMediaStatus.expected.sendVideo) {
|
|
592
|
+
if (this.meetingMediaStatus.expected.sendVideo && this.lastStatsResults['video-send']) {
|
|
628
593
|
// compare video stats sent
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
if (
|
|
632
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
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);
|
|
633
598
|
} else {
|
|
634
|
-
if (
|
|
635
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
599
|
+
if (_currentStats.framesEncoded === _previousStats.framesEncoded || _currentStats.framesEncoded === 0) {
|
|
600
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No video Frames Encoded", _currentStats.framesEncoded);
|
|
636
601
|
}
|
|
637
|
-
if (this.statsResults.resolutions[
|
|
638
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
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);
|
|
639
604
|
}
|
|
640
605
|
}
|
|
641
|
-
this.emitStartStopEvents(
|
|
606
|
+
this.emitStartStopEvents('video', _previousStats.framesSent, _currentStats.framesSent, true);
|
|
642
607
|
}
|
|
643
608
|
if (this.meetingMediaStatus.expected.receiveVideo) {
|
|
644
|
-
// compare video stats
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
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);
|
|
650
620
|
} else {
|
|
651
|
-
if (
|
|
652
|
-
_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);
|
|
653
623
|
}
|
|
654
|
-
if (
|
|
655
|
-
_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);
|
|
656
626
|
}
|
|
657
|
-
if (
|
|
658
|
-
_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);
|
|
659
629
|
}
|
|
660
630
|
}
|
|
661
|
-
this.emitStartStopEvents(
|
|
631
|
+
this.emitStartStopEvents('video', previousFramesDecoded, currentFramesDecoded, false);
|
|
662
632
|
}
|
|
663
|
-
|
|
664
|
-
if (this.meetingMediaStatus.expected.sendShare) {
|
|
633
|
+
if (this.meetingMediaStatus.expected.sendShare && this.lastStatsResults['video-share-send']) {
|
|
665
634
|
// compare share stats sent
|
|
666
635
|
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
if (
|
|
670
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
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);
|
|
671
640
|
} else {
|
|
672
|
-
if (
|
|
673
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
641
|
+
if (_currentStats2.framesEncoded === _previousStats2.framesEncoded || _currentStats2.framesEncoded === 0) {
|
|
642
|
+
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No share frames getting encoded", _currentStats2.framesEncoded);
|
|
674
643
|
}
|
|
675
|
-
if (this.statsResults.resolutions[
|
|
676
|
-
_loggerProxy.default.logger.info("StatsAnalyzer:index#compareLastStatsResult --> No
|
|
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);
|
|
677
646
|
}
|
|
678
647
|
}
|
|
679
|
-
|
|
648
|
+
}
|
|
649
|
+
if (this.meetingMediaStatus.expected.sendShare) {
|
|
680
650
|
// TODO:need to check receive share value
|
|
681
|
-
// compare share stats
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
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);
|
|
686
662
|
} else {
|
|
687
|
-
if (
|
|
688
|
-
_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);
|
|
689
665
|
}
|
|
690
|
-
if (
|
|
691
|
-
_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);
|
|
692
668
|
}
|
|
693
|
-
if (
|
|
694
|
-
_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);
|
|
695
671
|
}
|
|
696
672
|
}
|
|
697
673
|
|
|
@@ -712,39 +688,57 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
712
688
|
}, {
|
|
713
689
|
key: "getStatsAndParse",
|
|
714
690
|
value: function getStatsAndParse() {
|
|
715
|
-
var
|
|
716
|
-
if (!this.
|
|
691
|
+
var _this8 = this;
|
|
692
|
+
if (!this.mediaConnection) {
|
|
717
693
|
return _promise.default.resolve();
|
|
718
694
|
}
|
|
719
|
-
if (this.
|
|
720
|
-
_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');
|
|
721
697
|
return _promise.default.resolve();
|
|
722
698
|
}
|
|
723
699
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Collecting Stats');
|
|
724
|
-
return
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
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();
|
|
745
738
|
|
|
746
739
|
// Save the last results to compare with the current
|
|
747
|
-
|
|
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));
|
|
748
742
|
_loggerProxy.default.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Finished Collecting Stats');
|
|
749
743
|
});
|
|
750
744
|
}
|
|
@@ -753,16 +747,21 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
753
747
|
* Processes OutboundRTP stats result and stores
|
|
754
748
|
* @private
|
|
755
749
|
* @param {*} result
|
|
756
|
-
* @param {*}
|
|
750
|
+
* @param {*} mediaType
|
|
757
751
|
* @returns {void}
|
|
758
752
|
*/
|
|
759
753
|
}, {
|
|
760
754
|
key: "processOutboundRTPResult",
|
|
761
|
-
value: function processOutboundRTPResult(result,
|
|
762
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
755
|
+
value: function processOutboundRTPResult(result, mediaType) {
|
|
763
756
|
var sendrecvType = _constants.STATS.SEND_DIRECTION;
|
|
764
757
|
if (result.bytesSent) {
|
|
765
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
|
+
}
|
|
766
765
|
if (!this.statsResults.internal[mediaType][sendrecvType].prevBytesSent) {
|
|
767
766
|
this.statsResults.internal[mediaType][sendrecvType].prevBytesSent = result.bytesSent;
|
|
768
767
|
}
|
|
@@ -809,16 +808,22 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
809
808
|
* Processes InboundRTP stats result and stores
|
|
810
809
|
* @private
|
|
811
810
|
* @param {*} result
|
|
812
|
-
* @param {*}
|
|
811
|
+
* @param {*} mediaType
|
|
813
812
|
* @returns {void}
|
|
814
813
|
*/
|
|
815
814
|
}, {
|
|
816
815
|
key: "processInboundRTPResult",
|
|
817
|
-
value: function processInboundRTPResult(result,
|
|
818
|
-
var mediaType = type || _constants.STATS.AUDIO_CORRELATE;
|
|
816
|
+
value: function processInboundRTPResult(result, mediaType) {
|
|
819
817
|
var sendrecvType = _constants.STATS.RECEIVE_DIRECTION;
|
|
820
818
|
if (result.bytesReceived) {
|
|
821
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
|
+
}
|
|
822
827
|
if (!this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived) {
|
|
823
828
|
this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived = result.bytesReceived;
|
|
824
829
|
}
|
|
@@ -847,13 +852,15 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
847
852
|
this.statsResults[mediaType][sendrecvType].packetsReceived = result.packetsReceived - this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived;
|
|
848
853
|
this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived = result.packetsReceived;
|
|
849
854
|
if (this.statsResults[mediaType][sendrecvType].packetsReceived === 0) {
|
|
850
|
-
|
|
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
|
+
}
|
|
851
858
|
}
|
|
852
859
|
|
|
853
860
|
// Check the over all packet Lost ratio
|
|
854
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;
|
|
855
862
|
if (this.statsResults[mediaType][sendrecvType].currentPacketLossRatio > 3) {
|
|
856
|
-
_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);
|
|
857
864
|
}
|
|
858
865
|
|
|
859
866
|
// TODO: check the packet loss value is negative values here
|
|
@@ -903,20 +910,13 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
903
910
|
if (!result || result.type !== 'track') {
|
|
904
911
|
return;
|
|
905
912
|
}
|
|
906
|
-
if (result.type !== 'track') return;
|
|
907
913
|
var sendrecvType = result.remoteSource === true ? _constants.STATS.RECEIVE_DIRECTION : _constants.STATS.SEND_DIRECTION;
|
|
908
|
-
if (result.frameWidth && result.frameHeight) {
|
|
909
|
-
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
910
|
-
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
911
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
912
|
-
this.statsResults.resolutions[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
913
|
-
}
|
|
914
914
|
if (sendrecvType === _constants.STATS.RECEIVE_DIRECTION) {
|
|
915
915
|
this.statsResults.resolutions[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
916
916
|
this.statsResults.resolutions[mediaType][sendrecvType].framesDecoded = result.framesDecoded;
|
|
917
917
|
this.statsResults.resolutions[mediaType][sendrecvType].framesDropped = result.framesDropped;
|
|
918
918
|
}
|
|
919
|
-
if (result.trackIdentifier && mediaType
|
|
919
|
+
if (result.trackIdentifier && !mediaType.includes('audio')) {
|
|
920
920
|
this.statsResults.resolutions[mediaType][sendrecvType].trackIdentifier = result.trackIdentifier;
|
|
921
921
|
var jitterBufferDelay = result && result.jitterBufferDelay;
|
|
922
922
|
var jitterBufferEmittedCount = result && result.jitterBufferEmittedCount;
|
|
@@ -939,7 +939,8 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
939
939
|
}, {
|
|
940
940
|
key: "compareSentAndReceived",
|
|
941
941
|
value: function compareSentAndReceived(result, type) {
|
|
942
|
-
|
|
942
|
+
// Don't compare on transceivers without a sender.
|
|
943
|
+
if (!type || !this.statsResults.internal[type].send) {
|
|
943
944
|
return;
|
|
944
945
|
}
|
|
945
946
|
var mediaType = type;
|
|
@@ -973,5 +974,4 @@ var StatsAnalyzer = /*#__PURE__*/function (_EventsScope) {
|
|
|
973
974
|
}]);
|
|
974
975
|
return StatsAnalyzer;
|
|
975
976
|
}(_eventsScope.default);
|
|
976
|
-
exports.StatsAnalyzer = StatsAnalyzer;
|
|
977
977
|
//# sourceMappingURL=index.js.map
|