@webex/plugin-meetings 2.60.1-next.9 → 2.60.2
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 +8 -58
- package/dist/common/browser-detection.js +3 -2
- package/dist/common/browser-detection.js.map +1 -1
- package/dist/common/collection.js +4 -3
- package/dist/common/collection.js.map +1 -1
- package/dist/common/config.js +2 -1
- package/dist/common/config.js.map +1 -1
- package/dist/common/errors/captcha-error.js +2 -1
- package/dist/common/errors/captcha-error.js.map +1 -1
- package/dist/common/errors/intent-to-join.js +2 -1
- package/dist/common/errors/intent-to-join.js.map +1 -1
- package/dist/common/errors/join-meeting.js +2 -1
- package/dist/common/errors/join-meeting.js.map +1 -1
- package/dist/common/errors/media.js +2 -1
- package/dist/common/errors/media.js.map +1 -1
- package/dist/common/errors/parameter.js +4 -3
- package/dist/common/errors/parameter.js.map +1 -1
- package/dist/common/errors/password-error.js +2 -1
- package/dist/common/errors/password-error.js.map +1 -1
- package/dist/common/errors/permission.js +2 -1
- package/dist/common/errors/permission.js.map +1 -1
- package/dist/common/errors/{reclaim-host-role-errors.js → reclaim-host-role-error.js} +11 -7
- package/dist/common/errors/reclaim-host-role-error.js.map +1 -0
- package/dist/common/errors/reconnection-in-progress.js +2 -1
- package/dist/common/errors/reconnection-in-progress.js.map +1 -1
- package/dist/common/errors/reconnection.js +2 -1
- package/dist/common/errors/reconnection.js.map +1 -1
- package/dist/common/errors/stats.js +2 -1
- package/dist/common/errors/stats.js.map +1 -1
- package/dist/common/errors/webex-errors.d.ts +8 -20
- package/dist/common/errors/webex-errors.js +28 -48
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/common/errors/webex-meetings-error.js +2 -1
- package/dist/common/errors/webex-meetings-error.js.map +1 -1
- package/dist/common/events/events-scope.js +2 -1
- package/dist/common/events/events-scope.js.map +1 -1
- package/dist/common/events/events.js +2 -1
- package/dist/common/events/events.js.map +1 -1
- package/dist/common/events/trigger-proxy.js +2 -1
- package/dist/common/events/trigger-proxy.js.map +1 -1
- package/dist/common/events/util.js +2 -1
- package/dist/common/events/util.js.map +1 -1
- package/dist/common/logs/logger-config.js +2 -1
- package/dist/common/logs/logger-config.js.map +1 -1
- package/dist/common/logs/logger-proxy.js +3 -2
- package/dist/common/logs/logger-proxy.js.map +1 -1
- package/dist/common/logs/request.d.ts +1 -3
- package/dist/common/logs/request.js +5 -8
- package/dist/common/logs/request.js.map +1 -1
- package/dist/common/queue.d.ts +7 -9
- package/dist/common/queue.js +9 -22
- package/dist/common/queue.js.map +1 -1
- package/dist/config.d.ts +7 -6
- package/dist/config.js +10 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +100 -234
- package/dist/constants.js +444 -433
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.js +6 -3
- package/dist/controls-options-manager/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.d.ts +1 -11
- package/dist/controls-options-manager/enums.js +6 -15
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/index.d.ts +1 -17
- package/dist/controls-options-manager/index.js +38 -127
- package/dist/controls-options-manager/index.js.map +1 -1
- package/dist/controls-options-manager/util.d.ts +7 -1
- package/dist/controls-options-manager/util.js +19 -309
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/index.d.ts +3 -6
- package/dist/index.js +5 -121
- package/dist/index.js.map +1 -1
- package/dist/locus-info/controlsUtils.js +11 -100
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/embeddedAppsUtils.js +4 -3
- package/dist/locus-info/embeddedAppsUtils.js.map +1 -1
- package/dist/locus-info/fullState.js +2 -1
- package/dist/locus-info/fullState.js.map +1 -1
- package/dist/locus-info/hostUtils.js +2 -1
- package/dist/locus-info/hostUtils.js.map +1 -1
- package/dist/locus-info/index.d.ts +4 -57
- package/dist/locus-info/index.js +84 -425
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.js +5 -13
- package/dist/locus-info/infoUtils.js.map +1 -1
- package/dist/locus-info/mediaSharesUtils.js +3 -58
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/parser.d.ts +6 -66
- package/dist/locus-info/parser.js +80 -253
- package/dist/locus-info/parser.js.map +1 -1
- package/dist/locus-info/selfUtils.js +13 -97
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.d.ts +0 -2
- package/dist/media/index.js +319 -107
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.d.ts +53 -38
- package/dist/media/properties.js +153 -96
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.js +22 -1
- package/dist/media/util.js.map +1 -1
- package/dist/mediaQualityMetrics/config.d.ts +230 -234
- package/dist/mediaQualityMetrics/config.js +498 -302
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/effectsState.d.ts +42 -0
- package/dist/meeting/effectsState.js +260 -0
- package/dist/meeting/effectsState.js.map +1 -0
- package/dist/meeting/in-meeting-actions.d.ts +0 -88
- package/dist/meeting/in-meeting-actions.js +3 -94
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.d.ts +520 -705
- package/dist/meeting/index.js +3083 -5041
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.d.ts +25 -93
- package/dist/meeting/muteState.js +133 -224
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.d.ts +47 -82
- package/dist/meeting/request.js +199 -304
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/state.js +2 -1
- package/dist/meeting/state.js.map +1 -1
- package/dist/meeting/util.d.ts +1 -118
- package/dist/meeting/util.js +435 -676
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/collection.js +4 -3
- package/dist/meeting-info/collection.js.map +1 -1
- package/dist/meeting-info/index.d.ts +1 -13
- package/dist/meeting-info/index.js +7 -74
- package/dist/meeting-info/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.d.ts +1 -31
- package/dist/meeting-info/meeting-info-v2.js +63 -200
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.js +2 -1
- package/dist/meeting-info/request.js.map +1 -1
- package/dist/meeting-info/util.js +3 -2
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +41 -39
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.d.ts +0 -17
- package/dist/meetings/collection.js +4 -42
- package/dist/meetings/collection.js.map +1 -1
- package/dist/meetings/index.d.ts +20 -114
- package/dist/meetings/index.js +133 -540
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/request.js +3 -4
- package/dist/meetings/request.js.map +1 -1
- package/dist/meetings/util.js +6 -107
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.d.ts +1 -13
- package/dist/member/index.js +2 -45
- package/dist/member/index.js.map +1 -1
- package/dist/member/member.types.js +4 -3
- package/dist/member/member.types.js.map +1 -1
- package/dist/member/util.js +29 -120
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.d.ts +0 -5
- package/dist/members/collection.js +2 -11
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.d.ts +11 -56
- package/dist/members/index.js +47 -174
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.d.ts +11 -67
- package/dist/members/request.js +54 -102
- package/dist/members/request.js.map +1 -1
- package/dist/members/types.js +4 -3
- package/dist/members/types.js.map +1 -1
- package/dist/members/util.d.ts +1 -214
- package/dist/members/util.js +284 -327
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.d.ts +169 -0
- package/dist/metrics/config.js +289 -0
- package/dist/metrics/config.js.map +1 -0
- package/dist/metrics/constants.d.ts +6 -15
- package/dist/metrics/constants.js +9 -17
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.d.ts +111 -4
- package/dist/metrics/index.js +452 -4
- package/dist/metrics/index.js.map +1 -1
- package/dist/networkQualityMonitor/index.js +4 -5
- package/dist/networkQualityMonitor/index.js.map +1 -1
- package/dist/peer-connection-manager/index.d.ts +6 -0
- package/dist/peer-connection-manager/index.js +671 -0
- package/dist/peer-connection-manager/index.js.map +1 -0
- package/dist/peer-connection-manager/util.d.ts +6 -0
- package/dist/peer-connection-manager/util.js +110 -0
- package/dist/peer-connection-manager/util.js.map +1 -0
- package/dist/personal-meeting-room/index.js +3 -2
- package/dist/personal-meeting-room/index.js.map +1 -1
- package/dist/personal-meeting-room/request.js +3 -2
- package/dist/personal-meeting-room/request.js.map +1 -1
- package/dist/personal-meeting-room/util.js +2 -1
- package/dist/personal-meeting-room/util.js.map +1 -1
- package/dist/reachability/index.d.ts +95 -61
- package/dist/reachability/index.js +392 -304
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.d.ts +3 -7
- package/dist/reachability/request.js +10 -18
- package/dist/reachability/request.js.map +1 -1
- package/dist/reactions/reactions.d.ts +2 -2
- package/dist/reactions/reactions.js +6 -4
- package/dist/reactions/reactions.js.map +1 -1
- package/dist/reactions/reactions.type.d.ts +3 -23
- package/dist/reactions/reactions.type.js +23 -21
- package/dist/reactions/reactions.type.js.map +1 -1
- package/dist/reconnection-manager/index.d.ts +8 -32
- package/dist/reconnection-manager/index.js +232 -285
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/enums.js +5 -4
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.d.ts +1 -15
- package/dist/recording-controller/index.js +46 -57
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.d.ts +4 -5
- package/dist/recording-controller/util.js +10 -10
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/collection.d.ts +10 -0
- package/dist/roap/collection.js +63 -0
- package/dist/roap/collection.js.map +1 -0
- package/dist/roap/handler.d.ts +47 -0
- package/dist/roap/handler.js +279 -0
- package/dist/roap/handler.js.map +1 -0
- package/dist/roap/index.d.ts +47 -9
- package/dist/roap/index.js +238 -100
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.d.ts +12 -18
- package/dist/roap/request.js +180 -126
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/state.d.ts +9 -0
- package/dist/roap/state.js +127 -0
- package/dist/roap/state.js.map +1 -0
- package/dist/roap/turnDiscovery.d.ts +16 -27
- package/dist/roap/turnDiscovery.js +105 -115
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/util.d.ts +2 -0
- package/dist/roap/util.js +76 -0
- package/dist/roap/util.js.map +1 -0
- package/dist/statsAnalyzer/global.d.ts +83 -1
- package/dist/statsAnalyzer/global.js +85 -2
- package/dist/statsAnalyzer/global.js.map +1 -1
- package/dist/statsAnalyzer/index.d.ts +30 -50
- package/dist/statsAnalyzer/index.js +511 -436
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +6 -8
- package/dist/statsAnalyzer/mqaUtil.js +90 -130
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/transcription/index.js +2 -1
- package/dist/transcription/index.js.map +1 -1
- package/package.json +26 -39
- package/src/common/errors/webex-errors.ts +12 -36
- package/src/common/logs/logger-proxy.ts +1 -1
- package/src/common/logs/request.ts +1 -5
- package/src/common/queue.ts +8 -22
- package/src/config.ts +7 -6
- package/src/constants.ts +100 -265
- package/src/controls-options-manager/enums.ts +0 -12
- package/src/controls-options-manager/index.ts +21 -116
- package/src/controls-options-manager/util.ts +14 -294
- package/src/index.js +15 -0
- package/src/locus-info/controlsUtils.ts +0 -110
- package/src/locus-info/index.ts +61 -450
- package/src/locus-info/infoUtils.ts +2 -14
- package/src/locus-info/mediaSharesUtils.ts +0 -64
- package/src/locus-info/parser.ts +47 -258
- package/src/locus-info/selfUtils.ts +2 -85
- package/src/media/index.ts +370 -153
- package/src/media/properties.ts +136 -106
- package/src/media/util.ts +21 -0
- package/src/mediaQualityMetrics/config.ts +377 -244
- package/src/meeting/effectsState.ts +209 -0
- package/src/meeting/in-meeting-actions.ts +0 -176
- package/src/meeting/index.ts +2581 -4306
- package/src/meeting/muteState.ts +138 -224
- package/src/meeting/request.ts +127 -214
- package/src/meeting/util.ts +423 -687
- package/src/meeting-info/index.ts +8 -81
- package/src/meeting-info/meeting-info-v2.ts +13 -163
- package/src/meeting-info/util.ts +1 -1
- package/src/meeting-info/utilv2.ts +28 -28
- package/src/meetings/collection.ts +0 -33
- package/src/meetings/index.ts +136 -531
- package/src/meetings/request.ts +0 -2
- package/src/meetings/util.ts +5 -116
- package/src/member/index.ts +1 -43
- package/src/member/util.ts +28 -125
- package/src/members/collection.ts +0 -8
- package/src/members/index.ts +52 -187
- package/src/members/request.ts +27 -87
- package/src/members/util.ts +291 -332
- package/src/metrics/config.ts +485 -0
- package/src/metrics/constants.ts +6 -15
- package/src/metrics/index.ts +471 -1
- package/src/networkQualityMonitor/index.ts +6 -6
- package/src/peer-connection-manager/index.ts +847 -0
- package/src/peer-connection-manager/util.ts +119 -0
- package/src/reachability/index.ts +347 -246
- package/src/reachability/request.ts +8 -17
- package/src/reactions/reactions.ts +4 -4
- package/src/reactions/reactions.type.ts +4 -30
- package/src/reconnection-manager/index.ts +156 -168
- package/src/recording-controller/index.ts +3 -20
- package/src/recording-controller/util.ts +9 -26
- package/src/roap/collection.ts +62 -0
- package/src/roap/handler.ts +294 -0
- package/src/roap/index.ts +241 -96
- package/src/roap/request.ts +148 -74
- package/src/roap/state.ts +156 -0
- package/src/roap/turnDiscovery.ts +56 -62
- package/src/roap/util.ts +100 -0
- package/src/statsAnalyzer/global.ts +84 -1
- package/src/statsAnalyzer/index.ts +645 -479
- package/src/statsAnalyzer/mqaUtil.ts +126 -128
- package/test/integration/spec/journey.js +264 -320
- package/test/integration/spec/space-meeting.js +4 -77
- package/test/unit/spec/common/queue.js +2 -31
- package/test/unit/spec/controls-options-manager/index.js +0 -163
- package/test/unit/spec/controls-options-manager/util.js +60 -576
- package/test/unit/spec/fixture/locus.js +0 -1
- package/test/unit/spec/locus-info/controlsUtils.js +30 -323
- package/test/unit/spec/locus-info/index.js +15 -1437
- package/test/unit/spec/locus-info/infoUtils.js +16 -54
- package/test/unit/spec/locus-info/lib/SeqCmp.json +0 -16
- package/test/unit/spec/locus-info/lib/selfConstant.js +0 -48
- package/test/unit/spec/locus-info/parser.js +35 -116
- package/test/unit/spec/locus-info/selfUtils.js +0 -275
- package/test/unit/spec/media/properties.ts +84 -75
- package/test/unit/spec/meeting/effectsState.js +281 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +0 -86
- package/test/unit/spec/meeting/index.js +2313 -8384
- package/test/unit/spec/meeting/muteState.js +213 -409
- package/test/unit/spec/meeting/request.js +43 -523
- package/test/unit/spec/meeting/utils.js +24 -834
- package/test/unit/spec/meeting-info/meetinginfov2.js +5 -527
- package/test/unit/spec/meeting-info/utilv2.js +0 -21
- package/test/unit/spec/meetings/collection.js +0 -26
- package/test/unit/spec/meetings/index.js +232 -1445
- package/test/unit/spec/meetings/utils.js +2 -202
- package/test/unit/spec/member/index.js +9 -32
- package/test/unit/spec/member/util.js +61 -499
- package/test/unit/spec/members/index.js +5 -394
- package/test/unit/spec/members/request.js +27 -206
- package/test/unit/spec/members/utils.js +38 -173
- package/test/unit/spec/metrics/index.js +50 -1
- package/test/unit/spec/networkQualityMonitor/index.js +4 -4
- package/test/unit/spec/peerconnection-manager/index.js +218 -0
- package/test/unit/spec/peerconnection-manager/utils.js +49 -0
- package/test/unit/spec/peerconnection-manager/utils.test-fixtures.ts +388 -0
- package/test/unit/spec/reachability/index.ts +24 -532
- package/test/unit/spec/reconnection-manager/index.js +24 -163
- package/test/unit/spec/recording-controller/index.js +218 -293
- package/test/unit/spec/recording-controller/util.js +96 -223
- package/test/unit/spec/roap/index.ts +77 -187
- package/test/unit/spec/roap/turnDiscovery.ts +48 -86
- package/test/unit/spec/roap/util.js +30 -0
- package/test/unit/spec/stats-analyzer/index.js +165 -644
- package/test/utils/testUtils.js +45 -0
- package/test/utils/webex-config.js +0 -4
- package/test/utils/webex-test-users.js +3 -7
- package/dist/annotation/annotation.types.d.ts +0 -42
- package/dist/annotation/annotation.types.js +0 -7
- package/dist/annotation/annotation.types.js.map +0 -1
- package/dist/annotation/constants.d.ts +0 -31
- package/dist/annotation/constants.js +0 -41
- package/dist/annotation/constants.js.map +0 -1
- package/dist/annotation/index.d.ts +0 -117
- package/dist/annotation/index.js +0 -357
- package/dist/annotation/index.js.map +0 -1
- package/dist/breakouts/breakout.d.ts +0 -8
- package/dist/breakouts/breakout.js +0 -215
- package/dist/breakouts/breakout.js.map +0 -1
- package/dist/breakouts/collection.d.ts +0 -5
- package/dist/breakouts/collection.js +0 -22
- package/dist/breakouts/collection.js.map +0 -1
- package/dist/breakouts/edit-lock-error.d.ts +0 -15
- package/dist/breakouts/edit-lock-error.js +0 -51
- package/dist/breakouts/edit-lock-error.js.map +0 -1
- package/dist/breakouts/events.d.ts +0 -8
- package/dist/breakouts/events.js +0 -44
- package/dist/breakouts/events.js.map +0 -1
- package/dist/breakouts/index.d.ts +0 -5
- package/dist/breakouts/index.js +0 -1047
- package/dist/breakouts/index.js.map +0 -1
- package/dist/breakouts/request.d.ts +0 -22
- package/dist/breakouts/request.js +0 -77
- package/dist/breakouts/request.js.map +0 -1
- package/dist/breakouts/utils.d.ts +0 -15
- package/dist/breakouts/utils.js +0 -64
- package/dist/breakouts/utils.js.map +0 -1
- package/dist/common/errors/no-meeting-info.d.ts +0 -14
- package/dist/common/errors/no-meeting-info.js +0 -50
- package/dist/common/errors/no-meeting-info.js.map +0 -1
- package/dist/common/errors/reclaim-host-role-errors.js.map +0 -1
- package/dist/controls-options-manager/types.d.ts +0 -43
- package/dist/controls-options-manager/types.js +0 -7
- package/dist/controls-options-manager/types.js.map +0 -1
- package/dist/interceptors/index.d.ts +0 -2
- package/dist/interceptors/index.js +0 -15
- package/dist/interceptors/index.js.map +0 -1
- package/dist/interceptors/locusRetry.d.ts +0 -27
- package/dist/interceptors/locusRetry.js +0 -94
- package/dist/interceptors/locusRetry.js.map +0 -1
- package/dist/interpretation/collection.d.ts +0 -5
- package/dist/interpretation/collection.js +0 -22
- package/dist/interpretation/collection.js.map +0 -1
- package/dist/interpretation/index.d.ts +0 -5
- package/dist/interpretation/index.js +0 -365
- package/dist/interpretation/index.js.map +0 -1
- package/dist/interpretation/siLanguage.d.ts +0 -5
- package/dist/interpretation/siLanguage.js +0 -24
- package/dist/interpretation/siLanguage.js.map +0 -1
- package/dist/meeting/locusMediaRequest.d.ts +0 -74
- package/dist/meeting/locusMediaRequest.js +0 -291
- package/dist/meeting/locusMediaRequest.js.map +0 -1
- package/dist/meeting/request.type.d.ts +0 -11
- package/dist/meeting/request.type.js +0 -7
- package/dist/meeting/request.type.js.map +0 -1
- package/dist/meeting/voicea-meeting.d.ts +0 -20
- package/dist/meeting/voicea-meeting.js +0 -201
- package/dist/meeting/voicea-meeting.js.map +0 -1
- package/dist/meetings/meetings.types.d.ts +0 -4
- package/dist/meetings/meetings.types.js +0 -7
- package/dist/meetings/meetings.types.js.map +0 -1
- package/dist/member/types.d.ts +0 -32
- package/dist/member/types.js +0 -23
- package/dist/member/types.js.map +0 -1
- package/dist/multistream/mediaRequestManager.d.ts +0 -118
- package/dist/multistream/mediaRequestManager.js +0 -344
- package/dist/multistream/mediaRequestManager.js.map +0 -1
- package/dist/multistream/receiveSlot.d.ts +0 -68
- package/dist/multistream/receiveSlot.js +0 -200
- package/dist/multistream/receiveSlot.js.map +0 -1
- package/dist/multistream/receiveSlotManager.d.ts +0 -56
- package/dist/multistream/receiveSlotManager.js +0 -174
- package/dist/multistream/receiveSlotManager.js.map +0 -1
- package/dist/multistream/remoteMedia.d.ts +0 -72
- package/dist/multistream/remoteMedia.js +0 -268
- package/dist/multistream/remoteMedia.js.map +0 -1
- package/dist/multistream/remoteMediaGroup.d.ts +0 -47
- package/dist/multistream/remoteMediaGroup.js +0 -267
- package/dist/multistream/remoteMediaGroup.js.map +0 -1
- package/dist/multistream/remoteMediaManager.d.ts +0 -285
- package/dist/multistream/remoteMediaManager.js +0 -1211
- package/dist/multistream/remoteMediaManager.js.map +0 -1
- package/dist/multistream/sendSlotManager.d.ts +0 -61
- package/dist/multistream/sendSlotManager.js +0 -236
- package/dist/multistream/sendSlotManager.js.map +0 -1
- package/dist/reachability/clusterReachability.d.ts +0 -109
- package/dist/reachability/clusterReachability.js +0 -357
- package/dist/reachability/clusterReachability.js.map +0 -1
- package/dist/reachability/util.d.ts +0 -8
- package/dist/reachability/util.js +0 -29
- package/dist/reachability/util.js.map +0 -1
- package/dist/reactions/constants.d.ts +0 -3
- package/dist/reactions/constants.js +0 -12
- package/dist/reactions/constants.js.map +0 -1
- package/dist/rtcMetrics/constants.d.ts +0 -4
- package/dist/rtcMetrics/constants.js +0 -11
- package/dist/rtcMetrics/constants.js.map +0 -1
- package/dist/rtcMetrics/index.d.ts +0 -54
- package/dist/rtcMetrics/index.js +0 -140
- package/dist/rtcMetrics/index.js.map +0 -1
- package/dist/webinar/collection.d.ts +0 -16
- package/dist/webinar/collection.js +0 -43
- package/dist/webinar/collection.js.map +0 -1
- package/dist/webinar/index.d.ts +0 -5
- package/dist/webinar/index.js +0 -68
- package/dist/webinar/index.js.map +0 -1
- package/src/annotation/annotation.types.ts +0 -50
- package/src/annotation/constants.ts +0 -36
- package/src/annotation/index.ts +0 -328
- package/src/breakouts/README.md +0 -220
- package/src/breakouts/breakout.ts +0 -188
- package/src/breakouts/collection.ts +0 -19
- package/src/breakouts/edit-lock-error.ts +0 -25
- package/src/breakouts/events.ts +0 -56
- package/src/breakouts/index.ts +0 -925
- package/src/breakouts/request.ts +0 -55
- package/src/breakouts/utils.ts +0 -57
- package/src/common/errors/no-meeting-info.ts +0 -24
- package/src/controls-options-manager/types.ts +0 -59
- package/src/index.ts +0 -44
- package/src/interceptors/index.ts +0 -3
- package/src/interceptors/locusRetry.ts +0 -67
- package/src/interpretation/README.md +0 -60
- package/src/interpretation/collection.ts +0 -19
- package/src/interpretation/index.ts +0 -332
- package/src/interpretation/siLanguage.ts +0 -18
- package/src/meeting/locusMediaRequest.ts +0 -313
- package/src/meeting/request.type.ts +0 -13
- package/src/meeting/voicea-meeting.ts +0 -161
- package/src/meetings/meetings.types.ts +0 -12
- package/src/member/types.ts +0 -38
- package/src/multistream/mediaRequestManager.ts +0 -440
- package/src/multistream/receiveSlot.ts +0 -184
- package/src/multistream/receiveSlotManager.ts +0 -166
- package/src/multistream/remoteMedia.ts +0 -254
- package/src/multistream/remoteMediaGroup.ts +0 -284
- package/src/multistream/remoteMediaManager.ts +0 -1145
- package/src/multistream/sendSlotManager.ts +0 -170
- package/src/reachability/clusterReachability.ts +0 -320
- package/src/reachability/util.ts +0 -24
- package/src/reactions/constants.ts +0 -4
- package/src/rtcMetrics/constants.ts +0 -3
- package/src/rtcMetrics/index.ts +0 -124
- package/src/webinar/collection.ts +0 -31
- package/src/webinar/index.ts +0 -62
- package/test/integration/spec/converged-space-meetings.js +0 -233
- package/test/unit/spec/annotation/index.ts +0 -418
- package/test/unit/spec/breakouts/breakout.ts +0 -237
- package/test/unit/spec/breakouts/collection.ts +0 -15
- package/test/unit/spec/breakouts/edit-lock-error.ts +0 -30
- package/test/unit/spec/breakouts/events.ts +0 -89
- package/test/unit/spec/breakouts/index.ts +0 -1790
- package/test/unit/spec/breakouts/request.ts +0 -104
- package/test/unit/spec/breakouts/utils.js +0 -72
- package/test/unit/spec/interceptors/locusRetry.ts +0 -131
- package/test/unit/spec/interpretation/collection.ts +0 -15
- package/test/unit/spec/interpretation/index.ts +0 -589
- package/test/unit/spec/interpretation/siLanguage.ts +0 -28
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +0 -32
- package/test/unit/spec/media/index.ts +0 -290
- package/test/unit/spec/meeting/locusMediaRequest.ts +0 -442
- package/test/unit/spec/meeting-info/index.js +0 -300
- package/test/unit/spec/multistream/mediaRequestManager.ts +0 -1418
- package/test/unit/spec/multistream/receiveSlot.ts +0 -163
- package/test/unit/spec/multistream/receiveSlotManager.ts +0 -203
- package/test/unit/spec/multistream/remoteMedia.ts +0 -255
- package/test/unit/spec/multistream/remoteMediaGroup.ts +0 -662
- package/test/unit/spec/multistream/remoteMediaManager.ts +0 -1924
- package/test/unit/spec/multistream/sendSlotManager.ts +0 -242
- package/test/unit/spec/reachability/clusterReachability.ts +0 -279
- package/test/unit/spec/reachability/request.js +0 -68
- package/test/unit/spec/reachability/util.ts +0 -40
- package/test/unit/spec/roap/request.ts +0 -255
- package/test/unit/spec/rtcMetrics/index.ts +0 -93
- package/test/unit/spec/webinar/collection.ts +0 -13
- package/test/unit/spec/webinar/index.ts +0 -60
- package/test/utils/constants.js +0 -9
- package/test/utils/integrationTestUtils.js +0 -46
- /package/dist/common/errors/{reclaim-host-role-errors.d.ts → reclaim-host-role-error.d.ts} +0 -0
- /package/src/common/errors/{reclaim-host-role-errors.ts → reclaim-host-role-error.ts} +0 -0
|
@@ -9,35 +9,26 @@ exports.default = void 0;
|
|
|
9
9
|
var _regenerator = _interopRequireDefault(require("@babel/runtime-corejs2/regenerator"));
|
|
10
10
|
var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
|
|
11
11
|
var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/values"));
|
|
12
|
-
var
|
|
12
|
+
var _now = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/date/now"));
|
|
13
13
|
var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/keys"));
|
|
14
14
|
var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
|
|
15
|
-
var
|
|
15
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
16
16
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
17
17
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
18
18
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
19
19
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
20
|
-
var
|
|
20
|
+
var _uniq2 = _interopRequireDefault(require("lodash/uniq"));
|
|
21
21
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
22
|
-
var _util = _interopRequireDefault(require("../meeting/util"));
|
|
23
22
|
var _constants = require("../constants");
|
|
24
23
|
var _request = _interopRequireDefault(require("./request"));
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
*/
|
|
29
|
-
/* eslint-disable class-methods-use-this */
|
|
30
|
-
/**
|
|
31
|
-
* This is the type that matches what backend expects us to send to them. It is a bit weird, because
|
|
32
|
-
* it uses strings instead of booleans and numbers, but that's what they require.
|
|
33
|
-
*/
|
|
34
|
-
// this is the type that is required by the backend when we send them reachability results
|
|
35
|
-
// this is the type used by Reachability class internally and stored in local storage
|
|
24
|
+
var DEFAULT_TIMEOUT = 3000;
|
|
25
|
+
var VIDEO_MESH_TIMEOUT = 1000;
|
|
26
|
+
|
|
36
27
|
/**
|
|
37
28
|
* @class Reachability
|
|
38
29
|
* @export
|
|
39
30
|
*/
|
|
40
|
-
var Reachability =
|
|
31
|
+
var Reachability = /*#__PURE__*/function () {
|
|
41
32
|
/**
|
|
42
33
|
* Creates an instance of Reachability.
|
|
43
34
|
* @param {object} webex
|
|
@@ -45,10 +36,9 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
45
36
|
*/
|
|
46
37
|
function Reachability(webex) {
|
|
47
38
|
(0, _classCallCheck2.default)(this, Reachability);
|
|
48
|
-
(0, _defineProperty2.default)(this, "namespace", _constants.REACHABILITY.namespace);
|
|
49
39
|
(0, _defineProperty2.default)(this, "webex", void 0);
|
|
50
40
|
(0, _defineProperty2.default)(this, "reachabilityRequest", void 0);
|
|
51
|
-
(0, _defineProperty2.default)(this, "
|
|
41
|
+
(0, _defineProperty2.default)(this, "clusterLatencyResults", void 0);
|
|
52
42
|
this.webex = webex;
|
|
53
43
|
|
|
54
44
|
/**
|
|
@@ -59,58 +49,69 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
59
49
|
* @memberof Reachability
|
|
60
50
|
*/
|
|
61
51
|
this.reachabilityRequest = new _request.default(this.webex);
|
|
62
|
-
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* internal object of clusters latency results
|
|
55
|
+
* @instance
|
|
56
|
+
* @type {object}
|
|
57
|
+
* @private
|
|
58
|
+
* @memberof Reachability
|
|
59
|
+
*/
|
|
60
|
+
this.clusterLatencyResults = {};
|
|
63
61
|
}
|
|
64
62
|
|
|
65
63
|
/**
|
|
66
|
-
*
|
|
67
|
-
* @returns {
|
|
64
|
+
* fetches reachability data
|
|
65
|
+
* @returns {Object} reachability data
|
|
68
66
|
* @public
|
|
67
|
+
* @async
|
|
69
68
|
* @memberof Reachability
|
|
70
69
|
*/
|
|
71
70
|
(0, _createClass2.default)(Reachability, [{
|
|
72
71
|
key: "gatherReachability",
|
|
73
|
-
value:
|
|
72
|
+
value: function () {
|
|
74
73
|
var _gatherReachability = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
75
|
-
var
|
|
74
|
+
var _window, _window$localStorage;
|
|
75
|
+
var clusters, results;
|
|
76
76
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
77
77
|
while (1) switch (_context.prev = _context.next) {
|
|
78
78
|
case 0:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
79
|
+
this.setup();
|
|
80
|
+
|
|
81
|
+
// Remove stored reachability results to ensure no stale data
|
|
82
|
+
if (!((_window = window) !== null && _window !== void 0 && (_window$localStorage = _window.localStorage) !== null && _window$localStorage !== void 0 && _window$localStorage.removeItem)) {
|
|
83
|
+
_context.next = 5;
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
window.localStorage.removeItem(_constants.REACHABILITY.localStorage);
|
|
86
87
|
_context.next = 7;
|
|
87
|
-
|
|
88
|
+
break;
|
|
89
|
+
case 5:
|
|
90
|
+
_loggerProxy.default.logger.error('Reachability:index#gatherReachability --> Error in accessing LocalStorage.');
|
|
91
|
+
return _context.abrupt("return", {});
|
|
88
92
|
case 7:
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
93
|
+
_context.prev = 7;
|
|
94
|
+
_context.next = 10;
|
|
95
|
+
return this.reachabilityRequest.getClusters();
|
|
96
|
+
case 10:
|
|
97
|
+
clusters = _context.sent;
|
|
98
|
+
_context.next = 13;
|
|
99
|
+
return this.performReachabilityCheck(clusters);
|
|
100
|
+
case 13:
|
|
95
101
|
results = _context.sent;
|
|
96
|
-
|
|
97
|
-
return this.webex.boundedStorage.put(this.namespace, _constants.REACHABILITY.localStorageResult, (0, _stringify.default)(results));
|
|
98
|
-
case 15:
|
|
99
|
-
_context.next = 17;
|
|
100
|
-
return this.webex.boundedStorage.put(this.namespace, _constants.REACHABILITY.localStorageJoinCookie, (0, _stringify.default)(joinCookie));
|
|
101
|
-
case 17:
|
|
102
|
+
window.localStorage.setItem(_constants.REACHABILITY.localStorage, (0, _stringify.default)(results));
|
|
102
103
|
_loggerProxy.default.logger.log('Reachability:index#gatherReachability --> Reachability checks completed');
|
|
103
104
|
return _context.abrupt("return", results);
|
|
104
|
-
case
|
|
105
|
-
_context.prev =
|
|
106
|
-
_context.t0 = _context["catch"](
|
|
107
|
-
_loggerProxy.default.logger.error("Reachability:index#gatherReachability --> Error:"
|
|
105
|
+
case 19:
|
|
106
|
+
_context.prev = 19;
|
|
107
|
+
_context.t0 = _context["catch"](7);
|
|
108
|
+
_loggerProxy.default.logger.error("Reachability:index#gatherReachability --> Error in calling getClusters(): ".concat(_context.t0));
|
|
108
109
|
return _context.abrupt("return", {});
|
|
109
|
-
case
|
|
110
|
+
case 23:
|
|
110
111
|
case "end":
|
|
111
112
|
return _context.stop();
|
|
112
113
|
}
|
|
113
|
-
}, _callee, this, [[
|
|
114
|
+
}, _callee, this, [[7, 19]]);
|
|
114
115
|
}));
|
|
115
116
|
function gatherReachability() {
|
|
116
117
|
return _gatherReachability.apply(this, arguments);
|
|
@@ -118,235 +119,271 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
118
119
|
return gatherReachability;
|
|
119
120
|
}()
|
|
120
121
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
124
|
-
* @
|
|
122
|
+
* fetches reachability data and checks for cluster reachability
|
|
123
|
+
* @returns {boolean}
|
|
124
|
+
* @public
|
|
125
|
+
* @memberof Reachability
|
|
125
126
|
*/
|
|
126
|
-
)
|
|
127
127
|
}, {
|
|
128
|
-
key: "
|
|
129
|
-
value:
|
|
130
|
-
var
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
reachability_vmn_tcp_success: 0,
|
|
143
|
-
reachability_vmn_tcp_failed: 0
|
|
144
|
-
};
|
|
145
|
-
updateStats = function updateStats(clusterType, result) {
|
|
146
|
-
if (result.udp && result.udp.result !== 'untested') {
|
|
147
|
-
var outcome = result.udp.result === 'reachable' ? 'success' : 'failed';
|
|
148
|
-
stats["reachability_".concat(clusterType, "_udp_").concat(outcome)] += 1;
|
|
149
|
-
}
|
|
150
|
-
if (result.tcp && result.tcp.result !== 'untested') {
|
|
151
|
-
var _outcome = result.tcp.result === 'reachable' ? 'success' : 'failed';
|
|
152
|
-
stats["reachability_".concat(clusterType, "_tcp_").concat(_outcome)] += 1;
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
_context2.prev = 2;
|
|
156
|
-
_context2.next = 5;
|
|
157
|
-
return this.webex.boundedStorage.get(_constants.REACHABILITY.namespace, _constants.REACHABILITY.localStorageResult);
|
|
158
|
-
case 5:
|
|
159
|
-
resultsJson = _context2.sent;
|
|
160
|
-
results = JSON.parse(resultsJson);
|
|
161
|
-
(0, _values.default)(results).forEach(function (result) {
|
|
162
|
-
updateStats(result.isVideoMesh ? 'vmn' : 'public', result);
|
|
163
|
-
});
|
|
164
|
-
_context2.next = 13;
|
|
165
|
-
break;
|
|
166
|
-
case 10:
|
|
167
|
-
_context2.prev = 10;
|
|
168
|
-
_context2.t0 = _context2["catch"](2);
|
|
169
|
-
// empty storage, that's ok
|
|
170
|
-
_loggerProxy.default.logger.warn('Roap:request#getReachabilityMetrics --> Error parsing reachability data: ', _context2.t0);
|
|
171
|
-
case 13:
|
|
172
|
-
return _context2.abrupt("return", stats);
|
|
173
|
-
case 14:
|
|
174
|
-
case "end":
|
|
175
|
-
return _context2.stop();
|
|
176
|
-
}
|
|
177
|
-
}, _callee2, this, [[2, 10]]);
|
|
178
|
-
}));
|
|
179
|
-
function getReachabilityMetrics() {
|
|
180
|
-
return _getReachabilityMetrics.apply(this, arguments);
|
|
128
|
+
key: "isAnyClusterReachable",
|
|
129
|
+
value: function isAnyClusterReachable() {
|
|
130
|
+
var reachable = false;
|
|
131
|
+
var reachabilityData = window.localStorage.getItem(_constants.REACHABILITY.localStorage);
|
|
132
|
+
if (reachabilityData) {
|
|
133
|
+
try {
|
|
134
|
+
var reachabilityResults = JSON.parse(reachabilityData);
|
|
135
|
+
reachable = (0, _values.default)(reachabilityResults).some(function (result) {
|
|
136
|
+
var _result$udp, _result$tcp;
|
|
137
|
+
return ((_result$udp = result.udp) === null || _result$udp === void 0 ? void 0 : _result$udp.reachable) === 'true' || ((_result$tcp = result.tcp) === null || _result$tcp === void 0 ? void 0 : _result$tcp.reachable) === 'true';
|
|
138
|
+
});
|
|
139
|
+
} catch (e) {
|
|
140
|
+
_loggerProxy.default.logger.error("Roap:request#attachReachabilityData --> Error in parsing reachability data: ".concat(e));
|
|
141
|
+
}
|
|
181
142
|
}
|
|
182
|
-
return
|
|
183
|
-
}
|
|
143
|
+
return reachable;
|
|
144
|
+
}
|
|
145
|
+
|
|
184
146
|
/**
|
|
185
|
-
*
|
|
186
|
-
* @param {
|
|
187
|
-
* @returns {
|
|
147
|
+
* Generate peerConnection config settings
|
|
148
|
+
* @param {object} cluster
|
|
149
|
+
* @returns {object} peerConnectionConfig
|
|
150
|
+
* @private
|
|
151
|
+
* @memberof Reachability
|
|
188
152
|
*/
|
|
189
|
-
)
|
|
190
153
|
}, {
|
|
191
|
-
key: "
|
|
192
|
-
value: function
|
|
193
|
-
var
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
output.reachable = 'false';
|
|
206
|
-
break;
|
|
207
|
-
case 'untested':
|
|
208
|
-
output.untested = 'true';
|
|
209
|
-
break;
|
|
210
|
-
}
|
|
211
|
-
break;
|
|
212
|
-
case 'latencyInMilliseconds':
|
|
213
|
-
output.latencyInMilliseconds = value.toString();
|
|
214
|
-
break;
|
|
215
|
-
default:
|
|
216
|
-
output[_key] = value;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
return output;
|
|
154
|
+
key: "buildPeerConnectionConfig",
|
|
155
|
+
value: function buildPeerConnectionConfig(cluster) {
|
|
156
|
+
var iceServers = (0, _uniq2.default)([].concat((0, _toConsumableArray2.default)(cluster.udp), (0, _toConsumableArray2.default)(cluster.tcp))).map(function (url) {
|
|
157
|
+
return {
|
|
158
|
+
username: '',
|
|
159
|
+
credential: '',
|
|
160
|
+
urls: [url]
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
return {
|
|
164
|
+
iceServers: (0, _toConsumableArray2.default)(iceServers),
|
|
165
|
+
iceCandidatePoolSize: '0',
|
|
166
|
+
iceTransportPolicy: 'all'
|
|
167
|
+
};
|
|
220
168
|
}
|
|
221
169
|
|
|
222
170
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
225
|
-
* @returns {
|
|
171
|
+
* Creates an RTCPeerConnection
|
|
172
|
+
* @param {object} cluster
|
|
173
|
+
* @returns {RTCPeerConnection} peerConnection
|
|
174
|
+
* @private
|
|
175
|
+
* @memberof Reachability
|
|
226
176
|
*/
|
|
227
177
|
}, {
|
|
228
|
-
key: "
|
|
229
|
-
value:
|
|
230
|
-
var
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
allClusterResults = JSON.parse(resultsJson);
|
|
242
|
-
results = (0, _lodash.mapValues)(allClusterResults, function (clusterResult) {
|
|
243
|
-
return {
|
|
244
|
-
udp: _this.mapTransportResultToBackendDataFormat(clusterResult.udp || {
|
|
245
|
-
result: 'untested'
|
|
246
|
-
}),
|
|
247
|
-
tcp: _this.mapTransportResultToBackendDataFormat(clusterResult.tcp || {
|
|
248
|
-
result: 'untested'
|
|
249
|
-
}),
|
|
250
|
-
xtls: _this.mapTransportResultToBackendDataFormat(clusterResult.xtls || {
|
|
251
|
-
result: 'untested'
|
|
252
|
-
})
|
|
253
|
-
};
|
|
254
|
-
});
|
|
255
|
-
_context3.next = 11;
|
|
256
|
-
break;
|
|
257
|
-
case 8:
|
|
258
|
-
_context3.prev = 8;
|
|
259
|
-
_context3.t0 = _context3["catch"](0);
|
|
260
|
-
// empty storage, that's ok
|
|
261
|
-
_loggerProxy.default.logger.warn('Roap:request#attachReachabilityData --> Error parsing reachability data: ', _context3.t0);
|
|
262
|
-
case 11:
|
|
263
|
-
return _context3.abrupt("return", results);
|
|
264
|
-
case 12:
|
|
265
|
-
case "end":
|
|
266
|
-
return _context3.stop();
|
|
267
|
-
}
|
|
268
|
-
}, _callee3, this, [[0, 8]]);
|
|
269
|
-
}));
|
|
270
|
-
function getReachabilityResults() {
|
|
271
|
-
return _getReachabilityResults.apply(this, arguments);
|
|
178
|
+
key: "createPeerConnection",
|
|
179
|
+
value: function createPeerConnection(cluster) {
|
|
180
|
+
var key = cluster.key,
|
|
181
|
+
config = cluster.config;
|
|
182
|
+
try {
|
|
183
|
+
var peerConnection = new window.RTCPeerConnection(config);
|
|
184
|
+
|
|
185
|
+
// @ts-ignore
|
|
186
|
+
peerConnection.key = key;
|
|
187
|
+
return peerConnection;
|
|
188
|
+
} catch (peerConnectionError) {
|
|
189
|
+
_loggerProxy.default.logger.log("Reachability:index#createPeerConnection --> Error creating peerConnection: ".concat(peerConnectionError));
|
|
190
|
+
return null;
|
|
272
191
|
}
|
|
273
|
-
|
|
274
|
-
|
|
192
|
+
}
|
|
193
|
+
|
|
275
194
|
/**
|
|
276
|
-
*
|
|
277
|
-
* @
|
|
278
|
-
* @
|
|
195
|
+
* Gets total elapsed time
|
|
196
|
+
* @param {RTCPeerConnection} peerConnection
|
|
197
|
+
* @returns {Number} Milliseconds
|
|
198
|
+
* @private
|
|
279
199
|
* @memberof Reachability
|
|
280
200
|
*/
|
|
281
|
-
)
|
|
282
201
|
}, {
|
|
283
|
-
key: "
|
|
284
|
-
value:
|
|
285
|
-
var
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
202
|
+
key: "getElapsedTime",
|
|
203
|
+
value: function getElapsedTime(peerConnection) {
|
|
204
|
+
var startTime = peerConnection.begin;
|
|
205
|
+
delete peerConnection.begin;
|
|
206
|
+
return (0, _now.default)() - startTime;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* creates offer and generates localSDP
|
|
211
|
+
* @param {object} clusterList cluster List
|
|
212
|
+
* @returns {Promise} Reachability latency results
|
|
213
|
+
* @private
|
|
214
|
+
* @memberof Reachability
|
|
215
|
+
*/
|
|
216
|
+
}, {
|
|
217
|
+
key: "getLocalSDPForClusters",
|
|
218
|
+
value: function getLocalSDPForClusters(clusterList) {
|
|
219
|
+
var _this = this;
|
|
220
|
+
var clusters = (0, _toConsumableArray2.default)((0, _keys.default)(clusterList));
|
|
221
|
+
clusters = clusters.map( /*#__PURE__*/function () {
|
|
222
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(key) {
|
|
223
|
+
var cluster, config, peerConnection, description;
|
|
224
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
225
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
226
|
+
case 0:
|
|
227
|
+
cluster = clusterList[key];
|
|
228
|
+
config = _this.buildPeerConnectionConfig(cluster);
|
|
229
|
+
peerConnection = _this.createPeerConnection({
|
|
230
|
+
key: key,
|
|
231
|
+
config: config
|
|
232
|
+
});
|
|
233
|
+
_context2.next = 5;
|
|
234
|
+
return peerConnection.createOffer({
|
|
235
|
+
offerToReceiveAudio: true
|
|
236
|
+
});
|
|
237
|
+
case 5:
|
|
238
|
+
description = _context2.sent;
|
|
239
|
+
// @ts-ignore
|
|
240
|
+
peerConnection.begin = (0, _now.default)();
|
|
241
|
+
peerConnection.setLocalDescription(description);
|
|
242
|
+
return _context2.abrupt("return", _this.iceGatheringState(peerConnection, cluster.isVideoMesh ? VIDEO_MESH_TIMEOUT : DEFAULT_TIMEOUT).catch(function (iceGatheringStateError) {
|
|
243
|
+
_loggerProxy.default.logger.log("Reachability:index#getLocalSDPForClusters --> Error in getLocalSDP : ".concat(iceGatheringStateError));
|
|
244
|
+
}));
|
|
245
|
+
case 9:
|
|
246
|
+
case "end":
|
|
247
|
+
return _context2.stop();
|
|
248
|
+
}
|
|
249
|
+
}, _callee2);
|
|
250
|
+
}));
|
|
251
|
+
return function (_x) {
|
|
252
|
+
return _ref.apply(this, arguments);
|
|
253
|
+
};
|
|
254
|
+
}());
|
|
255
|
+
return _promise.default.all(clusters).then(this.parseIceResultsToReachabilityResults).then(function (reachabilityLatencyResults) {
|
|
256
|
+
_this.logUnreachableClusters();
|
|
257
|
+
|
|
258
|
+
// return results
|
|
259
|
+
return reachabilityLatencyResults;
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
|
|
318
263
|
/**
|
|
319
264
|
* Get list of all unreachable clusters
|
|
320
265
|
* @returns {array} Unreachable clusters
|
|
321
266
|
* @private
|
|
322
267
|
* @memberof Reachability
|
|
323
268
|
*/
|
|
324
|
-
)
|
|
325
269
|
}, {
|
|
326
|
-
key: "
|
|
327
|
-
value: function
|
|
270
|
+
key: "getUnreachablClusters",
|
|
271
|
+
value: function getUnreachablClusters() {
|
|
328
272
|
var unreachableList = [];
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
if (result.udp.result === 'unreachable') {
|
|
335
|
-
unreachableList.push({
|
|
336
|
-
name: key,
|
|
337
|
-
protocol: 'udp'
|
|
338
|
-
});
|
|
339
|
-
}
|
|
340
|
-
if (result.tcp.result === 'unreachable') {
|
|
341
|
-
unreachableList.push({
|
|
342
|
-
name: key,
|
|
343
|
-
protocol: 'tcp'
|
|
344
|
-
});
|
|
273
|
+
var clusters = this.clusterLatencyResults;
|
|
274
|
+
(0, _keys.default)(clusters).forEach(function (key) {
|
|
275
|
+
var cluster = clusters[key];
|
|
276
|
+
if (cluster.unreachable && !cluster.reachable) {
|
|
277
|
+
unreachableList.push(key);
|
|
345
278
|
}
|
|
346
279
|
});
|
|
347
280
|
return unreachableList;
|
|
348
281
|
}
|
|
349
282
|
|
|
283
|
+
/**
|
|
284
|
+
* Attach an event handler for the icegatheringstatechange
|
|
285
|
+
* event and measure latency.
|
|
286
|
+
* @param {RTCPeerConnection} peerConnection
|
|
287
|
+
* @returns {undefined}
|
|
288
|
+
* @private
|
|
289
|
+
* @memberof Reachability
|
|
290
|
+
*/
|
|
291
|
+
}, {
|
|
292
|
+
key: "handleIceGatheringStateChange",
|
|
293
|
+
value: function handleIceGatheringStateChange(peerConnection) {
|
|
294
|
+
var _this2 = this;
|
|
295
|
+
peerConnection.onicegatheringstatechange = function () {
|
|
296
|
+
var COMPLETE = _constants.ICE_GATHERING_STATE.COMPLETE;
|
|
297
|
+
if (peerConnection.iceConnectionState === COMPLETE) {
|
|
298
|
+
var elapsed = _this2.getElapsedTime(peerConnection);
|
|
299
|
+
|
|
300
|
+
// @ts-ignore
|
|
301
|
+
_loggerProxy.default.logger.log( // @ts-ignore
|
|
302
|
+
"Reachability:index#onIceGatheringStateChange --> Successfully pinged ".concat(peerConnection.key, ":"), elapsed);
|
|
303
|
+
_this2.setLatencyAndClose(peerConnection, elapsed);
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/**
|
|
309
|
+
* Attach an event handler for the icecandidate
|
|
310
|
+
* event and measure latency.
|
|
311
|
+
* @param {RTCPeerConnection} peerConnection
|
|
312
|
+
* @returns {undefined}
|
|
313
|
+
* @private
|
|
314
|
+
* @memberof Reachability
|
|
315
|
+
*/
|
|
316
|
+
}, {
|
|
317
|
+
key: "handleOnIceCandidate",
|
|
318
|
+
value: function handleOnIceCandidate(peerConnection) {
|
|
319
|
+
var _this3 = this;
|
|
320
|
+
peerConnection.onicecandidate = function (e) {
|
|
321
|
+
var SERVER_REFLEXIVE = 'srflx';
|
|
322
|
+
if (e.candidate && String(e.candidate.type).toLowerCase() === SERVER_REFLEXIVE) {
|
|
323
|
+
var elapsed = _this3.getElapsedTime(peerConnection);
|
|
324
|
+
_loggerProxy.default.logger.log( // @ts-ignore
|
|
325
|
+
"Reachability:index#onIceCandidate --> Successfully pinged ".concat(peerConnection.key, ":"), elapsed);
|
|
326
|
+
_this3.setLatencyAndClose(peerConnection, elapsed);
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* An event handler on an RTCPeerConnection when the state of the ICE
|
|
333
|
+
* candidate gathering process changes. Used to measure connection
|
|
334
|
+
* speed.
|
|
335
|
+
* @private
|
|
336
|
+
* @param {RTCPeerConnection} peerConnection
|
|
337
|
+
* @param {number} timeout
|
|
338
|
+
* @returns {Promise}
|
|
339
|
+
*/
|
|
340
|
+
}, {
|
|
341
|
+
key: "iceGatheringState",
|
|
342
|
+
value: function iceGatheringState(peerConnection, timeout) {
|
|
343
|
+
var _this4 = this;
|
|
344
|
+
var ELAPSED = 'elapsed';
|
|
345
|
+
return new _promise.default(function (resolve) {
|
|
346
|
+
var peerConnectionProxy = new window.Proxy(peerConnection, {
|
|
347
|
+
get: function get(target, property) {
|
|
348
|
+
var targetMember = target[property];
|
|
349
|
+
if (typeof targetMember === 'function') {
|
|
350
|
+
return targetMember.bind(target);
|
|
351
|
+
}
|
|
352
|
+
return targetMember;
|
|
353
|
+
},
|
|
354
|
+
set: function set(target, property, value) {
|
|
355
|
+
// only intercept elapsed property
|
|
356
|
+
if (property === ELAPSED) {
|
|
357
|
+
// @ts-ignore
|
|
358
|
+
resolve({
|
|
359
|
+
clusterId: peerConnection.key,
|
|
360
|
+
elapsed: value
|
|
361
|
+
});
|
|
362
|
+
return true;
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// pass thru
|
|
366
|
+
return window.Reflect.set(target, property, value);
|
|
367
|
+
}
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
// Using peerConnection proxy so handle functions below
|
|
371
|
+
// won't be coupled to our promise implementation
|
|
372
|
+
_this4.handleIceGatheringStateChange(peerConnectionProxy);
|
|
373
|
+
_this4.handleOnIceCandidate(peerConnectionProxy);
|
|
374
|
+
|
|
375
|
+
// Set maximum timeout
|
|
376
|
+
window.setTimeout(function () {
|
|
377
|
+
var CLOSED = _constants.CONNECTION_STATE.CLOSED;
|
|
378
|
+
|
|
379
|
+
// Close any open peerConnections
|
|
380
|
+
if (peerConnectionProxy.connectionState !== CLOSED) {
|
|
381
|
+
_this4.setLatencyAndClose(peerConnectionProxy, null);
|
|
382
|
+
}
|
|
383
|
+
}, timeout);
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
|
|
350
387
|
/**
|
|
351
388
|
* Make a log of unreachable clusters.
|
|
352
389
|
* @returns {undefined}
|
|
@@ -356,71 +393,122 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
356
393
|
}, {
|
|
357
394
|
key: "logUnreachableClusters",
|
|
358
395
|
value: function logUnreachableClusters() {
|
|
359
|
-
var list = this.
|
|
360
|
-
list.forEach(function (
|
|
361
|
-
|
|
362
|
-
protocol = _ref3.protocol;
|
|
363
|
-
_loggerProxy.default.logger.log("Reachability:index#logUnreachableClusters --> failed to reach ".concat(name, " over ").concat(protocol));
|
|
396
|
+
var list = this.getUnreachablClusters();
|
|
397
|
+
list.forEach(function (cluster) {
|
|
398
|
+
_loggerProxy.default.logger.log("Reachability:index#logUnreachableClusters --> No ice candidate for ".concat(cluster, "."));
|
|
364
399
|
});
|
|
365
400
|
}
|
|
366
401
|
|
|
367
402
|
/**
|
|
368
|
-
*
|
|
369
|
-
* @param {
|
|
370
|
-
* @returns {
|
|
403
|
+
* Calculates time to establish connection
|
|
404
|
+
* @param {array} iceResults iceResults
|
|
405
|
+
* @returns {object} reachabilityMap
|
|
406
|
+
* @private
|
|
407
|
+
* @memberof Reachability
|
|
371
408
|
*/
|
|
372
409
|
}, {
|
|
373
|
-
key: "
|
|
374
|
-
value:
|
|
375
|
-
var
|
|
376
|
-
|
|
377
|
-
var
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
410
|
+
key: "parseIceResultsToReachabilityResults",
|
|
411
|
+
value: function parseIceResultsToReachabilityResults(iceResults) {
|
|
412
|
+
var reachabilityMap = {};
|
|
413
|
+
iceResults.forEach(function (_ref2) {
|
|
414
|
+
var clusterId = _ref2.clusterId,
|
|
415
|
+
elapsed = _ref2.elapsed;
|
|
416
|
+
var latencyResult;
|
|
417
|
+
if (elapsed === null) {
|
|
418
|
+
latencyResult = {
|
|
419
|
+
reachable: 'false'
|
|
420
|
+
};
|
|
421
|
+
} else {
|
|
422
|
+
latencyResult = {
|
|
423
|
+
reachable: 'true',
|
|
424
|
+
latencyInMilliseconds: elapsed.toString()
|
|
425
|
+
};
|
|
426
|
+
}
|
|
427
|
+
reachabilityMap[clusterId] = {
|
|
428
|
+
udp: latencyResult,
|
|
429
|
+
tcp: latencyResult
|
|
430
|
+
};
|
|
431
|
+
});
|
|
432
|
+
return reachabilityMap;
|
|
433
|
+
}
|
|
393
434
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
435
|
+
/**
|
|
436
|
+
* fetches reachability data
|
|
437
|
+
* @param {object} clusterList
|
|
438
|
+
* @returns {Promise<localSDPData>} reachability check results
|
|
439
|
+
* @private
|
|
440
|
+
* @memberof Reachability
|
|
441
|
+
*/
|
|
442
|
+
}, {
|
|
443
|
+
key: "performReachabilityCheck",
|
|
444
|
+
value: function performReachabilityCheck(clusterList) {
|
|
445
|
+
var _this5 = this;
|
|
446
|
+
if (!clusterList || !(0, _keys.default)(clusterList).length) {
|
|
447
|
+
return _promise.default.resolve({});
|
|
448
|
+
}
|
|
449
|
+
return new _promise.default(function (resolve) {
|
|
450
|
+
_this5.getLocalSDPForClusters(clusterList).then(function (localSDPData) {
|
|
451
|
+
if (!localSDPData || !(0, _keys.default)(localSDPData).length) {
|
|
452
|
+
// TODO: handle the error condition properly and try retry
|
|
453
|
+
_loggerProxy.default.logger.log('Reachability:index#performReachabilityCheck --> Local SDP is empty or has missing elements..returning');
|
|
454
|
+
resolve({});
|
|
455
|
+
} else {
|
|
456
|
+
resolve(localSDPData);
|
|
415
457
|
}
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
458
|
+
}).catch(function (error) {
|
|
459
|
+
_loggerProxy.default.logger.error("Reachability:index#performReachabilityCheck --> Error in getLocalSDPForClusters: ".concat(error));
|
|
460
|
+
resolve({});
|
|
461
|
+
});
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Records latency and closes the peerConnection
|
|
467
|
+
* @param {RTCPeerConnection} peerConnection
|
|
468
|
+
* @param {number} elapsed Latency in milliseconds
|
|
469
|
+
* @returns {undefined}
|
|
470
|
+
* @private
|
|
471
|
+
* @memberof Reachability
|
|
472
|
+
*/
|
|
473
|
+
}, {
|
|
474
|
+
key: "setLatencyAndClose",
|
|
475
|
+
value: function setLatencyAndClose(peerConnection, elapsed) {
|
|
476
|
+
var _intialState;
|
|
477
|
+
var REACHABLE = 'reachable';
|
|
478
|
+
var UNREACHABLE = 'unreachable';
|
|
479
|
+
var CLOSED = _constants.CONNECTION_STATE.CLOSED;
|
|
480
|
+
// @ts-ignore
|
|
481
|
+
var key = peerConnection.key;
|
|
482
|
+
var resultKey = elapsed === null ? UNREACHABLE : REACHABLE;
|
|
483
|
+
var intialState = (_intialState = {}, (0, _defineProperty2.default)(_intialState, REACHABLE, 0), (0, _defineProperty2.default)(_intialState, UNREACHABLE, 0), _intialState);
|
|
484
|
+
if (peerConnection.connectionState === CLOSED) {
|
|
485
|
+
_loggerProxy.default.logger.log("Reachability:index#setLatencyAndClose --> Attempting to set latency of ".concat(elapsed, " on closed peerConnection."));
|
|
486
|
+
return;
|
|
420
487
|
}
|
|
421
|
-
|
|
422
|
-
|
|
488
|
+
this.clusterLatencyResults[key] = this.clusterLatencyResults[key] || intialState;
|
|
489
|
+
this.clusterLatencyResults[key][resultKey] += 1;
|
|
490
|
+
|
|
491
|
+
// Set to null in case this fired from
|
|
492
|
+
// an event other than onIceCandidate
|
|
493
|
+
peerConnection.onicecandidate = null;
|
|
494
|
+
peerConnection.close();
|
|
495
|
+
// @ts-ignore
|
|
496
|
+
peerConnection.elapsed = elapsed;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
/**
|
|
500
|
+
* utility function
|
|
501
|
+
* @returns {undefined}
|
|
502
|
+
* @private
|
|
503
|
+
* @memberof Reachability
|
|
504
|
+
*/
|
|
505
|
+
}, {
|
|
506
|
+
key: "setup",
|
|
507
|
+
value: function setup() {
|
|
508
|
+
this.clusterLatencyResults = {};
|
|
509
|
+
}
|
|
423
510
|
}]);
|
|
424
511
|
return Reachability;
|
|
425
512
|
}();
|
|
513
|
+
exports.default = Reachability;
|
|
426
514
|
//# sourceMappingURL=index.js.map
|