@webex/plugin-meetings 3.0.0-beta.4 → 3.0.0-beta.400
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 +58 -8
- package/UPGRADING.md +9 -9
- package/browsers.js +19 -24
- package/dist/annotation/annotation.types.js +7 -0
- package/dist/annotation/annotation.types.js.map +1 -0
- package/dist/annotation/constants.js +49 -0
- package/dist/annotation/constants.js.map +1 -0
- package/dist/annotation/index.js +342 -0
- package/dist/annotation/index.js.map +1 -0
- package/dist/breakouts/breakout.js +216 -0
- package/dist/breakouts/breakout.js.map +1 -0
- package/dist/breakouts/collection.js +23 -0
- package/dist/breakouts/collection.js.map +1 -0
- package/dist/breakouts/edit-lock-error.js +52 -0
- package/dist/breakouts/edit-lock-error.js.map +1 -0
- package/dist/breakouts/events.js +45 -0
- package/dist/breakouts/events.js.map +1 -0
- package/dist/breakouts/index.js +1048 -0
- package/dist/breakouts/index.js.map +1 -0
- package/dist/breakouts/request.js +78 -0
- package/dist/breakouts/request.js.map +1 -0
- package/dist/breakouts/utils.js +67 -0
- package/dist/breakouts/utils.js.map +1 -0
- package/dist/common/browser-detection.js +1 -20
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +5 -20
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +0 -7
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +10 -24
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +11 -24
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +12 -25
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +10 -24
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/no-meeting-info.js +51 -0
- package/dist/common/errors/no-meeting-info.js.map +1 -0
- package/dist/common/errors/parameter.js +5 -33
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +10 -24
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +9 -23
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/reclaim-host-role-errors.js +158 -0
- package/dist/common/errors/reclaim-host-role-errors.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +0 -17
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +10 -24
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +10 -24
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.js +54 -48
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +5 -25
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +0 -22
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +0 -23
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +0 -12
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +0 -15
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +0 -4
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +1 -8
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.js +41 -60
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.js +28 -23
- package/dist/common/queue.js.map +1 -1
- package/dist/config.js +11 -15
- package/dist/config.js.map +1 -1
- package/dist/constants.js +347 -74
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +14 -0
- package/dist/controls-options-manager/constants.js.map +1 -0
- package/dist/controls-options-manager/enums.js +27 -0
- package/dist/controls-options-manager/enums.js.map +1 -0
- package/dist/controls-options-manager/index.js +297 -0
- package/dist/controls-options-manager/index.js.map +1 -0
- 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 +319 -0
- package/dist/controls-options-manager/util.js.map +1 -0
- package/dist/index.js +125 -18
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.js +15 -0
- package/dist/interceptors/index.js.map +1 -0
- package/dist/interceptors/locusRetry.js +93 -0
- package/dist/interceptors/locusRetry.js.map +1 -0
- package/dist/interpretation/collection.js +23 -0
- package/dist/interpretation/collection.js.map +1 -0
- package/dist/interpretation/index.js +380 -0
- package/dist/interpretation/index.js.map +1 -0
- package/dist/interpretation/siLanguage.js +25 -0
- package/dist/interpretation/siLanguage.js.map +1 -0
- package/dist/locus-info/controlsUtils.js +101 -29
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +3 -26
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +0 -15
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +4 -12
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.js +564 -246
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +10 -38
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +82 -38
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.js +314 -163
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +110 -92
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +107 -231
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +137 -222
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +2 -9
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +316 -501
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +97 -14
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +5311 -3871
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +292 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -0
- package/dist/meeting/muteState.js +260 -183
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +421 -347
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js +7 -0
- package/dist/meeting/request.type.js.map +1 -0
- package/dist/meeting/state.js +21 -31
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.js +672 -585
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +172 -0
- package/dist/meeting/voicea-meeting.js.map +1 -0
- package/dist/meeting-info/collection.js +6 -25
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.js +87 -39
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +352 -283
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +3 -15
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +99 -183
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +147 -234
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.js +43 -19
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.js +895 -600
- 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 +26 -41
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +184 -157
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +134 -85
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +25 -0
- package/dist/member/types.js.map +1 -0
- package/dist/member/util.js +158 -88
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js +13 -12
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +194 -204
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +113 -68
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +15 -0
- package/dist/members/types.js.map +1 -0
- package/dist/members/util.js +324 -259
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +19 -7
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.js +11 -558
- package/dist/metrics/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +263 -50
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js +58 -65
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/receiveSlotManager.js +76 -95
- package/dist/multistream/receiveSlotManager.js.map +1 -1
- package/dist/multistream/remoteMedia.js +62 -76
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +82 -45
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +657 -448
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +255 -0
- package/dist/multistream/sendSlotManager.js.map +1 -0
- package/dist/networkQualityMonitor/index.js +40 -59
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/personal-meeting-room/index.js +21 -45
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +1 -31
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +0 -13
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/clusterReachability.js +356 -0
- package/dist/reachability/clusterReachability.js.map +1 -0
- package/dist/reachability/index.js +297 -460
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +20 -26
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +29 -0
- package/dist/reachability/util.js.map +1 -0
- package/dist/reactions/constants.js +13 -0
- package/dist/reactions/constants.js.map +1 -0
- package/dist/reactions/reactions.js +109 -0
- package/dist/reactions/reactions.js.map +1 -0
- package/dist/reactions/reactions.type.js +36 -0
- package/dist/reactions/reactions.type.js.map +1 -0
- package/dist/reconnection-manager/index.js +413 -483
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +17 -0
- package/dist/recording-controller/enums.js.map +1 -0
- package/dist/recording-controller/index.js +362 -0
- package/dist/recording-controller/index.js.map +1 -0
- package/dist/recording-controller/util.js +64 -0
- package/dist/recording-controller/util.js.map +1 -0
- package/dist/roap/index.js +102 -86
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +131 -135
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +437 -116
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/rtcMetrics/constants.js +12 -0
- package/dist/rtcMetrics/constants.js.map +1 -0
- package/dist/rtcMetrics/index.js +179 -0
- package/dist/rtcMetrics/index.js.map +1 -0
- package/dist/statsAnalyzer/global.js +1 -95
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.js +557 -583
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +326 -130
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +22 -47
- package/dist/transcription/index.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +72 -0
- package/dist/types/constants.d.ts +1088 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +272 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +93 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +241 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +167 -0
- package/dist/types/meeting/index.d.ts +1824 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/types/meeting/muteState.d.ts +178 -0
- package/dist/types/meeting/request.d.ts +293 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +118 -0
- package/dist/types/meeting/voicea-meeting.d.ts +16 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +2 -0
- package/dist/types/meeting-info/utilv2.d.ts +2 -0
- package/dist/types/meetings/collection.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +389 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +70 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +120 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +49 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +301 -0
- package/dist/types/multistream/sendSlotManager.d.ts +70 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/clusterReachability.d.ts +109 -0
- package/dist/types/reachability/index.d.ts +105 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reachability/util.d.ts +8 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +136 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +86 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +155 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +61 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +217 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/collection.js +44 -0
- package/dist/webinar/collection.js.map +1 -0
- package/dist/webinar/index.js +69 -0
- package/dist/webinar/index.js.map +1 -0
- package/internal-README.md +7 -6
- package/package.json +30 -21
- 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/{browser-detection.js → browser-detection.ts} +9 -6
- package/src/common/collection.ts +9 -7
- package/src/common/{config.js → config.ts} +1 -1
- package/src/common/errors/{captcha-error.js → captcha-error.ts} +11 -7
- package/src/common/errors/{intent-to-join.js → intent-to-join.ts} +12 -7
- package/src/common/errors/{join-meeting.js → join-meeting.ts} +17 -8
- package/src/common/errors/{media.js → media.ts} +11 -7
- package/src/common/errors/no-meeting-info.ts +24 -0
- package/src/common/errors/parameter.ts +11 -7
- package/src/common/errors/{password-error.js → password-error.ts} +11 -7
- package/src/common/errors/{permission.js → permission.ts} +10 -6
- package/src/common/errors/reclaim-host-role-errors.ts +134 -0
- package/src/common/errors/{reconnection.js → reconnection.ts} +11 -7
- package/src/common/errors/{stats.js → stats.ts} +11 -7
- package/src/common/errors/{webex-errors.js → webex-errors.ts} +51 -8
- package/src/common/errors/{webex-meetings-error.js → webex-meetings-error.ts} +4 -2
- package/src/common/events/{events-scope.js → events-scope.ts} +6 -2
- package/src/common/events/{events.js → events.ts} +5 -1
- package/src/common/events/{trigger-proxy.js → trigger-proxy.ts} +9 -5
- package/src/common/events/{util.js → util.ts} +2 -3
- package/src/common/logs/{logger-config.js → logger-config.ts} +1 -2
- package/src/common/logs/logger-proxy.ts +44 -0
- package/src/common/logs/{request.js → request.ts} +26 -9
- package/src/common/queue.ts +22 -9
- package/src/{config.js → config.ts} +19 -21
- package/src/constants.ts +296 -27
- package/src/controls-options-manager/constants.ts +5 -0
- package/src/controls-options-manager/enums.ts +18 -0
- package/src/controls-options-manager/index.ts +278 -0
- package/src/controls-options-manager/types.ts +59 -0
- package/src/controls-options-manager/util.ts +300 -0
- package/src/index.ts +45 -0
- package/src/interceptors/index.ts +3 -0
- package/src/interceptors/locusRetry.ts +67 -0
- package/src/interpretation/README.md +60 -0
- package/src/interpretation/collection.ts +19 -0
- package/src/interpretation/index.ts +349 -0
- package/src/interpretation/siLanguage.ts +18 -0
- package/src/locus-info/controlsUtils.ts +222 -0
- package/src/locus-info/{embeddedAppsUtils.js → embeddedAppsUtils.ts} +5 -6
- package/src/locus-info/{fullState.js → fullState.ts} +16 -12
- package/src/locus-info/{hostUtils.js → hostUtils.ts} +9 -8
- package/src/locus-info/{index.js → index.ts} +561 -119
- package/src/locus-info/{infoUtils.js → infoUtils.ts} +29 -10
- package/src/locus-info/{mediaSharesUtils.js → mediaSharesUtils.ts} +97 -17
- package/src/locus-info/{parser.js → parser.ts} +303 -104
- package/src/locus-info/{selfUtils.js → selfUtils.ts} +199 -68
- package/src/media/index.ts +460 -0
- package/src/media/properties.ts +283 -0
- package/src/media/{util.js → util.ts} +2 -2
- package/src/mediaQualityMetrics/config.ts +249 -0
- package/src/meeting/in-meeting-actions.ts +199 -3
- package/src/meeting/index.ts +8494 -0
- package/src/meeting/locusMediaRequest.ts +313 -0
- package/src/meeting/muteState.ts +465 -0
- package/src/meeting/request.ts +912 -0
- package/src/meeting/request.type.ts +13 -0
- package/src/meeting/{state.js → state.ts} +50 -35
- package/src/meeting/util.ts +799 -0
- package/src/meeting/voicea-meeting.ts +122 -0
- package/src/meeting-info/{collection.js → collection.ts} +6 -2
- package/src/meeting-info/index.ts +210 -0
- package/src/meeting-info/meeting-info-v2.ts +423 -0
- package/src/meeting-info/{request.js → request.ts} +14 -4
- package/src/meeting-info/{util.js → util.ts} +70 -58
- package/src/meeting-info/{utilv2.js → utilv2.ts} +99 -82
- package/src/meetings/collection.ts +76 -0
- package/src/meetings/index.ts +1539 -0
- package/src/meetings/meetings.types.ts +12 -0
- package/src/meetings/{request.js → request.ts} +34 -25
- package/src/meetings/{util.js → util.ts} +133 -38
- package/src/member/{index.js → index.ts} +159 -56
- package/src/member/types.ts +38 -0
- package/src/member/util.ts +397 -0
- package/src/members/{collection.js → collection.ts} +10 -2
- package/src/members/{index.js → index.ts} +351 -146
- package/src/members/request.ts +255 -0
- package/src/members/types.ts +29 -0
- package/src/members/util.ts +353 -0
- package/src/metrics/{constants.js → constants.ts} +17 -6
- package/src/metrics/index.ts +73 -0
- package/src/multistream/mediaRequestManager.ts +341 -64
- package/src/multistream/receiveSlot.ts +69 -26
- package/src/multistream/receiveSlotManager.ts +66 -42
- package/src/multistream/remoteMedia.ts +40 -5
- package/src/multistream/remoteMediaGroup.ts +82 -3
- package/src/multistream/remoteMediaManager.ts +401 -81
- package/src/multistream/sendSlotManager.ts +199 -0
- package/src/networkQualityMonitor/{index.js → index.ts} +41 -29
- package/src/personal-meeting-room/{index.js → index.ts} +28 -19
- package/src/personal-meeting-room/{request.js → request.ts} +13 -4
- package/src/personal-meeting-room/{util.js → util.ts} +4 -4
- package/src/reachability/clusterReachability.ts +320 -0
- package/src/reachability/index.ts +371 -0
- package/src/reachability/request.ts +50 -35
- package/src/reachability/util.ts +24 -0
- package/src/reactions/constants.ts +4 -0
- package/src/reactions/reactions.ts +104 -0
- package/src/reactions/reactions.type.ts +62 -0
- package/src/reconnection-manager/index.ts +643 -0
- package/src/recording-controller/enums.ts +8 -0
- package/src/recording-controller/index.ts +332 -0
- package/src/recording-controller/util.ts +75 -0
- package/src/roap/index.ts +288 -0
- package/src/roap/request.ts +153 -0
- package/src/roap/turnDiscovery.ts +374 -70
- package/src/rtcMetrics/constants.ts +3 -0
- package/src/rtcMetrics/index.ts +166 -0
- package/src/statsAnalyzer/global.ts +37 -0
- package/src/statsAnalyzer/index.ts +1275 -0
- package/src/statsAnalyzer/mqaUtil.ts +440 -0
- package/src/transcription/{index.js → index.ts} +46 -39
- 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 +791 -531
- package/test/integration/spec/space-meeting.js +391 -204
- package/test/integration/spec/transcription.js +7 -8
- package/test/unit/spec/annotation/index.ts +418 -0
- package/test/unit/spec/breakouts/breakout.ts +238 -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 +1793 -0
- package/test/unit/spec/breakouts/request.ts +104 -0
- package/test/unit/spec/breakouts/utils.js +72 -0
- package/test/unit/spec/common/browser-detection.js +9 -28
- package/test/unit/spec/common/queue.js +31 -2
- package/test/unit/spec/controls-options-manager/index.js +287 -0
- package/test/unit/spec/controls-options-manager/util.js +582 -0
- package/test/unit/spec/fixture/locus.js +93 -90
- package/test/unit/spec/interceptors/locusRetry.ts +131 -0
- package/test/unit/spec/interpretation/collection.ts +15 -0
- package/test/unit/spec/interpretation/index.ts +625 -0
- package/test/unit/spec/interpretation/siLanguage.ts +28 -0
- package/test/unit/spec/locus-info/controlsUtils.js +325 -32
- package/test/unit/spec/locus-info/embeddedAppsUtils.js +8 -6
- package/test/unit/spec/locus-info/index.js +1458 -21
- package/test/unit/spec/locus-info/infoUtils.js +71 -40
- package/test/unit/spec/locus-info/lib/BasicSeqCmp.json +88 -430
- package/test/unit/spec/locus-info/lib/SeqCmp.json +529 -685
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +41 -0
- package/test/unit/spec/locus-info/parser.js +119 -44
- package/test/unit/spec/locus-info/selfConstant.js +120 -103
- package/test/unit/spec/locus-info/selfUtils.js +291 -12
- package/test/unit/spec/media/index.ts +194 -111
- package/test/unit/spec/media/properties.ts +11 -11
- package/test/unit/spec/meeting/in-meeting-actions.ts +96 -3
- package/test/unit/spec/meeting/index.js +8616 -1921
- package/test/unit/spec/meeting/locusMediaRequest.ts +442 -0
- package/test/unit/spec/meeting/muteState.js +568 -207
- package/test/unit/spec/meeting/request.js +602 -82
- package/test/unit/spec/meeting/utils.js +867 -179
- package/test/unit/spec/meeting/voicea-meeting.ts +266 -0
- package/test/unit/spec/meeting-info/index.js +300 -0
- package/test/unit/spec/meeting-info/meetinginfov2.js +631 -78
- package/test/unit/spec/meeting-info/request.js +7 -9
- package/test/unit/spec/meeting-info/util.js +11 -12
- package/test/unit/spec/meeting-info/utilv2.js +131 -74
- package/test/unit/spec/meetings/collection.js +27 -1
- package/test/unit/spec/meetings/index.js +1826 -374
- package/test/unit/spec/meetings/utils.js +243 -14
- package/test/unit/spec/member/index.js +61 -7
- package/test/unit/spec/member/util.js +526 -26
- package/test/unit/spec/members/index.js +536 -55
- package/test/unit/spec/members/request.js +228 -40
- package/test/unit/spec/members/utils.js +217 -4
- package/test/unit/spec/metrics/index.js +13 -68
- package/test/unit/spec/multistream/mediaRequestManager.ts +1032 -110
- package/test/unit/spec/multistream/receiveSlot.ts +77 -18
- package/test/unit/spec/multistream/receiveSlotManager.ts +69 -39
- package/test/unit/spec/multistream/remoteMedia.ts +40 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +350 -5
- package/test/unit/spec/multistream/remoteMediaManager.ts +937 -65
- package/test/unit/spec/multistream/sendSlotManager.ts +274 -0
- package/test/unit/spec/networkQualityMonitor/index.js +24 -18
- package/test/unit/spec/personal-meeting-room/personal-meeting-room.js +2 -7
- package/test/unit/spec/reachability/clusterReachability.ts +279 -0
- package/test/unit/spec/reachability/index.ts +606 -26
- package/test/unit/spec/reachability/request.js +68 -0
- package/test/unit/spec/reachability/util.ts +40 -0
- package/test/unit/spec/reconnection-manager/index.js +222 -34
- package/test/unit/spec/recording-controller/index.js +306 -0
- package/test/unit/spec/recording-controller/util.js +229 -0
- package/test/unit/spec/roap/index.ts +238 -82
- package/test/unit/spec/roap/request.ts +255 -0
- package/test/unit/spec/roap/turnDiscovery.ts +707 -110
- package/test/unit/spec/rtcMetrics/index.ts +122 -0
- package/test/unit/spec/stats-analyzer/index.js +1331 -62
- package/test/unit/spec/webinar/collection.ts +13 -0
- package/test/unit/spec/webinar/index.ts +60 -0
- package/test/utils/cmr.js +44 -42
- package/test/utils/constants.js +9 -0
- package/test/utils/integrationTestUtils.js +46 -0
- package/test/utils/testUtils.js +63 -99
- package/test/utils/webex-config.js +22 -18
- package/test/utils/webex-test-users.js +65 -50
- package/tsconfig.json +6 -0
- package/dist/media/internal-media-core-wrapper.js +0 -22
- package/dist/media/internal-media-core-wrapper.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -327
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/metrics/config.js +0 -301
- package/dist/metrics/config.js.map +0 -1
- package/dist/multistream/multistreamMedia.js +0 -116
- package/dist/multistream/multistreamMedia.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -124
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/src/common/logs/logger-proxy.js +0 -33
- package/src/index.js +0 -15
- package/src/locus-info/controlsUtils.js +0 -102
- package/src/media/index.js +0 -459
- package/src/media/internal-media-core-wrapper.ts +0 -9
- package/src/media/properties.js +0 -289
- package/src/mediaQualityMetrics/config.js +0 -382
- package/src/meeting/effectsState.js +0 -205
- package/src/meeting/index.js +0 -6284
- package/src/meeting/muteState.js +0 -318
- package/src/meeting/request.js +0 -684
- package/src/meeting/util.js +0 -506
- package/src/meeting-info/index.js +0 -131
- package/src/meeting-info/meeting-info-v2.js +0 -255
- package/src/meetings/collection.js +0 -40
- package/src/meetings/index.js +0 -1015
- package/src/member/util.js +0 -254
- package/src/members/request.js +0 -131
- package/src/members/util.js +0 -258
- package/src/metrics/config.js +0 -324
- package/src/metrics/index.js +0 -530
- package/src/multistream/multistreamMedia.ts +0 -92
- package/src/peer-connection-manager/util.ts +0 -117
- package/src/reachability/index.js +0 -464
- package/src/reconnection-manager/index.js +0 -519
- package/src/roap/index.js +0 -220
- package/src/roap/request.js +0 -127
- package/src/statsAnalyzer/global.js +0 -133
- package/src/statsAnalyzer/index.js +0 -1006
- package/src/statsAnalyzer/mqaUtil.js +0 -173
- package/test/unit/spec/meeting/effectsState.js +0 -291
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +0 -389
- /package/src/common/errors/{reconnection-in-progress.js → reconnection-in-progress.ts} +0 -0
|
@@ -1,1006 +0,0 @@
|
|
|
1
|
-
import {cloneDeep} from 'lodash';
|
|
2
|
-
import {MediaConnection as MC} from '@webex/internal-media-core';
|
|
3
|
-
|
|
4
|
-
import EventsScope from '../common/events/events-scope';
|
|
5
|
-
import {DEFAULT_GET_STATS_FILTER, STATS, MQA_INTEVAL, NETWORK_TYPE, MEDIA_DEVICES, _UNKNOWN_} from '../constants';
|
|
6
|
-
import mqaData from '../mediaQualityMetrics/config';
|
|
7
|
-
import LoggerProxy from '../common/logs/logger-proxy';
|
|
8
|
-
|
|
9
|
-
import defaultStats from './global';
|
|
10
|
-
import {
|
|
11
|
-
getAudioSenderMqa,
|
|
12
|
-
getAudioReceiverMqa,
|
|
13
|
-
getVideoSenderMqa,
|
|
14
|
-
getVideoReceiverMqa
|
|
15
|
-
} from './mqaUtil';
|
|
16
|
-
|
|
17
|
-
export const EVENTS = {
|
|
18
|
-
MEDIA_QUALITY: 'MEDIA_QUALITY',
|
|
19
|
-
LOCAL_MEDIA_STARTED: 'LOCAL_MEDIA_STARTED',
|
|
20
|
-
LOCAL_MEDIA_STOPPED: 'LOCAL_MEDIA_STOPPED',
|
|
21
|
-
REMOTE_MEDIA_STARTED: 'REMOTE_MEDIA_STARTED',
|
|
22
|
-
REMOTE_MEDIA_STOPPED: 'REMOTE_MEDIA_STOPPED',
|
|
23
|
-
};
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Stats Analyzer class that will emit events based on detected quality
|
|
27
|
-
*
|
|
28
|
-
* @export
|
|
29
|
-
* @class StatsAnalyzer
|
|
30
|
-
* @extends {EventsScope}
|
|
31
|
-
*/
|
|
32
|
-
export class StatsAnalyzer extends EventsScope {
|
|
33
|
-
/**
|
|
34
|
-
* Creates a new instance of StatsAnalyzer
|
|
35
|
-
* @constructor
|
|
36
|
-
* @public
|
|
37
|
-
* @param {Object} config SDK Configuration Object
|
|
38
|
-
* @param {Object} networkQualityMonitor class for assessing network characteristics (jitter, packetLoss, latency)
|
|
39
|
-
* @param {Object} statsResults Default properties for stats
|
|
40
|
-
*/
|
|
41
|
-
constructor(config, networkQualityMonitor = {}, statsResults = defaultStats) {
|
|
42
|
-
super();
|
|
43
|
-
this.statsStarted = false;
|
|
44
|
-
this.statsResults = statsResults;
|
|
45
|
-
this.lastStatsResults = null;
|
|
46
|
-
this.config = config;
|
|
47
|
-
this.networkQualityMonitor = networkQualityMonitor;
|
|
48
|
-
this.correlationId = config.correlationId;
|
|
49
|
-
this.mqaSentCount = -1;
|
|
50
|
-
this.lastMqaDataSent = {
|
|
51
|
-
resolutions: {video: {send: {}, recv: {}}, audio: {send: {}, recv: {}}, share: {send: {}, recv: {}}},
|
|
52
|
-
video: {send: {}, recv: {}},
|
|
53
|
-
audio: {send: {}, recv: {}},
|
|
54
|
-
share: {send: {}, recv: {}}
|
|
55
|
-
};
|
|
56
|
-
this.localMQEStats = {
|
|
57
|
-
audio: {
|
|
58
|
-
RX: {
|
|
59
|
-
packetsLost: [],
|
|
60
|
-
jitter: [],
|
|
61
|
-
latency: [],
|
|
62
|
-
bitRate: []
|
|
63
|
-
},
|
|
64
|
-
TX: {
|
|
65
|
-
packetsLost: [],
|
|
66
|
-
jitter: [],
|
|
67
|
-
latency: [],
|
|
68
|
-
bitRate: []
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
video: {
|
|
72
|
-
RX: {
|
|
73
|
-
packetsLost: [],
|
|
74
|
-
jitter: [],
|
|
75
|
-
latency: [],
|
|
76
|
-
bitRate: [],
|
|
77
|
-
frameRate: [],
|
|
78
|
-
resolutionWidth: [],
|
|
79
|
-
resolutionHeight: [],
|
|
80
|
-
requestedKeyFrame: [],
|
|
81
|
-
receivedKeyFrame: []
|
|
82
|
-
},
|
|
83
|
-
TX: {
|
|
84
|
-
packetsLost: [],
|
|
85
|
-
jitter: [],
|
|
86
|
-
latency: [],
|
|
87
|
-
bitRate: [],
|
|
88
|
-
frameRate: [],
|
|
89
|
-
resolutionWidth: [],
|
|
90
|
-
resolutionHeight: [],
|
|
91
|
-
requestedKeyFrame: [],
|
|
92
|
-
receivedKeyFrame: []
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
|
-
this.lastEmittedStartStopEvent = {
|
|
97
|
-
audio: {
|
|
98
|
-
local: undefined,
|
|
99
|
-
remote: undefined,
|
|
100
|
-
},
|
|
101
|
-
video: {
|
|
102
|
-
local: undefined,
|
|
103
|
-
remote: undefined,
|
|
104
|
-
},
|
|
105
|
-
share: {
|
|
106
|
-
local: undefined,
|
|
107
|
-
remote: undefined,
|
|
108
|
-
},
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
populateResults(lastMqa) {
|
|
113
|
-
// Audio
|
|
114
|
-
|
|
115
|
-
this.localMQEStats.audio.RX.packetsLost.push(lastMqa.audioReceive[0].common.mediaHopByHopLost);
|
|
116
|
-
this.localMQEStats.audio.RX.jitter.push(lastMqa.audioReceive[0].streams[0].common.rtpJitter);
|
|
117
|
-
this.localMQEStats.audio.RX.latency.push(lastMqa.audioReceive[0].common.roundTripTime);
|
|
118
|
-
this.localMQEStats.audio.RX.bitRate.push(lastMqa.audioReceive[0].streams[0].common.receivedBitrate);
|
|
119
|
-
|
|
120
|
-
this.localMQEStats.audio.TX.packetsLost.push(lastMqa.audioTransmit[0].common.remoteLossRate);
|
|
121
|
-
this.localMQEStats.audio.TX.jitter.push(lastMqa.audioTransmit[0].common.remoteJitter);
|
|
122
|
-
this.localMQEStats.audio.TX.latency.push(lastMqa.audioTransmit[0].common.roundTripTime);
|
|
123
|
-
this.localMQEStats.audio.TX.bitRate.push(lastMqa.audioTransmit[0].streams[0].common.transmittedBitrate);
|
|
124
|
-
|
|
125
|
-
// Video
|
|
126
|
-
|
|
127
|
-
this.localMQEStats.video.RX.packetsLost.push(lastMqa.videoReceive[0].common.mediaHopByHopLost);
|
|
128
|
-
this.localMQEStats.video.RX.jitter.push(lastMqa.videoReceive[0].streams[0].common.rtpJitter);
|
|
129
|
-
this.localMQEStats.video.RX.latency.push(lastMqa.videoReceive[0].streams[0].common.roundTripTime);
|
|
130
|
-
this.localMQEStats.video.RX.bitRate.push(lastMqa.videoReceive[0].streams[0].common.receivedBitrate);
|
|
131
|
-
this.localMQEStats.video.RX.frameRate.push(lastMqa.videoReceive[0].streams[0].common.receivedFrameRate);
|
|
132
|
-
this.localMQEStats.video.RX.resolutionWidth.push(lastMqa.videoReceive[0].streams[0].receivedWidth);
|
|
133
|
-
this.localMQEStats.video.RX.resolutionHeight.push(lastMqa.videoReceive[0].streams[0].receivedHeight);
|
|
134
|
-
this.localMQEStats.video.RX.requestedKeyFrame.push();
|
|
135
|
-
this.localMQEStats.video.RX.receivedKeyFrame.push();
|
|
136
|
-
|
|
137
|
-
this.localMQEStats.video.TX.packetsLost.push(lastMqa.videoTransmit[0].common.remoteLossRate);
|
|
138
|
-
this.localMQEStats.video.TX.jitter.push(lastMqa.videoTransmit[0].common.remoteJitter);
|
|
139
|
-
this.localMQEStats.video.TX.latency.push(lastMqa.videoTransmit[0].common.roundTripTime);
|
|
140
|
-
this.localMQEStats.video.TX.bitRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedBitrate);
|
|
141
|
-
this.localMQEStats.video.TX.frameRate.push(lastMqa.videoTransmit[0].streams[0].common.transmittedFrameRate);
|
|
142
|
-
this.localMQEStats.video.TX.resolutionWidth.push(lastMqa.videoTransmit[0].streams[0].transmittedWidth);
|
|
143
|
-
this.localMQEStats.video.TX.resolutionHeight.push(lastMqa.videoTransmit[0].streams[0].transmittedHeight);
|
|
144
|
-
this.localMQEStats.video.TX.requestedKeyFrame.push(lastMqa.videoTransmit[0].streams[0].requestedKeyFrames);
|
|
145
|
-
this.localMQEStats.video.TX.receivedKeyFrame.push();
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
resetStatsResults() {
|
|
150
|
-
this.statsResults.audio.send.meanRemoteJitter = [];
|
|
151
|
-
this.statsResults.video.send.meanRemoteJitter = [];
|
|
152
|
-
this.statsResults.share.send.meanRemoteJitter = [];
|
|
153
|
-
|
|
154
|
-
this.statsResults.audio.recv.meanRtpJitter = [];
|
|
155
|
-
|
|
156
|
-
// TODO: currently no values are present
|
|
157
|
-
this.statsResults.video.recv.meanRtpJitter = [];
|
|
158
|
-
this.statsResults.share.recv.meanRtpJitter = [];
|
|
159
|
-
|
|
160
|
-
// Reset the roundTripTime
|
|
161
|
-
this.statsResults.audio.send.meanRoundTripTime = [];
|
|
162
|
-
this.statsResults.video.send.meanRoundTripTime = [];
|
|
163
|
-
this.statsResults.share.send.meanRoundTripTime = [];
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* sets mediaStatus status for analyzing metrics
|
|
168
|
-
*
|
|
169
|
-
* @public
|
|
170
|
-
* @param {Object} status for the audio and video
|
|
171
|
-
* @memberof StatsAnalyzer
|
|
172
|
-
* @returns {void}
|
|
173
|
-
*/
|
|
174
|
-
updateMediaStatus(status) {
|
|
175
|
-
this.meetingMediaStatus = status;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* captures MQA data from media connection
|
|
180
|
-
*
|
|
181
|
-
* @public
|
|
182
|
-
* @memberof StatsAnalyzer
|
|
183
|
-
* @returns {void}
|
|
184
|
-
*/
|
|
185
|
-
sendMqaData() {
|
|
186
|
-
const audioReceiver = mqaData.intervals[0].audioReceive[0];
|
|
187
|
-
const audioSender = mqaData.intervals[0].audioTransmit[0];
|
|
188
|
-
const videoReceiver = mqaData.intervals[0].videoReceive[0];
|
|
189
|
-
const videoSender = mqaData.intervals[0].videoTransmit[0];
|
|
190
|
-
const shareSender = mqaData.intervals[0].videoTransmit[1];
|
|
191
|
-
const shareReceiver = mqaData.intervals[0].videoReceive[1];
|
|
192
|
-
|
|
193
|
-
getAudioSenderMqa({
|
|
194
|
-
audioSender,
|
|
195
|
-
statsResults: this.statsResults,
|
|
196
|
-
lastMqaDataSent: this.lastMqaDataSent
|
|
197
|
-
});
|
|
198
|
-
getAudioReceiverMqa({
|
|
199
|
-
audioReceiver,
|
|
200
|
-
statsResults: this.statsResults,
|
|
201
|
-
lastMqaDataSent: this.lastMqaDataSent
|
|
202
|
-
});
|
|
203
|
-
|
|
204
|
-
getVideoReceiverMqa({
|
|
205
|
-
videoReceiver,
|
|
206
|
-
statsResults: this.statsResults,
|
|
207
|
-
lastMqaDataSent: this.lastMqaDataSent
|
|
208
|
-
});
|
|
209
|
-
getVideoSenderMqa({
|
|
210
|
-
videoSender,
|
|
211
|
-
statsResults: this.statsResults,
|
|
212
|
-
lastMqaDataSent: this.lastMqaDataSent
|
|
213
|
-
});
|
|
214
|
-
|
|
215
|
-
// Capture mqa for share scenario
|
|
216
|
-
|
|
217
|
-
getVideoSenderMqa({
|
|
218
|
-
videoSender: shareSender,
|
|
219
|
-
statsResults: this.statsResults,
|
|
220
|
-
lastMqaDataSent: this.lastMqaDataSent,
|
|
221
|
-
isShareStream: true
|
|
222
|
-
});
|
|
223
|
-
|
|
224
|
-
getVideoReceiverMqa({
|
|
225
|
-
videoReceiver: shareReceiver,
|
|
226
|
-
statsResults: this.statsResults,
|
|
227
|
-
lastMqaDataSent: this.lastMqaDataSent,
|
|
228
|
-
isShareStream: true
|
|
229
|
-
});
|
|
230
|
-
|
|
231
|
-
mqaData.intervals[0].intervalMetadata.peerReflexiveIP = this.statsResults.connectionType.local.ipAddress[0];
|
|
232
|
-
|
|
233
|
-
// Adding peripheral information
|
|
234
|
-
mqaData.intervals[0].intervalMetadata.peripherals = [];
|
|
235
|
-
mqaData.intervals[0].intervalMetadata.peripherals.push({information: _UNKNOWN_, name: MEDIA_DEVICES.SPEAKER});
|
|
236
|
-
mqaData.intervals[0].intervalMetadata.peripherals.push({information: this.statsResults[STATS.AUDIO_CORRELATE][STATS.SEND_DIRECTION].trackLabel || _UNKNOWN_, name: MEDIA_DEVICES.MICROPHONE});
|
|
237
|
-
mqaData.intervals[0].intervalMetadata.peripherals.push({information: this.statsResults[STATS.VIDEO_CORRELATE][STATS.SEND_DIRECTION].trackLabel || _UNKNOWN_, name: MEDIA_DEVICES.CAMERA});
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
mqaData.networkType = this.statsResults.connectionType.local.networkType;
|
|
241
|
-
|
|
242
|
-
this.mqaSentCount += 1;
|
|
243
|
-
|
|
244
|
-
mqaData.intervals[0].intervalNumber = this.mqaSentCount;
|
|
245
|
-
|
|
246
|
-
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
247
|
-
this.lastMqaDataSent = cloneDeep(this.statsResults);
|
|
248
|
-
|
|
249
|
-
this.populateResults(mqaData.intervals[0]);
|
|
250
|
-
|
|
251
|
-
this.resetStatsResults();
|
|
252
|
-
|
|
253
|
-
this.emit(
|
|
254
|
-
{
|
|
255
|
-
file: 'statsAnalyzer',
|
|
256
|
-
function: 'sendMqaData'
|
|
257
|
-
},
|
|
258
|
-
EVENTS.MEDIA_QUALITY,
|
|
259
|
-
{
|
|
260
|
-
data: mqaData.intervals[0],
|
|
261
|
-
networkType: mqaData.networkType
|
|
262
|
-
}
|
|
263
|
-
);
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
/**
|
|
267
|
-
* updated the media connection when changed
|
|
268
|
-
*
|
|
269
|
-
* @private
|
|
270
|
-
* @memberof StatsAnalyzer
|
|
271
|
-
* @param {MC.RoapMediaConnection} mediaConnection
|
|
272
|
-
* @returns {void}
|
|
273
|
-
*/
|
|
274
|
-
updateMediaConnection(mediaConnection) {
|
|
275
|
-
this.mediaConnection = mediaConnection;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
/**
|
|
279
|
-
* Starts the stats analyzer on interval
|
|
280
|
-
*
|
|
281
|
-
* @public
|
|
282
|
-
* @memberof StatsAnalyzer
|
|
283
|
-
* @param {MC.RoapMediaConnection} mediaConnection
|
|
284
|
-
* @returns {Promise}
|
|
285
|
-
*/
|
|
286
|
-
startAnalyzer(mediaConnection) {
|
|
287
|
-
if (!this.statsStarted) {
|
|
288
|
-
this.statsStarted = true;
|
|
289
|
-
this.mediaConnection = mediaConnection;
|
|
290
|
-
|
|
291
|
-
return this.getStatsAndParse()
|
|
292
|
-
.then(() => {
|
|
293
|
-
this.statsInterval = setInterval(() => {
|
|
294
|
-
this.getStatsAndParse();
|
|
295
|
-
}, this.config.analyzerInterval);
|
|
296
|
-
// Trigger initial fetch
|
|
297
|
-
this.sendMqaData();
|
|
298
|
-
this.mqaInterval = setInterval(() => {
|
|
299
|
-
this.sendMqaData();
|
|
300
|
-
}, MQA_INTEVAL);
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
return Promise.resolve();
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
* Cleans up the analyzer when done
|
|
309
|
-
*
|
|
310
|
-
* @public
|
|
311
|
-
* @memberof StatsAnalyzer
|
|
312
|
-
* @returns {void}
|
|
313
|
-
*/
|
|
314
|
-
stopAnalyzer() {
|
|
315
|
-
const sendOneLastMqa = this.mqaInterval && this.statsInterval;
|
|
316
|
-
|
|
317
|
-
if (this.statsInterval) {
|
|
318
|
-
clearInterval(this.statsInterval);
|
|
319
|
-
this.statsInterval = undefined;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
if (this.mqaInterval) {
|
|
323
|
-
clearInterval(this.mqaInterval);
|
|
324
|
-
this.mqaInterval = undefined;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
if (sendOneLastMqa) {
|
|
328
|
-
return this.getStatsAndParse().then(() => {
|
|
329
|
-
this.sendMqaData();
|
|
330
|
-
this.mediaConnection = null;
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
this.mediaConnection = null;
|
|
334
|
-
|
|
335
|
-
return Promise.resolve();
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
/**
|
|
339
|
-
* Parse a single result of get stats
|
|
340
|
-
*
|
|
341
|
-
* @private
|
|
342
|
-
* @param {*} getStatsResult
|
|
343
|
-
* @param {String} type
|
|
344
|
-
* @param {boolean} isSender
|
|
345
|
-
* @returns {void}
|
|
346
|
-
* @memberof StatsAnalyzer
|
|
347
|
-
*/
|
|
348
|
-
parseGetStatsResult(getStatsResult, type, isSender) {
|
|
349
|
-
if (!getStatsResult) {
|
|
350
|
-
return;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
switch (getStatsResult.type) {
|
|
354
|
-
case 'outbound-rtp':
|
|
355
|
-
this.processOutboundRTPResult(getStatsResult, type);
|
|
356
|
-
break;
|
|
357
|
-
case 'inbound-rtp':
|
|
358
|
-
this.processInboundRTPResult(getStatsResult, type);
|
|
359
|
-
break;
|
|
360
|
-
case 'track':
|
|
361
|
-
this.processTrackResult(getStatsResult, type);
|
|
362
|
-
break;
|
|
363
|
-
case 'remote-inbound-rtp':
|
|
364
|
-
case 'remote-outbound-rtp':
|
|
365
|
-
this.compareSentAndReceived(getStatsResult, type, isSender);
|
|
366
|
-
break;
|
|
367
|
-
case 'remotecandidate':
|
|
368
|
-
case 'remote-candidate':
|
|
369
|
-
this.parseCandidate(getStatsResult, type, isSender, true);
|
|
370
|
-
break;
|
|
371
|
-
case 'local-candidate':
|
|
372
|
-
this.parseCandidate(getStatsResult, type, isSender, false);
|
|
373
|
-
break;
|
|
374
|
-
case 'media-source':
|
|
375
|
-
this.parseAudioSource(getStatsResult, type);
|
|
376
|
-
break;
|
|
377
|
-
default:
|
|
378
|
-
break;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Filters the get stats results for types
|
|
384
|
-
* @private
|
|
385
|
-
* @param {Array} getStatsResults
|
|
386
|
-
* @param {String} type
|
|
387
|
-
* @param {boolean} isSender
|
|
388
|
-
* @returns {void}
|
|
389
|
-
*/
|
|
390
|
-
filterAndParseGetStatsResults(getStatsResults, type, isSender) {
|
|
391
|
-
const {types} = DEFAULT_GET_STATS_FILTER;
|
|
392
|
-
|
|
393
|
-
getStatsResults.forEach((result) => {
|
|
394
|
-
if (types.includes(result.type)) {
|
|
395
|
-
this.parseGetStatsResult(result, type, isSender);
|
|
396
|
-
}
|
|
397
|
-
});
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/**
|
|
401
|
-
* parse the audio
|
|
402
|
-
* @param {String} result
|
|
403
|
-
* @param {boolean} type
|
|
404
|
-
* @returns {void}
|
|
405
|
-
*/
|
|
406
|
-
parseAudioSource(result, type) {
|
|
407
|
-
if (!result) {
|
|
408
|
-
return;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
if (type === STATS.AUDIO_CORRELATE) {
|
|
412
|
-
this.statsResults[type].send.audioLevel = result.audioLevel;
|
|
413
|
-
this.statsResults[type].send.totalAudioEnergy = result.totalAudioEnergy;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
/**
|
|
418
|
-
* emits started/stopped events for local/remote media by checking
|
|
419
|
-
* if given values are increasing or not. The previousValue, currentValue
|
|
420
|
-
* params can be any numerical value like number of receive packets or
|
|
421
|
-
* decoded frames, etc.
|
|
422
|
-
*
|
|
423
|
-
* @private
|
|
424
|
-
* @param {string} mediaType
|
|
425
|
-
* @param {number} previousValue - value to compare
|
|
426
|
-
* @param {number} currentValue - value to compare (must be same type of value as previousValue)
|
|
427
|
-
* @param {boolean} isLocal - true if stats are for local media being sent out, false for remote media being received
|
|
428
|
-
* @memberof StatsAnalyzer
|
|
429
|
-
* @returns {void}
|
|
430
|
-
*/
|
|
431
|
-
emitStartStopEvents = (mediaType, previousValue, currentValue, isLocal) => {
|
|
432
|
-
if (mediaType !== 'audio' && mediaType !== 'video' && mediaType !== 'share') {
|
|
433
|
-
throw new Error(`Unsupported mediaType: ${mediaType}`);
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
// eslint-disable-next-line no-param-reassign
|
|
437
|
-
if (previousValue === undefined) previousValue = 0;
|
|
438
|
-
// eslint-disable-next-line no-param-reassign
|
|
439
|
-
if (currentValue === undefined) currentValue = 0;
|
|
440
|
-
|
|
441
|
-
const lastEmittedEvent = isLocal ? this.lastEmittedStartStopEvent[mediaType].local : this.lastEmittedStartStopEvent[mediaType].remote;
|
|
442
|
-
|
|
443
|
-
let newEvent;
|
|
444
|
-
|
|
445
|
-
if ((currentValue - previousValue) > 0) {
|
|
446
|
-
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STARTED : EVENTS.REMOTE_MEDIA_STARTED;
|
|
447
|
-
}
|
|
448
|
-
else if ((currentValue === previousValue) && currentValue > 0) {
|
|
449
|
-
newEvent = isLocal ? EVENTS.LOCAL_MEDIA_STOPPED : EVENTS.REMOTE_MEDIA_STOPPED;
|
|
450
|
-
}
|
|
451
|
-
|
|
452
|
-
if (newEvent && lastEmittedEvent !== newEvent) {
|
|
453
|
-
if (isLocal) {
|
|
454
|
-
this.lastEmittedStartStopEvent[mediaType].local = newEvent;
|
|
455
|
-
}
|
|
456
|
-
else {
|
|
457
|
-
this.lastEmittedStartStopEvent[mediaType].remote = newEvent;
|
|
458
|
-
}
|
|
459
|
-
this.emit(
|
|
460
|
-
{
|
|
461
|
-
file: 'statsAnalyzer/index',
|
|
462
|
-
function: 'compareLastStatsResult'
|
|
463
|
-
},
|
|
464
|
-
newEvent,
|
|
465
|
-
{
|
|
466
|
-
type: mediaType
|
|
467
|
-
}
|
|
468
|
-
);
|
|
469
|
-
}
|
|
470
|
-
};
|
|
471
|
-
|
|
472
|
-
/**
|
|
473
|
-
* compares current and previous stats to check if packets are not sent
|
|
474
|
-
*
|
|
475
|
-
* @private
|
|
476
|
-
* @memberof StatsAnalyzer
|
|
477
|
-
* @returns {void}
|
|
478
|
-
*/
|
|
479
|
-
compareLastStatsResult() {
|
|
480
|
-
if (this.lastStatsResults !== null && this.meetingMediaStatus) {
|
|
481
|
-
// compare audio stats sent
|
|
482
|
-
let mediaType = STATS.AUDIO_CORRELATE;
|
|
483
|
-
let currentStats = null;
|
|
484
|
-
let previousStats = null;
|
|
485
|
-
|
|
486
|
-
if (this.meetingMediaStatus.expected.sendAudio) {
|
|
487
|
-
currentStats = this.statsResults[mediaType].send;
|
|
488
|
-
previousStats = this.lastStatsResults[mediaType].send;
|
|
489
|
-
|
|
490
|
-
if (currentStats.totalPacketsSent === previousStats.totalPacketsSent || currentStats.totalPacketsSent === 0) {
|
|
491
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} RTP packets sent`);
|
|
492
|
-
}
|
|
493
|
-
else {
|
|
494
|
-
if (currentStats.totalAudioEnergy === previousStats.totalAudioEnergy || currentStats.totalAudioEnergy === 0) {
|
|
495
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} Energy present`);
|
|
496
|
-
}
|
|
497
|
-
|
|
498
|
-
if (currentStats.audioLevel === 0) {
|
|
499
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> ${mediaType} level is 0 for the user`);
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
this.emitStartStopEvents(mediaType, previousStats.totalPacketsSent, currentStats.totalPacketsSent, true);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
if (this.meetingMediaStatus.expected.receiveAudio) {
|
|
507
|
-
// compare audio stats received
|
|
508
|
-
currentStats = this.statsResults[mediaType].recv;
|
|
509
|
-
previousStats = this.lastStatsResults[mediaType].recv;
|
|
510
|
-
|
|
511
|
-
if (currentStats.totalPacketsReceived === previousStats.totalPacketsReceived || currentStats.totalPacketsReceived === 0) {
|
|
512
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} RTP packets received`);
|
|
513
|
-
}
|
|
514
|
-
else if (currentStats.totalSamplesReceived === previousStats.totalSamplesReceived ||
|
|
515
|
-
currentStats.totalSamplesReceived === 0) {
|
|
516
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} samples received`);
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
this.emitStartStopEvents(mediaType, previousStats.totalPacketsReceived, currentStats.totalPacketsReceived, false);
|
|
520
|
-
}
|
|
521
|
-
|
|
522
|
-
mediaType = STATS.VIDEO_CORRELATE;
|
|
523
|
-
if (this.meetingMediaStatus.expected.sendVideo) {
|
|
524
|
-
// compare video stats sent
|
|
525
|
-
currentStats = this.statsResults[mediaType].send;
|
|
526
|
-
previousStats = this.lastStatsResults[mediaType].send;
|
|
527
|
-
|
|
528
|
-
if (currentStats.totalPacketsSent === previousStats.totalPacketsSent || currentStats.totalPacketsSent === 0) {
|
|
529
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} RTP packets sent`);
|
|
530
|
-
}
|
|
531
|
-
else {
|
|
532
|
-
if (currentStats.framesEncoded === previousStats.framesEncoded || currentStats.framesEncoded === 0) {
|
|
533
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} Frames Encoded`);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
if (this.statsResults.resolutions[mediaType].send.framesSent === this.lastStatsResults.resolutions[mediaType].send.framesSent || this.statsResults.resolutions[mediaType].send.framesSent === 0) {
|
|
537
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} Frames sent`);
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
this.emitStartStopEvents(
|
|
542
|
-
mediaType,
|
|
543
|
-
previousStats.framesSent,
|
|
544
|
-
currentStats.framesSent,
|
|
545
|
-
true
|
|
546
|
-
);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
if (this.meetingMediaStatus.expected.receiveVideo) {
|
|
551
|
-
// compare video stats reveived
|
|
552
|
-
|
|
553
|
-
currentStats = this.statsResults[mediaType].recv;
|
|
554
|
-
previousStats = this.lastStatsResults[mediaType].recv;
|
|
555
|
-
|
|
556
|
-
if (currentStats.totalPacketsReceived === previousStats.totalPacketsReceived || currentStats.totalPacketsReceived === 0) {
|
|
557
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} RTP packets received`);
|
|
558
|
-
}
|
|
559
|
-
else {
|
|
560
|
-
if (this.statsResults.resolutions[mediaType].recv.framesReceived === this.lastStatsResults.resolutions[mediaType].recv.framesReceived || this.statsResults.resolutions[mediaType].recv.framesReceived === 0) {
|
|
561
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} frames received`);
|
|
562
|
-
}
|
|
563
|
-
|
|
564
|
-
if (this.statsResults[mediaType].recv.framesDecoded === this.lastStatsResults[mediaType].recv.framesDecoded || this.statsResults.resolutions[mediaType].send.framesDecoded === 0) {
|
|
565
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} frames decoded`);
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
if (this.statsResults.resolutions[mediaType].recv.framesDropped - this.lastStatsResults.resolutions[mediaType].recv.framesDropped > 10) {
|
|
569
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> ${mediaType} frames are getting dropped`);
|
|
570
|
-
}
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
this.emitStartStopEvents(
|
|
574
|
-
mediaType,
|
|
575
|
-
previousStats.framesDecoded,
|
|
576
|
-
currentStats.framesDecoded,
|
|
577
|
-
false
|
|
578
|
-
);
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
mediaType = STATS.SHARE_CORRELATE;
|
|
582
|
-
if (this.meetingMediaStatus.expected.sendShare) {
|
|
583
|
-
// compare share stats sent
|
|
584
|
-
|
|
585
|
-
currentStats = this.statsResults[mediaType].send;
|
|
586
|
-
previousStats = this.lastStatsResults[mediaType].send;
|
|
587
|
-
|
|
588
|
-
if (currentStats.totalPacketsSent === previousStats.totalPacketsSent || currentStats.totalPacketsSent === 0) {
|
|
589
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} RTP packets sent`);
|
|
590
|
-
}
|
|
591
|
-
else {
|
|
592
|
-
if (currentStats.framesEncoded === previousStats.framesEncoded || currentStats.framesEncoded === 0) {
|
|
593
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} frames getting encoded`);
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
if (this.statsResults.resolutions[mediaType].send.framesSent === this.lastStatsResults.resolutions[mediaType].send.framesSent || this.statsResults.resolutions[mediaType].send.framesSent === 0) {
|
|
597
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} frames sent`);
|
|
598
|
-
}
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
// TODO:need to check receive share value
|
|
602
|
-
// compare share stats reveived
|
|
603
|
-
currentStats = this.statsResults[mediaType].recv;
|
|
604
|
-
previousStats = this.lastStatsResults[mediaType].recv;
|
|
605
|
-
|
|
606
|
-
if (currentStats.totalPacketsReceived === previousStats.totalPacketsReceived || currentStats.totalPacketsSent === 0) {
|
|
607
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} RTP packets received`);
|
|
608
|
-
}
|
|
609
|
-
else {
|
|
610
|
-
if (this.statsResults.resolutions[mediaType].recv.framesReceived === this.lastStatsResults.resolutions[mediaType].recv.framesReceived || this.statsResults.resolutions[mediaType].recv.framesReceived === 0) {
|
|
611
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} frames received`);
|
|
612
|
-
}
|
|
613
|
-
|
|
614
|
-
if (this.statsResults[mediaType].recv.framesDecoded === this.lastStatsResults[mediaType].recv.framesDecoded || this.statsResults.resolutions[mediaType].send.framesDecoded === 0) {
|
|
615
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> No ${mediaType} frames decoded`);
|
|
616
|
-
}
|
|
617
|
-
|
|
618
|
-
if (this.statsResults.resolutions[mediaType].recv.framesDropped - this.lastStatsResults.resolutions[mediaType].recv.framesDropped > 10) {
|
|
619
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#compareLastStatsResult --> ${mediaType} frames are getting dropped`);
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
|
-
|
|
623
|
-
// we are not calling emitStartStopEvents() for sending or receiving share because sharing is often started and stopped
|
|
624
|
-
// in meetings and this.meetingMediaStatus.expected values can be out of sync with the actual packet flow
|
|
625
|
-
// so we would send "sharing stopped" events incorrectly
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
/**
|
|
631
|
-
* Does a `getStats` on all the transceivers and parses the results
|
|
632
|
-
*
|
|
633
|
-
* @private
|
|
634
|
-
* @memberof StatsAnalyzer
|
|
635
|
-
* @returns {Promise}
|
|
636
|
-
*/
|
|
637
|
-
getStatsAndParse() {
|
|
638
|
-
if (!this.mediaConnection) {
|
|
639
|
-
return Promise.resolve();
|
|
640
|
-
}
|
|
641
|
-
|
|
642
|
-
if (this.mediaConnection && this.mediaConnection.getConnectionState() === MC.ConnectionState.Failed) {
|
|
643
|
-
LoggerProxy.logger.trace('StatsAnalyzer:index#getStatsAndParse --> media connection is in failed state');
|
|
644
|
-
|
|
645
|
-
return Promise.resolve();
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
LoggerProxy.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Collecting Stats');
|
|
649
|
-
|
|
650
|
-
return this.mediaConnection.getTransceiverStats().then((transceiverStats) => {
|
|
651
|
-
this.filterAndParseGetStatsResults(transceiverStats.video.sender, STATS.VIDEO_CORRELATE, true);
|
|
652
|
-
this.filterAndParseGetStatsResults(transceiverStats.video.receiver, STATS.VIDEO_CORRELATE, false);
|
|
653
|
-
this.filterAndParseGetStatsResults(transceiverStats.audio.sender, STATS.AUDIO_CORRELATE, true);
|
|
654
|
-
this.filterAndParseGetStatsResults(transceiverStats.audio.receiver, STATS.AUDIO_CORRELATE, false);
|
|
655
|
-
this.filterAndParseGetStatsResults(transceiverStats.screenShareVideo.sender, STATS.SHARE_CORRELATE, true);
|
|
656
|
-
this.filterAndParseGetStatsResults(transceiverStats.screenShareVideo.receiver, STATS.SHARE_CORRELATE, false);
|
|
657
|
-
|
|
658
|
-
// updates the current direction of media
|
|
659
|
-
this.statsResults[STATS.AUDIO_CORRELATE].direction = transceiverStats.audio.currentDirection;
|
|
660
|
-
this.statsResults[STATS.VIDEO_CORRELATE].direction = transceiverStats.video.currentDirection;
|
|
661
|
-
this.statsResults[STATS.SHARE_CORRELATE].direction = transceiverStats.screenShareVideo.currentDirection;
|
|
662
|
-
|
|
663
|
-
this.statsResults[STATS.AUDIO_CORRELATE][STATS.SEND_DIRECTION].trackLabel = transceiverStats.audio.localTrackLabel;
|
|
664
|
-
this.statsResults[STATS.VIDEO_CORRELATE][STATS.SEND_DIRECTION].trackLabel = transceiverStats.video.localTrackLabel;
|
|
665
|
-
|
|
666
|
-
this.compareLastStatsResult();
|
|
667
|
-
|
|
668
|
-
// Save the last results to compare with the current
|
|
669
|
-
// DO Deep copy, for some reason it takes the reference all the time rather then old value set
|
|
670
|
-
this.lastStatsResults = JSON.parse(JSON.stringify(this.statsResults));
|
|
671
|
-
|
|
672
|
-
LoggerProxy.logger.trace('StatsAnalyzer:index#getStatsAndParse --> Finished Collecting Stats');
|
|
673
|
-
});
|
|
674
|
-
}
|
|
675
|
-
|
|
676
|
-
/**
|
|
677
|
-
* Processes OutboundRTP stats result and stores
|
|
678
|
-
* @private
|
|
679
|
-
* @param {*} result
|
|
680
|
-
* @param {*} type
|
|
681
|
-
* @returns {void}
|
|
682
|
-
*/
|
|
683
|
-
processOutboundRTPResult(result, type) {
|
|
684
|
-
const mediaType = type || STATS.AUDIO_CORRELATE;
|
|
685
|
-
const sendrecvType = STATS.SEND_DIRECTION;
|
|
686
|
-
|
|
687
|
-
if (result.bytesSent) {
|
|
688
|
-
let kilobytes = 0;
|
|
689
|
-
|
|
690
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].prevBytesSent) {
|
|
691
|
-
this.statsResults.internal[mediaType][sendrecvType].prevBytesSent = result.bytesSent;
|
|
692
|
-
}
|
|
693
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].framesEncoded) {
|
|
694
|
-
this.statsResults.internal[mediaType][sendrecvType].framesEncoded = result.framesEncoded;
|
|
695
|
-
}
|
|
696
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].keyFramesEncoded) {
|
|
697
|
-
this.statsResults.internal[mediaType][sendrecvType].keyFramesEncoded = result.keyFramesEncoded;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
const bytes = result.bytesSent - this.statsResults.internal[mediaType][sendrecvType].prevBytesSent;
|
|
701
|
-
|
|
702
|
-
this.statsResults.internal[mediaType][sendrecvType].prevBytesSent = result.bytesSent;
|
|
703
|
-
|
|
704
|
-
kilobytes = bytes / 1024;
|
|
705
|
-
|
|
706
|
-
this.statsResults[mediaType][sendrecvType].availableBandwidth = kilobytes.toFixed(1);
|
|
707
|
-
this.statsResults[mediaType].bytesSent = kilobytes;
|
|
708
|
-
|
|
709
|
-
this.statsResults[mediaType][sendrecvType].framesEncoded = result.framesEncoded - this.statsResults.internal[mediaType][sendrecvType].framesEncoded;
|
|
710
|
-
this.statsResults[mediaType][sendrecvType].keyFramesEncoded = result.keyFramesEncoded - this.statsResults.internal[mediaType][sendrecvType].keyFramesEncoded;
|
|
711
|
-
this.statsResults.internal[mediaType].outboundRtpId = result.id;
|
|
712
|
-
|
|
713
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].packetsSent) {
|
|
714
|
-
this.statsResults.internal[mediaType][sendrecvType].packetsSent = result.packetsSent;
|
|
715
|
-
}
|
|
716
|
-
|
|
717
|
-
this.statsResults[mediaType][sendrecvType].packetsSent = result.packetsSent - this.statsResults.internal[mediaType][sendrecvType].packetsSent;
|
|
718
|
-
this.statsResults.internal[mediaType][sendrecvType].packetsSent = result.packetsSent;
|
|
719
|
-
|
|
720
|
-
// Data saved to send MQA metrics
|
|
721
|
-
|
|
722
|
-
this.statsResults[mediaType][sendrecvType].totalKeyFramesEncoded = result.keyFramesEncoded;
|
|
723
|
-
this.statsResults[mediaType][sendrecvType].totalNackCount = result.nackCount;
|
|
724
|
-
this.statsResults[mediaType][sendrecvType].totalPliCount = result.pliCount;
|
|
725
|
-
this.statsResults[mediaType][sendrecvType].totalPacketsSent = result.packetsSent;
|
|
726
|
-
this.statsResults[mediaType][sendrecvType].totalFirCount = result.firCount;
|
|
727
|
-
this.statsResults[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
728
|
-
this.statsResults[mediaType][sendrecvType].framesEncoded = result.framesEncoded;
|
|
729
|
-
this.statsResults[mediaType][sendrecvType].encoderImplementation = result.encoderImplementation;
|
|
730
|
-
this.statsResults[mediaType][sendrecvType].qualityLimitationReason = result.qualityLimitationReason;
|
|
731
|
-
this.statsResults[mediaType][sendrecvType].qualityLimitationResolutionChanges = result.qualityLimitationResolutionChanges;
|
|
732
|
-
this.statsResults[mediaType][sendrecvType].retransmittedPacketsSent = result.retransmittedPacketsSent;
|
|
733
|
-
this.statsResults[mediaType][sendrecvType].totalBytesSent = result.bytesSent;
|
|
734
|
-
this.statsResults[mediaType][sendrecvType].headerBytesSent = result.headerBytesSent;
|
|
735
|
-
this.statsResults[mediaType][sendrecvType].retransmittedBytesSent = result.retransmittedBytesSent;
|
|
736
|
-
}
|
|
737
|
-
}
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
/**
|
|
741
|
-
* Processes InboundRTP stats result and stores
|
|
742
|
-
* @private
|
|
743
|
-
* @param {*} result
|
|
744
|
-
* @param {*} type
|
|
745
|
-
* @returns {void}
|
|
746
|
-
*/
|
|
747
|
-
processInboundRTPResult(result, type) {
|
|
748
|
-
const mediaType = type || STATS.AUDIO_CORRELATE;
|
|
749
|
-
const sendrecvType = STATS.RECEIVE_DIRECTION;
|
|
750
|
-
|
|
751
|
-
if (result.bytesReceived) {
|
|
752
|
-
let kilobytes = 0;
|
|
753
|
-
|
|
754
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived) {
|
|
755
|
-
this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived = result.bytesReceived;
|
|
756
|
-
}
|
|
757
|
-
|
|
758
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].pliCount) {
|
|
759
|
-
this.statsResults.internal[mediaType][sendrecvType].pliCount = result.pliCount;
|
|
760
|
-
}
|
|
761
|
-
|
|
762
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].packetsLost) {
|
|
763
|
-
this.statsResults.internal[mediaType][sendrecvType].packetsLost = result.packetsLost;
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived) {
|
|
767
|
-
this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived = result.packetsReceived;
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
if (!this.statsResults.internal[mediaType][sendrecvType].lastPacketReceivedTimestamp) {
|
|
771
|
-
this.statsResults.internal[mediaType][sendrecvType].lastPacketReceivedTimestamp = result.lastPacketReceivedTimestamp;
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
const bytes = result.bytesReceived - (this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived);
|
|
775
|
-
|
|
776
|
-
this.statsResults.internal[mediaType][sendrecvType].prevBytesReceived = result.bytesReceived;
|
|
777
|
-
|
|
778
|
-
kilobytes = bytes / 1024;
|
|
779
|
-
this.statsResults[mediaType][sendrecvType].availableBandwidth = kilobytes.toFixed(1);
|
|
780
|
-
this.statsResults[mediaType].bytesReceived = kilobytes.toFixed(1);
|
|
781
|
-
|
|
782
|
-
this.statsResults[mediaType][sendrecvType].pliCount = result.pliCount - this.statsResults.internal[mediaType][sendrecvType].pliCount;
|
|
783
|
-
this.statsResults[mediaType][sendrecvType].currentPacketsLost = result.packetsLost - this.statsResults.internal[mediaType][sendrecvType].packetsLost;
|
|
784
|
-
if (this.statsResults[mediaType][sendrecvType].currentPacketsLost < 0) {
|
|
785
|
-
this.statsResults[mediaType][sendrecvType].currentPacketsLost = 0;
|
|
786
|
-
}
|
|
787
|
-
|
|
788
|
-
this.statsResults[mediaType][sendrecvType].packetsReceived = result.packetsReceived - this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived;
|
|
789
|
-
this.statsResults.internal[mediaType][sendrecvType].totalPacketsReceived = result.packetsReceived;
|
|
790
|
-
|
|
791
|
-
if (this.statsResults[mediaType][sendrecvType].packetsReceived === 0) {
|
|
792
|
-
LoggerProxy.logger.info(`StatsAnalyzer:index#processInboundRTPResult --> No packets received for ${mediaType} `, this.statsResults[mediaType][sendrecvType].packetsReceived);
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
// Check the over all packet Lost ratio
|
|
796
|
-
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;
|
|
797
|
-
if (this.statsResults[mediaType][sendrecvType].currentPacketLossRatio > 3) {
|
|
798
|
-
LoggerProxy.logger.info('StatsAnalyzer:index#processInboundRTPResult --> Packets getting lost from the receiver ', this.statsResults[mediaType][sendrecvType].currentPacketLossRatio);
|
|
799
|
-
}
|
|
800
|
-
|
|
801
|
-
// TODO: check the packet loss value is negative values here
|
|
802
|
-
|
|
803
|
-
if (result.packetsLost) {
|
|
804
|
-
this.statsResults[mediaType][sendrecvType].totalPacketsLost = result.packetsLost > 0 ? result.packetsLost : -result.packetsLost;
|
|
805
|
-
}
|
|
806
|
-
else {
|
|
807
|
-
this.statsResults[mediaType][sendrecvType].totalPacketsLost = 0;
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
this.statsResults[mediaType][sendrecvType].lastPacketReceivedTimestamp = result.lastPacketReceivedTimestamp;
|
|
811
|
-
|
|
812
|
-
// From Thin
|
|
813
|
-
this.statsResults[mediaType][sendrecvType].totalNackCount = result.nackCount;
|
|
814
|
-
this.statsResults[mediaType][sendrecvType].totalPliCount = result.pliCount;
|
|
815
|
-
this.statsResults[mediaType][sendrecvType].framesDecoded = result.framesDecoded;
|
|
816
|
-
this.statsResults[mediaType][sendrecvType].keyFramesDecoded = result.keyFramesDecoded;
|
|
817
|
-
|
|
818
|
-
this.statsResults[mediaType][sendrecvType].decoderImplementation = result.decoderImplementation;
|
|
819
|
-
this.statsResults[mediaType][sendrecvType].totalPacketsReceived = result.packetsReceived;
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
this.statsResults[mediaType][sendrecvType].fecPacketsDiscarded = result.fecPacketsDiscarded;
|
|
823
|
-
this.statsResults[mediaType][sendrecvType].fecPacketsReceived = result.fecPacketsReceived;
|
|
824
|
-
this.statsResults[mediaType][sendrecvType].totalBytesReceived = result.bytesReceived;
|
|
825
|
-
this.statsResults[mediaType][sendrecvType].headerBytesReceived = result.headerBytesReceived;
|
|
826
|
-
|
|
827
|
-
this.statsResults[mediaType][sendrecvType].meanRtpJitter.push(result.jitter);
|
|
828
|
-
|
|
829
|
-
// Audio stats
|
|
830
|
-
|
|
831
|
-
this.statsResults[mediaType][sendrecvType].audioLevel = result.audioLevel;
|
|
832
|
-
this.statsResults[mediaType][sendrecvType].totalAudioEnergy = result.totalAudioEnergy;
|
|
833
|
-
this.statsResults[mediaType][sendrecvType].totalSamplesReceived = result.totalSamplesReceived || 0;
|
|
834
|
-
this.statsResults[mediaType][sendrecvType].totalSamplesDecoded = result.totalSamplesDecoded || 0;
|
|
835
|
-
this.statsResults[mediaType][sendrecvType].concealedSamples = result.concealedSamples || 0;
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
|
|
839
|
-
/**
|
|
840
|
-
* Processes remote and local candidate result and stores
|
|
841
|
-
* @private
|
|
842
|
-
* @param {*} result
|
|
843
|
-
* @param {*} type
|
|
844
|
-
* @param {boolean} isSender
|
|
845
|
-
* @param {boolean} isRemote
|
|
846
|
-
*
|
|
847
|
-
* @returns {void}
|
|
848
|
-
*/
|
|
849
|
-
parseCandidate = (result, type, isSender, isRemote) => {
|
|
850
|
-
if (!result || !result.id) {
|
|
851
|
-
return;
|
|
852
|
-
}
|
|
853
|
-
const RemoteCandidateType = {};
|
|
854
|
-
const RemoteTransport = {};
|
|
855
|
-
const RemoteIpAddress = {};
|
|
856
|
-
const RemoteNetworkType = {};
|
|
857
|
-
|
|
858
|
-
if (!result.id) return;
|
|
859
|
-
|
|
860
|
-
const sendRecvType = isSender ? STATS.SEND_DIRECTION : STATS.RECEIVE_DIRECTION;
|
|
861
|
-
const ipType = isRemote ? STATS.REMOTE : STATS.LOCAL;
|
|
862
|
-
|
|
863
|
-
if (!RemoteCandidateType[result.id]) {
|
|
864
|
-
RemoteCandidateType[result.id] = [];
|
|
865
|
-
}
|
|
866
|
-
|
|
867
|
-
if (!RemoteTransport[result.id]) {
|
|
868
|
-
RemoteTransport[result.id] = [];
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
if (!RemoteIpAddress[result.id]) {
|
|
872
|
-
RemoteIpAddress[result.id] = [];
|
|
873
|
-
}
|
|
874
|
-
if (!RemoteNetworkType[result.id]) {
|
|
875
|
-
RemoteNetworkType[result.id] = [];
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
if (result.candidateType && RemoteCandidateType[result.id].indexOf(result.candidateType) === -1) {
|
|
879
|
-
RemoteCandidateType[result.id].push(result.candidateType);
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
if (result.protocol && RemoteTransport[result.id].indexOf(result.protocol) === -1) {
|
|
883
|
-
RemoteTransport[result.id].push(result.protocol.toUpperCase());
|
|
884
|
-
}
|
|
885
|
-
|
|
886
|
-
if (result.ip && RemoteIpAddress[result.id].indexOf(`${result.ip}:${result.portNumber}`) === -1) {
|
|
887
|
-
RemoteIpAddress[result.id].push(`${result.ip}`); // TODO: Add ports
|
|
888
|
-
}
|
|
889
|
-
|
|
890
|
-
if (result.networkType && RemoteNetworkType[result.id].indexOf(result.networkType) === -1) {
|
|
891
|
-
RemoteNetworkType[result.id].push(result.networkType);
|
|
892
|
-
}
|
|
893
|
-
|
|
894
|
-
this.statsResults.internal.candidates[result.id] = {
|
|
895
|
-
candidateType: RemoteCandidateType[result.id],
|
|
896
|
-
ipAddress: RemoteIpAddress[result.id],
|
|
897
|
-
portNumber: result.port,
|
|
898
|
-
networkType: RemoteNetworkType[result.id],
|
|
899
|
-
priority: result.priority,
|
|
900
|
-
transport: RemoteTransport[result.id],
|
|
901
|
-
timestamp: result.time,
|
|
902
|
-
id: result.id,
|
|
903
|
-
type: result.type
|
|
904
|
-
};
|
|
905
|
-
|
|
906
|
-
this.statsResults.connectionType[ipType].candidateType = RemoteCandidateType[result.id];
|
|
907
|
-
this.statsResults.connectionType[ipType].ipAddress = RemoteIpAddress[result.id];
|
|
908
|
-
|
|
909
|
-
this.statsResults.connectionType[ipType].networkType = RemoteNetworkType[result.id][0] === NETWORK_TYPE.VPN ? NETWORK_TYPE.UNKNOWN : RemoteNetworkType[result.id][0];
|
|
910
|
-
this.statsResults.connectionType[ipType].transport = RemoteTransport[result.id];
|
|
911
|
-
|
|
912
|
-
this.statsResults[type][sendRecvType].totalRoundTripTime = result.totalRoundTripTime;
|
|
913
|
-
};
|
|
914
|
-
|
|
915
|
-
/**
|
|
916
|
-
* Process Track results
|
|
917
|
-
*
|
|
918
|
-
* @private
|
|
919
|
-
* @param {*} result
|
|
920
|
-
* @param {*} mediaType
|
|
921
|
-
* @returns {void}
|
|
922
|
-
* @memberof StatsAnalyzer
|
|
923
|
-
*/
|
|
924
|
-
processTrackResult(result, mediaType) {
|
|
925
|
-
if (!result || result.type !== 'track') {
|
|
926
|
-
return;
|
|
927
|
-
}
|
|
928
|
-
if (result.type !== 'track') return;
|
|
929
|
-
|
|
930
|
-
const sendrecvType = result.remoteSource === true ? STATS.RECEIVE_DIRECTION : STATS.SEND_DIRECTION;
|
|
931
|
-
|
|
932
|
-
if (result.frameWidth && result.frameHeight) {
|
|
933
|
-
this.statsResults.resolutions[mediaType][sendrecvType].width = result.frameWidth;
|
|
934
|
-
this.statsResults.resolutions[mediaType][sendrecvType].height = result.frameHeight;
|
|
935
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesSent = result.framesSent;
|
|
936
|
-
this.statsResults.resolutions[mediaType][sendrecvType].hugeFramesSent = result.hugeFramesSent;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
if (sendrecvType === STATS.RECEIVE_DIRECTION) {
|
|
940
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesReceived = result.framesReceived;
|
|
941
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesDecoded = result.framesDecoded;
|
|
942
|
-
this.statsResults.resolutions[mediaType][sendrecvType].framesDropped = result.framesDropped;
|
|
943
|
-
}
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
if (result.trackIdentifier && mediaType !== STATS.AUDIO_CORRELATE) {
|
|
947
|
-
this.statsResults.resolutions[mediaType][sendrecvType].trackIdentifier = result.trackIdentifier;
|
|
948
|
-
|
|
949
|
-
const jitterBufferDelay = result && result.jitterBufferDelay;
|
|
950
|
-
const jitterBufferEmittedCount = result && result.jitterBufferEmittedCount;
|
|
951
|
-
|
|
952
|
-
this.statsResults.resolutions[mediaType][sendrecvType].avgJitterDelay = jitterBufferEmittedCount && (+jitterBufferDelay / +jitterBufferEmittedCount);
|
|
953
|
-
|
|
954
|
-
// Used to calculate the jitter
|
|
955
|
-
this.statsResults.resolutions[mediaType][sendrecvType].jitterBufferDelay = result.jitterBufferDelay;
|
|
956
|
-
this.statsResults.resolutions[mediaType][sendrecvType].jitterBufferEmittedCount = result.jitterBufferEmittedCount;
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
/**
|
|
961
|
-
*
|
|
962
|
-
* @private
|
|
963
|
-
* @param {*} result
|
|
964
|
-
* @param {*} type
|
|
965
|
-
* @returns {void}
|
|
966
|
-
* @memberof StatsAnalyzer
|
|
967
|
-
*/
|
|
968
|
-
compareSentAndReceived(result, type) {
|
|
969
|
-
if (!type) {
|
|
970
|
-
return;
|
|
971
|
-
}
|
|
972
|
-
|
|
973
|
-
const mediaType = type;
|
|
974
|
-
|
|
975
|
-
if (!this.statsResults.internal[mediaType].send.totalPacketsLostOnReceiver) { this.statsResults.internal[mediaType].send.totalPacketsLostOnReceiver = result.packetsLost; }
|
|
976
|
-
|
|
977
|
-
const currentPacketLoss = result.packetsLost - this.statsResults.internal[mediaType].send.totalPacketsLostOnReceiver;
|
|
978
|
-
|
|
979
|
-
this.statsResults.internal[mediaType].send.totalPacketsLostOnReceiver = result.packetsLost;
|
|
980
|
-
this.statsResults[mediaType].send.packetsLostOnReceiver = currentPacketLoss;
|
|
981
|
-
this.statsResults[mediaType].send.totalPacketsLostOnReceiver = result.packetsLost;
|
|
982
|
-
|
|
983
|
-
this.statsResults[mediaType].send.meanRemoteJitter.push(result.jitter);
|
|
984
|
-
this.statsResults[mediaType].send.meanRoundTripTime.push(result.roundTripTime);
|
|
985
|
-
|
|
986
|
-
this.statsResults[mediaType].send.timestamp = result.timestamp;
|
|
987
|
-
this.statsResults[mediaType].send.ssrc = result.ssrc;
|
|
988
|
-
this.statsResults[mediaType].send.reportsReceived = result.reportsReceived;
|
|
989
|
-
|
|
990
|
-
// Total packloss ratio on this video section of the call
|
|
991
|
-
this.statsResults[mediaType].send.overAllPacketLossRatio = this.statsResults[mediaType].send.totalPacketsLostOnReceiver > 0 ? this.statsResults[mediaType].send.totalPacketsLostOnReceiver / this.statsResults[mediaType].send.totalPacketsSent : 0;
|
|
992
|
-
this.statsResults[mediaType].send.currentPacketLossRatio = this.statsResults[mediaType].send.packetsLostOnReceiver > 0 ? this.statsResults[mediaType].send.packetsLostOnReceiver * 100 / (this.statsResults[mediaType].send.packetsSent + this.statsResults[mediaType].send.packetsLostOnReceiver) : 0;
|
|
993
|
-
|
|
994
|
-
if (this.statsResults[mediaType].send.maxPacketLossRatio < this.statsResults[mediaType].send.currentPacketLossRatio) {
|
|
995
|
-
this.statsResults[mediaType].send.maxPacketLossRatio = this.statsResults[mediaType].send.currentPacketLossRatio;
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
if (result.type === 'remote-inbound-rtp') {
|
|
999
|
-
this.networkQualityMonitor.determineUplinkNetworkQuality({
|
|
1000
|
-
mediaType,
|
|
1001
|
-
remoteRtpResults: result,
|
|
1002
|
-
statsAnalyzerCurrentStats: this.statsResults
|
|
1003
|
-
});
|
|
1004
|
-
}
|
|
1005
|
-
}
|
|
1006
|
-
}
|