@webex/plugin-meetings 2.60.0-next.9 → 2.60.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -46
- 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 -5
- package/dist/config.js +11 -8
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +97 -217
- package/dist/constants.js +441 -416
- 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 +4 -116
- 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 +494 -591
- package/dist/meeting/index.js +2969 -4707
- 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 -297
- 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 -102
- package/dist/meeting/util.js +435 -605
- 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 +21 -103
- package/dist/meetings/index.js +124 -486
- 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 +7 -62
- package/dist/reachability/index.js +72 -265
- 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 +231 -282
- 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 +235 -101
- 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 -28
- package/dist/statsAnalyzer/index.js +509 -374
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +6 -8
- package/dist/statsAnalyzer/mqaUtil.js +83 -116
- 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 -35
- 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 -5
- package/src/constants.ts +97 -244
- 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 -449
- 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 +2482 -3929
- package/src/meeting/muteState.ts +138 -224
- package/src/meeting/request.ts +127 -207
- package/src/meeting/util.ts +423 -590
- 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 +126 -486
- 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 +45 -238
- 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 -98
- 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 +642 -413
- package/src/statsAnalyzer/mqaUtil.ts +114 -111
- 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 -1389
- 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 +3136 -8547
- package/test/unit/spec/meeting/muteState.js +213 -409
- package/test/unit/spec/meeting/request.js +42 -512
- package/test/unit/spec/meeting/utils.js +24 -741
- 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 +211 -1278
- 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 -598
- package/test/unit/spec/reconnection-manager/index.js +24 -162
- 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 +76 -200
- 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 +174 -188
- 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/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/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/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 -40
- 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/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/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/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/request.js +0 -68
- package/test/unit/spec/roap/request.ts +0 -232
- 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
|
@@ -12,39 +12,23 @@ var _values = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/obj
|
|
|
12
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 _assign = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/assign"));
|
|
16
15
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/toConsumableArray"));
|
|
17
16
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
|
|
18
17
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
|
19
18
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
|
20
19
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
|
21
|
-
var
|
|
20
|
+
var _uniq2 = _interopRequireDefault(require("lodash/uniq"));
|
|
22
21
|
var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
|
|
23
|
-
var _util = _interopRequireDefault(require("../meeting/util"));
|
|
24
22
|
var _constants = require("../constants");
|
|
25
23
|
var _request = _interopRequireDefault(require("./request"));
|
|
26
|
-
/*!
|
|
27
|
-
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
28
|
-
*/
|
|
29
|
-
|
|
30
|
-
/* eslint-disable class-methods-use-this */
|
|
31
|
-
/* globals window */
|
|
32
|
-
|
|
33
24
|
var DEFAULT_TIMEOUT = 3000;
|
|
34
25
|
var VIDEO_MESH_TIMEOUT = 1000;
|
|
35
26
|
|
|
36
|
-
// result for a specific transport protocol (like udp or tcp)
|
|
37
|
-
|
|
38
|
-
// reachability result for a specifc media cluster
|
|
39
|
-
|
|
40
|
-
// this is the type that is required by the backend when we send them reachability results
|
|
41
|
-
|
|
42
|
-
// this is the type used by Reachability class internally and stored in local storage
|
|
43
27
|
/**
|
|
44
28
|
* @class Reachability
|
|
45
29
|
* @export
|
|
46
30
|
*/
|
|
47
|
-
var Reachability =
|
|
31
|
+
var Reachability = /*#__PURE__*/function () {
|
|
48
32
|
/**
|
|
49
33
|
* Creates an instance of Reachability.
|
|
50
34
|
* @param {object} webex
|
|
@@ -52,7 +36,6 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
52
36
|
*/
|
|
53
37
|
function Reachability(webex) {
|
|
54
38
|
(0, _classCallCheck2.default)(this, Reachability);
|
|
55
|
-
(0, _defineProperty2.default)(this, "namespace", _constants.REACHABILITY.namespace);
|
|
56
39
|
(0, _defineProperty2.default)(this, "webex", void 0);
|
|
57
40
|
(0, _defineProperty2.default)(this, "reachabilityRequest", void 0);
|
|
58
41
|
(0, _defineProperty2.default)(this, "clusterLatencyResults", void 0);
|
|
@@ -86,210 +69,80 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
86
69
|
*/
|
|
87
70
|
(0, _createClass2.default)(Reachability, [{
|
|
88
71
|
key: "gatherReachability",
|
|
89
|
-
value:
|
|
72
|
+
value: function () {
|
|
90
73
|
var _gatherReachability = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
|
|
91
|
-
var
|
|
74
|
+
var _window, _window$localStorage;
|
|
75
|
+
var clusters, results;
|
|
92
76
|
return _regenerator.default.wrap(function _callee$(_context) {
|
|
93
77
|
while (1) switch (_context.prev = _context.next) {
|
|
94
78
|
case 0:
|
|
95
79
|
this.setup();
|
|
96
80
|
|
|
97
81
|
// Remove stored reachability results to ensure no stale data
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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);
|
|
87
|
+
_context.next = 7;
|
|
88
|
+
break;
|
|
104
89
|
case 5:
|
|
105
|
-
|
|
106
|
-
_context.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
90
|
+
_loggerProxy.default.logger.error('Reachability:index#gatherReachability --> Error in accessing LocalStorage.');
|
|
91
|
+
return _context.abrupt("return", {});
|
|
92
|
+
case 7:
|
|
93
|
+
_context.prev = 7;
|
|
94
|
+
_context.next = 10;
|
|
95
|
+
return this.reachabilityRequest.getClusters();
|
|
96
|
+
case 10:
|
|
97
|
+
clusters = _context.sent;
|
|
112
98
|
_context.next = 13;
|
|
113
99
|
return this.performReachabilityCheck(clusters);
|
|
114
100
|
case 13:
|
|
115
101
|
results = _context.sent;
|
|
116
|
-
|
|
117
|
-
return this.webex.boundedStorage.put(this.namespace, _constants.REACHABILITY.localStorageResult, (0, _stringify.default)(results));
|
|
118
|
-
case 16:
|
|
119
|
-
_context.next = 18;
|
|
120
|
-
return this.webex.boundedStorage.put(this.namespace, _constants.REACHABILITY.localStorageJoinCookie, (0, _stringify.default)(joinCookie));
|
|
121
|
-
case 18:
|
|
102
|
+
window.localStorage.setItem(_constants.REACHABILITY.localStorage, (0, _stringify.default)(results));
|
|
122
103
|
_loggerProxy.default.logger.log('Reachability:index#gatherReachability --> Reachability checks completed');
|
|
123
104
|
return _context.abrupt("return", results);
|
|
124
|
-
case
|
|
125
|
-
_context.prev =
|
|
126
|
-
_context.t0 = _context["catch"](
|
|
105
|
+
case 19:
|
|
106
|
+
_context.prev = 19;
|
|
107
|
+
_context.t0 = _context["catch"](7);
|
|
127
108
|
_loggerProxy.default.logger.error("Reachability:index#gatherReachability --> Error in calling getClusters(): ".concat(_context.t0));
|
|
128
109
|
return _context.abrupt("return", {});
|
|
129
|
-
case
|
|
110
|
+
case 23:
|
|
130
111
|
case "end":
|
|
131
112
|
return _context.stop();
|
|
132
113
|
}
|
|
133
|
-
}, _callee, this, [[
|
|
114
|
+
}, _callee, this, [[7, 19]]);
|
|
134
115
|
}));
|
|
135
116
|
function gatherReachability() {
|
|
136
117
|
return _gatherReachability.apply(this, arguments);
|
|
137
118
|
}
|
|
138
119
|
return gatherReachability;
|
|
139
120
|
}()
|
|
140
|
-
/**
|
|
141
|
-
* Returns statistics about last reachability results. The returned value is an object
|
|
142
|
-
* with a flat list of properties so that it can be easily sent with metrics
|
|
143
|
-
*
|
|
144
|
-
* @returns {Promise} Promise with metrics values, it never rejects/throws.
|
|
145
|
-
*/
|
|
146
|
-
)
|
|
147
|
-
}, {
|
|
148
|
-
key: "getReachabilityMetrics",
|
|
149
|
-
value: (function () {
|
|
150
|
-
var _getReachabilityMetrics = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2() {
|
|
151
|
-
var stats, updateStats, resultsJson, internalResults;
|
|
152
|
-
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
153
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
154
|
-
case 0:
|
|
155
|
-
stats = {
|
|
156
|
-
reachability_public_udp_success: 0,
|
|
157
|
-
reachability_public_udp_failed: 0,
|
|
158
|
-
reachability_public_tcp_success: 0,
|
|
159
|
-
reachability_public_tcp_failed: 0,
|
|
160
|
-
reachability_vmn_udp_success: 0,
|
|
161
|
-
reachability_vmn_udp_failed: 0,
|
|
162
|
-
reachability_vmn_tcp_success: 0,
|
|
163
|
-
reachability_vmn_tcp_failed: 0
|
|
164
|
-
};
|
|
165
|
-
updateStats = function updateStats(clusterType, result) {
|
|
166
|
-
var _result$udp, _result$tcp;
|
|
167
|
-
if ((_result$udp = result.udp) !== null && _result$udp !== void 0 && _result$udp.reachable) {
|
|
168
|
-
var outcome = result.udp.reachable === 'true' ? 'success' : 'failed';
|
|
169
|
-
stats["reachability_".concat(clusterType, "_udp_").concat(outcome)] += 1;
|
|
170
|
-
}
|
|
171
|
-
if ((_result$tcp = result.tcp) !== null && _result$tcp !== void 0 && _result$tcp.reachable) {
|
|
172
|
-
var _outcome = result.tcp.reachable === 'true' ? 'success' : 'failed';
|
|
173
|
-
stats["reachability_".concat(clusterType, "_tcp_").concat(_outcome)] += 1;
|
|
174
|
-
}
|
|
175
|
-
};
|
|
176
|
-
_context2.prev = 2;
|
|
177
|
-
_context2.next = 5;
|
|
178
|
-
return this.webex.boundedStorage.get(_constants.REACHABILITY.namespace, _constants.REACHABILITY.localStorageResult);
|
|
179
|
-
case 5:
|
|
180
|
-
resultsJson = _context2.sent;
|
|
181
|
-
internalResults = JSON.parse(resultsJson);
|
|
182
|
-
(0, _values.default)(internalResults).forEach(function (result) {
|
|
183
|
-
updateStats(result.isVideoMesh ? 'vmn' : 'public', result);
|
|
184
|
-
});
|
|
185
|
-
_context2.next = 13;
|
|
186
|
-
break;
|
|
187
|
-
case 10:
|
|
188
|
-
_context2.prev = 10;
|
|
189
|
-
_context2.t0 = _context2["catch"](2);
|
|
190
|
-
// empty storage, that's ok
|
|
191
|
-
_loggerProxy.default.logger.warn('Roap:request#getReachabilityMetrics --> Error parsing reachability data: ', _context2.t0);
|
|
192
|
-
case 13:
|
|
193
|
-
return _context2.abrupt("return", stats);
|
|
194
|
-
case 14:
|
|
195
|
-
case "end":
|
|
196
|
-
return _context2.stop();
|
|
197
|
-
}
|
|
198
|
-
}, _callee2, this, [[2, 10]]);
|
|
199
|
-
}));
|
|
200
|
-
function getReachabilityMetrics() {
|
|
201
|
-
return _getReachabilityMetrics.apply(this, arguments);
|
|
202
|
-
}
|
|
203
|
-
return getReachabilityMetrics;
|
|
204
|
-
}()
|
|
205
|
-
/**
|
|
206
|
-
* Reachability results as an object in the format that backend expects
|
|
207
|
-
*
|
|
208
|
-
* @returns {any} reachability results that need to be sent to the backend
|
|
209
|
-
*/
|
|
210
|
-
)
|
|
211
|
-
}, {
|
|
212
|
-
key: "getReachabilityResults",
|
|
213
|
-
value: (function () {
|
|
214
|
-
var _getReachabilityResults = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3() {
|
|
215
|
-
var results, reachabilityResultsProps, resultsJson, internalResults;
|
|
216
|
-
return _regenerator.default.wrap(function _callee3$(_context3) {
|
|
217
|
-
while (1) switch (_context3.prev = _context3.next) {
|
|
218
|
-
case 0:
|
|
219
|
-
// these are the only props that backend needs in the reachability results:
|
|
220
|
-
reachabilityResultsProps = ['udp', 'tcp', 'xtls'];
|
|
221
|
-
_context3.prev = 1;
|
|
222
|
-
_context3.next = 4;
|
|
223
|
-
return this.webex.boundedStorage.get(_constants.REACHABILITY.namespace, _constants.REACHABILITY.localStorageResult);
|
|
224
|
-
case 4:
|
|
225
|
-
resultsJson = _context3.sent;
|
|
226
|
-
internalResults = JSON.parse(resultsJson);
|
|
227
|
-
results = (0, _lodash.mapValues)(internalResults, function (result) {
|
|
228
|
-
return (0, _lodash.pick)(result, reachabilityResultsProps);
|
|
229
|
-
});
|
|
230
|
-
_context3.next = 12;
|
|
231
|
-
break;
|
|
232
|
-
case 9:
|
|
233
|
-
_context3.prev = 9;
|
|
234
|
-
_context3.t0 = _context3["catch"](1);
|
|
235
|
-
// empty storage, that's ok
|
|
236
|
-
_loggerProxy.default.logger.warn('Roap:request#attachReachabilityData --> Error parsing reachability data: ', _context3.t0);
|
|
237
|
-
case 12:
|
|
238
|
-
return _context3.abrupt("return", results);
|
|
239
|
-
case 13:
|
|
240
|
-
case "end":
|
|
241
|
-
return _context3.stop();
|
|
242
|
-
}
|
|
243
|
-
}, _callee3, this, [[1, 9]]);
|
|
244
|
-
}));
|
|
245
|
-
function getReachabilityResults() {
|
|
246
|
-
return _getReachabilityResults.apply(this, arguments);
|
|
247
|
-
}
|
|
248
|
-
return getReachabilityResults;
|
|
249
|
-
}()
|
|
250
121
|
/**
|
|
251
122
|
* fetches reachability data and checks for cluster reachability
|
|
252
123
|
* @returns {boolean}
|
|
253
124
|
* @public
|
|
254
125
|
* @memberof Reachability
|
|
255
126
|
*/
|
|
256
|
-
)
|
|
257
127
|
}, {
|
|
258
|
-
key: "
|
|
259
|
-
value:
|
|
260
|
-
var
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
reachabilityResults = JSON.parse(reachabilityData);
|
|
273
|
-
reachable = (0, _values.default)(reachabilityResults).some(function (result) {
|
|
274
|
-
var _result$udp2, _result$tcp2;
|
|
275
|
-
return !result.isVideoMesh && (((_result$udp2 = result.udp) === null || _result$udp2 === void 0 ? void 0 : _result$udp2.reachable) === 'true' || ((_result$tcp2 = result.tcp) === null || _result$tcp2 === void 0 ? void 0 : _result$tcp2.reachable) === 'true');
|
|
276
|
-
});
|
|
277
|
-
} catch (e) {
|
|
278
|
-
_loggerProxy.default.logger.error("Roap:request#attachReachabilityData --> Error in parsing reachability data: ".concat(e));
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
return _context4.abrupt("return", reachable);
|
|
282
|
-
case 6:
|
|
283
|
-
case "end":
|
|
284
|
-
return _context4.stop();
|
|
285
|
-
}
|
|
286
|
-
}, _callee4, this);
|
|
287
|
-
}));
|
|
288
|
-
function isAnyPublicClusterReachable() {
|
|
289
|
-
return _isAnyPublicClusterReachable.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
|
+
}
|
|
290
142
|
}
|
|
291
|
-
return
|
|
292
|
-
}
|
|
143
|
+
return reachable;
|
|
144
|
+
}
|
|
145
|
+
|
|
293
146
|
/**
|
|
294
147
|
* Generate peerConnection config settings
|
|
295
148
|
* @param {object} cluster
|
|
@@ -297,11 +150,10 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
297
150
|
* @private
|
|
298
151
|
* @memberof Reachability
|
|
299
152
|
*/
|
|
300
|
-
)
|
|
301
153
|
}, {
|
|
302
154
|
key: "buildPeerConnectionConfig",
|
|
303
155
|
value: function buildPeerConnectionConfig(cluster) {
|
|
304
|
-
var iceServers = (0,
|
|
156
|
+
var iceServers = (0, _uniq2.default)([].concat((0, _toConsumableArray2.default)(cluster.udp), (0, _toConsumableArray2.default)(cluster.tcp))).map(function (url) {
|
|
305
157
|
return {
|
|
306
158
|
username: '',
|
|
307
159
|
credential: '',
|
|
@@ -367,10 +219,10 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
367
219
|
var _this = this;
|
|
368
220
|
var clusters = (0, _toConsumableArray2.default)((0, _keys.default)(clusterList));
|
|
369
221
|
clusters = clusters.map( /*#__PURE__*/function () {
|
|
370
|
-
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function
|
|
222
|
+
var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(key) {
|
|
371
223
|
var cluster, config, peerConnection, description;
|
|
372
|
-
return _regenerator.default.wrap(function
|
|
373
|
-
while (1) switch (
|
|
224
|
+
return _regenerator.default.wrap(function _callee2$(_context2) {
|
|
225
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
374
226
|
case 0:
|
|
375
227
|
cluster = clusterList[key];
|
|
376
228
|
config = _this.buildPeerConnectionConfig(cluster);
|
|
@@ -378,29 +230,29 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
378
230
|
key: key,
|
|
379
231
|
config: config
|
|
380
232
|
});
|
|
381
|
-
|
|
233
|
+
_context2.next = 5;
|
|
382
234
|
return peerConnection.createOffer({
|
|
383
235
|
offerToReceiveAudio: true
|
|
384
236
|
});
|
|
385
237
|
case 5:
|
|
386
|
-
description =
|
|
238
|
+
description = _context2.sent;
|
|
387
239
|
// @ts-ignore
|
|
388
240
|
peerConnection.begin = (0, _now.default)();
|
|
389
241
|
peerConnection.setLocalDescription(description);
|
|
390
|
-
return
|
|
242
|
+
return _context2.abrupt("return", _this.iceGatheringState(peerConnection, cluster.isVideoMesh ? VIDEO_MESH_TIMEOUT : DEFAULT_TIMEOUT).catch(function (iceGatheringStateError) {
|
|
391
243
|
_loggerProxy.default.logger.log("Reachability:index#getLocalSDPForClusters --> Error in getLocalSDP : ".concat(iceGatheringStateError));
|
|
392
244
|
}));
|
|
393
245
|
case 9:
|
|
394
246
|
case "end":
|
|
395
|
-
return
|
|
247
|
+
return _context2.stop();
|
|
396
248
|
}
|
|
397
|
-
},
|
|
249
|
+
}, _callee2);
|
|
398
250
|
}));
|
|
399
251
|
return function (_x) {
|
|
400
252
|
return _ref.apply(this, arguments);
|
|
401
253
|
};
|
|
402
254
|
}());
|
|
403
|
-
return _promise.default.all(clusters).then(this.
|
|
255
|
+
return _promise.default.all(clusters).then(this.parseIceResultsToReachabilityResults).then(function (reachabilityLatencyResults) {
|
|
404
256
|
_this.logUnreachableClusters();
|
|
405
257
|
|
|
406
258
|
// return results
|
|
@@ -471,8 +323,6 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
471
323
|
var elapsed = _this3.getElapsedTime(peerConnection);
|
|
472
324
|
_loggerProxy.default.logger.log( // @ts-ignore
|
|
473
325
|
"Reachability:index#onIceCandidate --> Successfully pinged ".concat(peerConnection.key, ":"), elapsed);
|
|
474
|
-
// order is important
|
|
475
|
-
_this3.addPublicIP(peerConnection, e.candidate.address);
|
|
476
326
|
_this3.setLatencyAndClose(peerConnection, elapsed);
|
|
477
327
|
}
|
|
478
328
|
};
|
|
@@ -484,18 +334,16 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
484
334
|
* speed.
|
|
485
335
|
* @private
|
|
486
336
|
* @param {RTCPeerConnection} peerConnection
|
|
487
|
-
* @param {
|
|
337
|
+
* @param {number} timeout
|
|
488
338
|
* @returns {Promise}
|
|
489
339
|
*/
|
|
490
340
|
}, {
|
|
491
341
|
key: "iceGatheringState",
|
|
492
|
-
value: function iceGatheringState(peerConnection,
|
|
342
|
+
value: function iceGatheringState(peerConnection, timeout) {
|
|
493
343
|
var _this4 = this;
|
|
494
344
|
var ELAPSED = 'elapsed';
|
|
495
|
-
var timeout = isVideoMesh ? VIDEO_MESH_TIMEOUT : DEFAULT_TIMEOUT;
|
|
496
345
|
return new _promise.default(function (resolve) {
|
|
497
346
|
var peerConnectionProxy = new window.Proxy(peerConnection, {
|
|
498
|
-
// eslint-disable-next-line require-jsdoc
|
|
499
347
|
get: function get(target, property) {
|
|
500
348
|
var targetMember = target[property];
|
|
501
349
|
if (typeof targetMember === 'function') {
|
|
@@ -506,12 +354,9 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
506
354
|
set: function set(target, property, value) {
|
|
507
355
|
// only intercept elapsed property
|
|
508
356
|
if (property === ELAPSED) {
|
|
357
|
+
// @ts-ignore
|
|
509
358
|
resolve({
|
|
510
|
-
// @ts-ignore
|
|
511
359
|
clusterId: peerConnection.key,
|
|
512
|
-
isVideoMesh: isVideoMesh,
|
|
513
|
-
// @ts-ignore
|
|
514
|
-
publicIPs: target.publicIPs,
|
|
515
360
|
elapsed: value
|
|
516
361
|
});
|
|
517
362
|
return true;
|
|
@@ -533,8 +378,6 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
533
378
|
|
|
534
379
|
// Close any open peerConnections
|
|
535
380
|
if (peerConnectionProxy.connectionState !== CLOSED) {
|
|
536
|
-
// order is important
|
|
537
|
-
_this4.addPublicIP(peerConnectionProxy, null);
|
|
538
381
|
_this4.setLatencyAndClose(peerConnectionProxy, null);
|
|
539
382
|
}
|
|
540
383
|
}, timeout);
|
|
@@ -558,45 +401,32 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
558
401
|
|
|
559
402
|
/**
|
|
560
403
|
* Calculates time to establish connection
|
|
561
|
-
* @param {
|
|
404
|
+
* @param {array} iceResults iceResults
|
|
562
405
|
* @returns {object} reachabilityMap
|
|
563
|
-
* @
|
|
406
|
+
* @private
|
|
564
407
|
* @memberof Reachability
|
|
565
408
|
*/
|
|
566
409
|
}, {
|
|
567
|
-
key: "
|
|
568
|
-
value: function
|
|
410
|
+
key: "parseIceResultsToReachabilityResults",
|
|
411
|
+
value: function parseIceResultsToReachabilityResults(iceResults) {
|
|
569
412
|
var reachabilityMap = {};
|
|
570
413
|
iceResults.forEach(function (_ref2) {
|
|
571
414
|
var clusterId = _ref2.clusterId,
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
if (!elapsed) {
|
|
577
|
-
(0, _assign.default)(latencyResult, {
|
|
415
|
+
elapsed = _ref2.elapsed;
|
|
416
|
+
var latencyResult;
|
|
417
|
+
if (elapsed === null) {
|
|
418
|
+
latencyResult = {
|
|
578
419
|
reachable: 'false'
|
|
579
|
-
}
|
|
420
|
+
};
|
|
580
421
|
} else {
|
|
581
|
-
|
|
422
|
+
latencyResult = {
|
|
582
423
|
reachable: 'true',
|
|
583
424
|
latencyInMilliseconds: elapsed.toString()
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
if (publicIPs) {
|
|
587
|
-
(0, _assign.default)(latencyResult, {
|
|
588
|
-
clientMediaIPs: publicIPs
|
|
589
|
-
});
|
|
425
|
+
};
|
|
590
426
|
}
|
|
591
427
|
reachabilityMap[clusterId] = {
|
|
592
428
|
udp: latencyResult,
|
|
593
|
-
tcp:
|
|
594
|
-
untested: 'true'
|
|
595
|
-
},
|
|
596
|
-
xtls: {
|
|
597
|
-
untested: 'true'
|
|
598
|
-
},
|
|
599
|
-
isVideoMesh: isVideoMesh
|
|
429
|
+
tcp: latencyResult
|
|
600
430
|
};
|
|
601
431
|
});
|
|
602
432
|
return reachabilityMap;
|
|
@@ -605,7 +435,7 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
605
435
|
/**
|
|
606
436
|
* fetches reachability data
|
|
607
437
|
* @param {object} clusterList
|
|
608
|
-
* @returns {Promise<
|
|
438
|
+
* @returns {Promise<localSDPData>} reachability check results
|
|
609
439
|
* @private
|
|
610
440
|
* @memberof Reachability
|
|
611
441
|
*/
|
|
@@ -632,31 +462,6 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
632
462
|
});
|
|
633
463
|
}
|
|
634
464
|
|
|
635
|
-
/**
|
|
636
|
-
* Adds public IP (client media IPs)
|
|
637
|
-
* @param {RTCPeerConnection} peerConnection
|
|
638
|
-
* @param {string} publicIP
|
|
639
|
-
* @returns {void}
|
|
640
|
-
*/
|
|
641
|
-
}, {
|
|
642
|
-
key: "addPublicIP",
|
|
643
|
-
value: function addPublicIP(peerConnection, publicIP) {
|
|
644
|
-
var modifiedPeerConnection = peerConnection;
|
|
645
|
-
var CLOSED = _constants.CONNECTION_STATE.CLOSED;
|
|
646
|
-
if (modifiedPeerConnection.connectionState === CLOSED) {
|
|
647
|
-
_loggerProxy.default.logger.log("Reachability:index#addPublicIP --> Attempting to set publicIP of ".concat(publicIP, " on closed peerConnection."));
|
|
648
|
-
}
|
|
649
|
-
if (publicIP) {
|
|
650
|
-
if (modifiedPeerConnection.publicIPs) {
|
|
651
|
-
modifiedPeerConnection.publicIPs.push(publicIP);
|
|
652
|
-
} else {
|
|
653
|
-
modifiedPeerConnection.publicIPs = [publicIP];
|
|
654
|
-
}
|
|
655
|
-
} else {
|
|
656
|
-
modifiedPeerConnection.publicIPs = null;
|
|
657
|
-
}
|
|
658
|
-
}
|
|
659
|
-
|
|
660
465
|
/**
|
|
661
466
|
* Records latency and closes the peerConnection
|
|
662
467
|
* @param {RTCPeerConnection} peerConnection
|
|
@@ -668,13 +473,14 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
668
473
|
}, {
|
|
669
474
|
key: "setLatencyAndClose",
|
|
670
475
|
value: function setLatencyAndClose(peerConnection, elapsed) {
|
|
476
|
+
var _intialState;
|
|
671
477
|
var REACHABLE = 'reachable';
|
|
672
478
|
var UNREACHABLE = 'unreachable';
|
|
673
479
|
var CLOSED = _constants.CONNECTION_STATE.CLOSED;
|
|
674
480
|
// @ts-ignore
|
|
675
481
|
var key = peerConnection.key;
|
|
676
482
|
var resultKey = elapsed === null ? UNREACHABLE : REACHABLE;
|
|
677
|
-
var intialState = (0, _defineProperty2.default)((0, _defineProperty2.default)(
|
|
483
|
+
var intialState = (_intialState = {}, (0, _defineProperty2.default)(_intialState, REACHABLE, 0), (0, _defineProperty2.default)(_intialState, UNREACHABLE, 0), _intialState);
|
|
678
484
|
if (peerConnection.connectionState === CLOSED) {
|
|
679
485
|
_loggerProxy.default.logger.log("Reachability:index#setLatencyAndClose --> Attempting to set latency of ".concat(elapsed, " on closed peerConnection."));
|
|
680
486
|
return;
|
|
@@ -704,4 +510,5 @@ var Reachability = exports.default = /*#__PURE__*/function () {
|
|
|
704
510
|
}]);
|
|
705
511
|
return Reachability;
|
|
706
512
|
}();
|
|
513
|
+
exports.default = Reachability;
|
|
707
514
|
//# sourceMappingURL=index.js.map
|