@webex/plugin-meetings 3.8.0 → 3.8.1-next.10
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 +26 -13
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +70 -6
- package/dist/breakouts/index.js.map +1 -1
- package/dist/common/errors/webex-errors.js +12 -2
- package/dist/common/errors/webex-errors.js.map +1 -1
- package/dist/config.js +5 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +28 -123
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/enums.js +3 -0
- package/dist/controls-options-manager/enums.js.map +1 -1
- package/dist/controls-options-manager/types.js.map +1 -1
- package/dist/controls-options-manager/util.js +78 -0
- package/dist/controls-options-manager/util.js.map +1 -1
- package/dist/interpretation/index.js +4 -4
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +37 -11
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +92 -12
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/selfUtils.js +432 -418
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/index.js +17 -17
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +94 -6
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/brbState.js +9 -2
- package/dist/meeting/brbState.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +21 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +678 -344
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +21 -22
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.js +4 -4
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +30 -0
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/util.js +13 -2
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +373 -68
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +5 -1
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +136 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/util.js +14 -0
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.js +55 -9
- package/dist/member/index.js.map +1 -1
- package/dist/member/types.js +3 -0
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.js +335 -353
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.js.map +1 -1
- package/dist/members/index.js +137 -29
- package/dist/members/index.js.map +1 -1
- package/dist/members/request.js +38 -0
- package/dist/members/request.js.map +1 -1
- package/dist/members/util.js +36 -1
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/constants.js +10 -0
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +40 -8
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +63 -27
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +107 -47
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +14 -0
- package/dist/reachability/reachability.types.js.map +1 -1
- package/dist/reachability/request.js +19 -3
- package/dist/reachability/request.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -2
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/recording-controller/util.js +5 -5
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/turnDiscovery.js +45 -27
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/types.js +17 -0
- package/dist/roap/types.js.map +1 -0
- package/dist/types/common/errors/webex-errors.d.ts +7 -1
- package/dist/types/config.d.ts +3 -0
- package/dist/types/constants.d.ts +20 -85
- package/dist/types/controls-options-manager/enums.d.ts +4 -1
- package/dist/types/controls-options-manager/types.d.ts +10 -1
- package/dist/types/locus-info/index.d.ts +3 -3
- package/dist/types/locus-info/selfUtils.d.ts +216 -1
- package/dist/types/media/properties.d.ts +15 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +20 -0
- package/dist/types/meeting/index.d.ts +65 -1
- package/dist/types/meeting/muteState.d.ts +0 -1
- package/dist/types/meeting/request.d.ts +12 -1
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/meeting/util.d.ts +3 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +82 -1
- package/dist/types/meetings/index.d.ts +57 -0
- package/dist/types/member/index.d.ts +21 -6
- package/dist/types/member/types.d.ts +73 -14
- package/dist/types/member/util.d.ts +156 -1
- package/dist/types/members/collection.d.ts +6 -5
- package/dist/types/members/index.d.ts +32 -43
- package/dist/types/members/request.d.ts +26 -0
- package/dist/types/members/util.d.ts +27 -0
- package/dist/types/metrics/constants.d.ts +10 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +10 -1
- package/dist/types/reachability/clusterReachability.d.ts +15 -7
- package/dist/types/reachability/index.d.ts +10 -1
- package/dist/types/reachability/reachability.types.d.ts +5 -0
- package/dist/types/roap/index.d.ts +3 -2
- package/dist/types/roap/turnDiscovery.d.ts +5 -17
- package/dist/types/roap/types.d.ts +16 -0
- package/dist/webinar/index.js +2 -2
- package/dist/webinar/index.js.map +1 -1
- package/package.json +24 -23
- package/src/breakouts/index.ts +69 -0
- package/src/common/errors/webex-errors.ts +8 -1
- package/src/config.ts +3 -0
- package/src/constants.ts +30 -90
- package/src/controls-options-manager/enums.ts +3 -0
- package/src/controls-options-manager/types.ts +16 -1
- package/src/controls-options-manager/util.ts +93 -0
- package/src/interpretation/index.ts +3 -3
- package/src/locus-info/controlsUtils.ts +59 -14
- package/src/locus-info/index.ts +97 -13
- package/src/locus-info/selfUtils.ts +496 -442
- package/src/media/index.ts +23 -21
- package/src/media/properties.ts +96 -0
- package/src/meeting/brbState.ts +11 -2
- package/src/meeting/in-meeting-actions.ts +40 -0
- package/src/meeting/index.ts +470 -105
- package/src/meeting/locusMediaRequest.ts +27 -22
- package/src/meeting/muteState.ts +4 -4
- package/src/meeting/request.ts +36 -1
- package/src/meeting/request.type.ts +7 -0
- package/src/meeting/util.ts +11 -2
- package/src/meeting-info/meeting-info-v2.ts +254 -8
- package/src/meeting-info/utilv2.ts +5 -0
- package/src/meetings/index.ts +148 -1
- package/src/meetings/util.ts +18 -0
- package/src/member/index.ts +68 -22
- package/src/member/types.ts +82 -16
- package/src/member/util.ts +357 -350
- package/src/members/collection.ts +4 -3
- package/src/members/index.ts +137 -18
- package/src/members/request.ts +44 -0
- package/src/members/util.ts +43 -1
- package/src/metrics/constants.ts +10 -0
- package/src/multistream/remoteMediaManager.ts +32 -10
- package/src/reachability/clusterReachability.ts +73 -26
- package/src/reachability/index.ts +62 -1
- package/src/reachability/reachability.types.ts +6 -0
- package/src/reachability/request.ts +7 -0
- package/src/reconnection-manager/index.ts +2 -2
- package/src/recording-controller/util.ts +17 -13
- package/src/roap/index.ts +3 -7
- package/src/roap/turnDiscovery.ts +34 -39
- package/src/roap/types.ts +23 -0
- package/src/webinar/index.ts +1 -1
- package/test/unit/spec/breakouts/index.ts +167 -95
- package/test/unit/spec/controls-options-manager/util.js +178 -0
- package/test/unit/spec/interpretation/index.ts +39 -1
- package/test/unit/spec/locus-info/controlsUtils.js +155 -9
- package/test/unit/spec/locus-info/index.js +209 -73
- package/test/unit/spec/locus-info/selfUtils.js +98 -24
- package/test/unit/spec/media/index.ts +150 -18
- package/test/unit/spec/media/properties.ts +130 -0
- package/test/unit/spec/meeting/brbState.ts +40 -2
- package/test/unit/spec/meeting/in-meeting-actions.ts +23 -4
- package/test/unit/spec/meeting/index.js +804 -139
- package/test/unit/spec/meeting/locusMediaRequest.ts +95 -87
- package/test/unit/spec/meeting/muteState.js +73 -2
- package/test/unit/spec/meeting/request.js +32 -1
- package/test/unit/spec/meeting/utils.js +119 -18
- package/test/unit/spec/meeting-info/meetinginfov2.js +484 -114
- package/test/unit/spec/meeting-info/utilv2.js +19 -0
- package/test/unit/spec/meetings/index.js +146 -2
- package/test/unit/spec/member/index.js +7 -0
- package/test/unit/spec/member/util.js +24 -0
- package/test/unit/spec/members/index.js +304 -78
- package/test/unit/spec/members/request.js +68 -22
- package/test/unit/spec/members/utils.js +75 -0
- package/test/unit/spec/multistream/remoteMediaManager.ts +397 -118
- package/test/unit/spec/reachability/clusterReachability.ts +88 -56
- package/test/unit/spec/reachability/index.ts +97 -0
- package/test/unit/spec/reachability/request.js +47 -2
- package/test/unit/spec/reconnection-manager/index.js +4 -4
- package/test/unit/spec/roap/turnDiscovery.ts +110 -28
- package/test/unit/spec/webinar/index.ts +5 -0
- package/dist/annotation/annotation.types.d.ts +0 -42
- package/dist/annotation/constants.d.ts +0 -31
- package/dist/annotation/index.d.ts +0 -117
- package/dist/breakouts/breakout.d.ts +0 -8
- package/dist/breakouts/collection.d.ts +0 -5
- package/dist/breakouts/edit-lock-error.d.ts +0 -15
- package/dist/breakouts/events.d.ts +0 -8
- package/dist/breakouts/index.d.ts +0 -5
- package/dist/breakouts/request.d.ts +0 -22
- package/dist/breakouts/utils.d.ts +0 -15
- package/dist/common/browser-detection.d.ts +0 -9
- package/dist/common/collection.d.ts +0 -48
- package/dist/common/config.d.ts +0 -2
- package/dist/common/errors/captcha-error.d.ts +0 -15
- package/dist/common/errors/intent-to-join.d.ts +0 -16
- package/dist/common/errors/join-meeting.d.ts +0 -17
- package/dist/common/errors/media.d.ts +0 -15
- package/dist/common/errors/no-meeting-info.d.ts +0 -14
- package/dist/common/errors/parameter.d.ts +0 -15
- package/dist/common/errors/password-error.d.ts +0 -15
- package/dist/common/errors/permission.d.ts +0 -14
- package/dist/common/errors/reclaim-host-role-error.js +0 -149
- package/dist/common/errors/reclaim-host-role-error.js.map +0 -1
- package/dist/common/errors/reclaim-host-role-errors.d.ts +0 -60
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js +0 -33
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- package/dist/common/errors/reconnection.d.ts +0 -15
- package/dist/common/errors/stats.d.ts +0 -15
- package/dist/common/errors/webex-errors.d.ts +0 -93
- package/dist/common/errors/webex-meetings-error.d.ts +0 -20
- package/dist/common/events/events-scope.d.ts +0 -17
- package/dist/common/events/events.d.ts +0 -12
- package/dist/common/events/trigger-proxy.d.ts +0 -2
- package/dist/common/events/util.d.ts +0 -2
- package/dist/common/logs/logger-config.d.ts +0 -2
- package/dist/common/logs/logger-proxy.d.ts +0 -2
- package/dist/common/logs/request.d.ts +0 -36
- package/dist/common/queue.d.ts +0 -34
- package/dist/config.d.ts +0 -72
- package/dist/constants.d.ts +0 -1088
- package/dist/controls-options-manager/constants.d.ts +0 -4
- package/dist/controls-options-manager/enums.d.ts +0 -15
- package/dist/controls-options-manager/index.d.ts +0 -136
- package/dist/controls-options-manager/types.d.ts +0 -43
- package/dist/controls-options-manager/util.d.ts +0 -1
- package/dist/index.d.ts +0 -7
- package/dist/interceptors/index.d.ts +0 -2
- package/dist/interceptors/locusRetry.d.ts +0 -27
- package/dist/interpretation/collection.d.ts +0 -5
- package/dist/interpretation/index.d.ts +0 -5
- package/dist/interpretation/siLanguage.d.ts +0 -5
- package/dist/locus-info/controlsUtils.d.ts +0 -2
- package/dist/locus-info/embeddedAppsUtils.d.ts +0 -2
- package/dist/locus-info/fullState.d.ts +0 -2
- package/dist/locus-info/hostUtils.d.ts +0 -2
- package/dist/locus-info/index.d.ts +0 -322
- package/dist/locus-info/infoUtils.d.ts +0 -2
- package/dist/locus-info/mediaSharesUtils.d.ts +0 -2
- package/dist/locus-info/parser.d.ts +0 -272
- package/dist/locus-info/selfUtils.d.ts +0 -2
- package/dist/media/index.d.ts +0 -34
- package/dist/media/properties.d.ts +0 -93
- package/dist/media/util.d.ts +0 -2
- package/dist/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/mediaQualityMetrics/config.js +0 -502
- package/dist/mediaQualityMetrics/config.js.map +0 -1
- package/dist/meeting/effectsState.js +0 -260
- package/dist/meeting/effectsState.js.map +0 -1
- package/dist/meeting/in-meeting-actions.d.ts +0 -167
- package/dist/meeting/index.d.ts +0 -1825
- package/dist/meeting/locusMediaRequest.d.ts +0 -74
- package/dist/meeting/muteState.d.ts +0 -178
- package/dist/meeting/request.d.ts +0 -295
- package/dist/meeting/request.type.d.ts +0 -11
- package/dist/meeting/state.d.ts +0 -9
- package/dist/meeting/util.d.ts +0 -119
- package/dist/meeting/voicea-meeting.d.ts +0 -16
- package/dist/meeting-info/collection.d.ts +0 -20
- package/dist/meeting-info/index.d.ts +0 -69
- package/dist/meeting-info/meeting-info-v2.d.ts +0 -123
- package/dist/meeting-info/request.d.ts +0 -22
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/dist/meetings/collection.d.ts +0 -40
- package/dist/meetings/index.d.ts +0 -390
- package/dist/meetings/meetings.types.d.ts +0 -4
- package/dist/meetings/request.d.ts +0 -27
- package/dist/meetings/util.d.ts +0 -18
- package/dist/member/index.d.ts +0 -160
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/dist/member/types.d.ts +0 -32
- package/dist/member/util.d.ts +0 -2
- package/dist/members/collection.d.ts +0 -29
- package/dist/members/index.d.ts +0 -353
- package/dist/members/request.d.ts +0 -114
- package/dist/members/types.d.ts +0 -25
- package/dist/members/util.d.ts +0 -215
- package/dist/metrics/config.js +0 -276
- package/dist/metrics/config.js.map +0 -1
- package/dist/metrics/constants.d.ts +0 -70
- package/dist/metrics/index.d.ts +0 -45
- package/dist/multistream/mediaRequestManager.d.ts +0 -119
- package/dist/multistream/receiveSlot.d.ts +0 -68
- package/dist/multistream/receiveSlotManager.d.ts +0 -56
- package/dist/multistream/remoteMedia.d.ts +0 -72
- package/dist/multistream/remoteMediaGroup.d.ts +0 -49
- package/dist/multistream/remoteMediaManager.d.ts +0 -300
- package/dist/multistream/sendSlotManager.d.ts +0 -69
- package/dist/networkQualityMonitor/index.d.ts +0 -70
- package/dist/networkQualityMonitor/index.js +0 -221
- package/dist/networkQualityMonitor/index.js.map +0 -1
- package/dist/peer-connection-manager/index.js +0 -671
- package/dist/peer-connection-manager/index.js.map +0 -1
- package/dist/peer-connection-manager/util.js +0 -109
- package/dist/peer-connection-manager/util.js.map +0 -1
- package/dist/personal-meeting-room/index.d.ts +0 -47
- package/dist/personal-meeting-room/request.d.ts +0 -14
- package/dist/personal-meeting-room/util.d.ts +0 -2
- package/dist/reachability/clusterReachability.d.ts +0 -109
- package/dist/reachability/index.d.ts +0 -105
- package/dist/reachability/request.d.ts +0 -39
- package/dist/reachability/util.d.ts +0 -8
- package/dist/reactions/constants.d.ts +0 -3
- package/dist/reactions/reactions.d.ts +0 -4
- package/dist/reactions/reactions.type.d.ts +0 -52
- package/dist/reconnection-manager/index.d.ts +0 -136
- package/dist/recording-controller/enums.d.ts +0 -7
- package/dist/recording-controller/index.d.ts +0 -207
- package/dist/recording-controller/util.d.ts +0 -14
- package/dist/roap/collection.js +0 -62
- package/dist/roap/collection.js.map +0 -1
- package/dist/roap/handler.js +0 -275
- package/dist/roap/handler.js.map +0 -1
- package/dist/roap/index.d.ts +0 -86
- package/dist/roap/request.d.ts +0 -39
- package/dist/roap/state.js +0 -126
- package/dist/roap/state.js.map +0 -1
- package/dist/roap/turnDiscovery.d.ts +0 -155
- package/dist/roap/util.js +0 -75
- package/dist/roap/util.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 -61
- package/dist/rtcMetrics/index.js +0 -197
- package/dist/rtcMetrics/index.js.map +0 -1
- package/dist/statsAnalyzer/global.d.ts +0 -36
- package/dist/statsAnalyzer/global.js +0 -126
- package/dist/statsAnalyzer/global.js.map +0 -1
- package/dist/statsAnalyzer/index.d.ts +0 -217
- package/dist/statsAnalyzer/index.js +0 -1013
- package/dist/statsAnalyzer/index.js.map +0 -1
- package/dist/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/statsAnalyzer/mqaUtil.js +0 -179
- package/dist/statsAnalyzer/mqaUtil.js.map +0 -1
- package/dist/transcription/index.d.ts +0 -64
- package/dist/types/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/types/mediaQualityMetrics/config.d.ts +0 -241
- package/dist/types/networkQualityMonitor/index.d.ts +0 -70
- package/dist/types/rtcMetrics/constants.d.ts +0 -4
- package/dist/types/rtcMetrics/index.d.ts +0 -71
- package/dist/types/statsAnalyzer/global.d.ts +0 -36
- package/dist/types/statsAnalyzer/index.d.ts +0 -217
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +0 -48
- package/dist/webinar/collection.d.ts +0 -16
- package/dist/webinar/index.d.ts +0 -5
@@ -1,300 +0,0 @@
|
|
1
|
-
import { EventMap } from 'typed-emitter';
|
2
|
-
import { MediaType, NamedMediaGroup } from '@webex/internal-media-core';
|
3
|
-
import EventsScope from '../common/events/events-scope';
|
4
|
-
import { RemoteMedia, RemoteVideoResolution } from './remoteMedia';
|
5
|
-
import { CSI } from './receiveSlot';
|
6
|
-
import { ReceiveSlotManager } from './receiveSlotManager';
|
7
|
-
import { RemoteMediaGroup } from './remoteMediaGroup';
|
8
|
-
import { MediaRequestManager } from './mediaRequestManager';
|
9
|
-
export type PaneSize = RemoteVideoResolution;
|
10
|
-
export type LayoutId = string;
|
11
|
-
export type PaneId = string;
|
12
|
-
export type PaneGroupId = string;
|
13
|
-
export interface ActiveSpeakerVideoPaneGroup {
|
14
|
-
id: PaneGroupId;
|
15
|
-
numPanes: number;
|
16
|
-
size: PaneSize;
|
17
|
-
priority: number;
|
18
|
-
}
|
19
|
-
export interface MemberVideoPane {
|
20
|
-
id: PaneId;
|
21
|
-
size: PaneSize;
|
22
|
-
csi?: CSI;
|
23
|
-
}
|
24
|
-
export interface VideoLayout {
|
25
|
-
screenShareVideo?: {
|
26
|
-
size: PaneSize;
|
27
|
-
};
|
28
|
-
activeSpeakerVideoPaneGroups?: ActiveSpeakerVideoPaneGroup[];
|
29
|
-
memberVideoPanes?: MemberVideoPane[];
|
30
|
-
}
|
31
|
-
export interface Configuration {
|
32
|
-
audio: {
|
33
|
-
numOfActiveSpeakerStreams: number;
|
34
|
-
numOfScreenShareStreams: number;
|
35
|
-
};
|
36
|
-
video: {
|
37
|
-
preferLiveVideo: boolean;
|
38
|
-
initialLayoutId: LayoutId;
|
39
|
-
layouts: {
|
40
|
-
[key: LayoutId]: VideoLayout;
|
41
|
-
};
|
42
|
-
};
|
43
|
-
namedMediaGroup?: NamedMediaGroup;
|
44
|
-
}
|
45
|
-
/**
|
46
|
-
* Default configuration:
|
47
|
-
* - uses 3 audio streams
|
48
|
-
* - prefers active speakers with live video (e.g. are not audio only or video muted) over active speakers without live video
|
49
|
-
* - has a few layouts defined, including 1 that contains remote screen share (ScreenShareView)
|
50
|
-
*/
|
51
|
-
export declare const DefaultConfiguration: Configuration;
|
52
|
-
export declare enum Event {
|
53
|
-
AudioCreated = "AudioCreated",
|
54
|
-
InterpretationAudioCreated = "InterpretationAudioCreated",
|
55
|
-
ScreenShareAudioCreated = "ScreenShareAudioCreated",
|
56
|
-
VideoLayoutChanged = "VideoLayoutChanged"
|
57
|
-
}
|
58
|
-
export interface VideoLayoutChangedEventData {
|
59
|
-
layoutId: LayoutId;
|
60
|
-
activeSpeakerVideoPanes: {
|
61
|
-
[key: PaneGroupId]: RemoteMediaGroup;
|
62
|
-
};
|
63
|
-
memberVideoPanes: {
|
64
|
-
[key: PaneId]: RemoteMedia;
|
65
|
-
};
|
66
|
-
screenShareVideo?: RemoteMedia;
|
67
|
-
}
|
68
|
-
export interface Events extends EventMap {
|
69
|
-
[Event.AudioCreated]: (audio: RemoteMediaGroup) => void;
|
70
|
-
[Event.ScreenShareAudioCreated]: (screenShareAudio: RemoteMediaGroup) => void;
|
71
|
-
[Event.VideoLayoutChanged]: (data: VideoLayoutChangedEventData) => void;
|
72
|
-
}
|
73
|
-
/**
|
74
|
-
* A helper class that manages all remote audio/video streams in order to achieve a predefined set of layouts.
|
75
|
-
* It also creates a fixed number of audio streams and these don't change during the meeting.
|
76
|
-
*
|
77
|
-
* Things that RemoteMediaManager does:
|
78
|
-
* - owns the receive slots (creates them when needed, and re-uses them when switching layouts)
|
79
|
-
* - constructs appropriate RemoteMedia and RemoteMediaGroup objects and sends appropriate mediaRequests
|
80
|
-
*/
|
81
|
-
export declare class RemoteMediaManager extends EventsScope {
|
82
|
-
private config;
|
83
|
-
private started;
|
84
|
-
private receiveSlotManager;
|
85
|
-
private mediaRequestManagers;
|
86
|
-
private currentLayout?;
|
87
|
-
private slots;
|
88
|
-
private media;
|
89
|
-
private receiveSlotAllocations;
|
90
|
-
private currentLayoutId?;
|
91
|
-
/**
|
92
|
-
* Constructor
|
93
|
-
*
|
94
|
-
* @param {ReceiveSlotManager} receiveSlotManager
|
95
|
-
* @param {{audio: MediaRequestManager, video: mediaRequestManagers}} mediaRequestManagers
|
96
|
-
* @param {Configuration} config Configuration describing what video layouts to use during the meeting
|
97
|
-
*/
|
98
|
-
constructor(receiveSlotManager: ReceiveSlotManager, mediaRequestManagers: {
|
99
|
-
audio: MediaRequestManager;
|
100
|
-
video: MediaRequestManager;
|
101
|
-
screenShareAudio: MediaRequestManager;
|
102
|
-
screenShareVideo: MediaRequestManager;
|
103
|
-
}, config?: Configuration);
|
104
|
-
/**
|
105
|
-
* Checks if configuration is valid, throws an error if it's not
|
106
|
-
*/
|
107
|
-
private checkConfigValidity;
|
108
|
-
/**
|
109
|
-
* Starts the RemoteMediaManager.
|
110
|
-
*
|
111
|
-
* @returns {Promise}
|
112
|
-
*/
|
113
|
-
start(): Promise<void>;
|
114
|
-
/**
|
115
|
-
* Releases all the used resources (like allocated receive slots). This function needs
|
116
|
-
* to be called when we leave the meeting, etc.
|
117
|
-
*/
|
118
|
-
stop(): void;
|
119
|
-
/**
|
120
|
-
* Returns the total number of main video panes required for a given layout
|
121
|
-
*
|
122
|
-
* @param {VideoLayout} layout
|
123
|
-
* @returns {number}
|
124
|
-
*/
|
125
|
-
private getRequiredNumVideoSlotsForLayout;
|
126
|
-
/**
|
127
|
-
* Allocates the maximum number of panes that any of the configured layouts will require.
|
128
|
-
* We do this at the beginning, because it's more efficient (much faster) then allocating receive slots
|
129
|
-
* later, after the SDP exchange was done.
|
130
|
-
*/
|
131
|
-
private preallocateVideoReceiveSlots;
|
132
|
-
/**
|
133
|
-
* Changes the layout (triggers Event.VideoLayoutChanged)
|
134
|
-
*
|
135
|
-
* @param {LayoutId} layoutId new layout id
|
136
|
-
* @returns {Promise}
|
137
|
-
*/
|
138
|
-
setLayout(layoutId: LayoutId): Promise<void>;
|
139
|
-
/**
|
140
|
-
* Returns the currently selected layout id
|
141
|
-
*
|
142
|
-
* @returns {LayoutId}
|
143
|
-
*/
|
144
|
-
getLayoutId(): LayoutId | undefined;
|
145
|
-
/**
|
146
|
-
* sets the preferLiveVideo
|
147
|
-
*/
|
148
|
-
setPreferLiveVideo(preferLiveVideo: boolean): void;
|
149
|
-
/**
|
150
|
-
* Sets CSIs for multiple RemoteMedia instances belonging to RemoteMediaGroup.
|
151
|
-
* For each entry in the remoteMediaCsis array:
|
152
|
-
* - if csi is specified, the RemoteMedia instance is pinned to that CSI
|
153
|
-
* - if csi is undefined, the RemoteMedia instance is unpinned
|
154
|
-
*/
|
155
|
-
setActiveSpeakerCsis(remoteMediaCsis: {
|
156
|
-
remoteMedia: RemoteMedia;
|
157
|
-
csi?: number;
|
158
|
-
}[]): void;
|
159
|
-
/**
|
160
|
-
* Sets which named media group need receiving
|
161
|
-
* @param {MediaType} mediaType of the stream
|
162
|
-
* @param {number} languageCode of the stream. If the languageId is 0, the named media group request will be canceled,
|
163
|
-
* and only receive the main audio stream.
|
164
|
-
* @returns {void}
|
165
|
-
*/
|
166
|
-
setReceiveNamedMediaGroup(mediaType: MediaType, languageId: number): Promise<void>;
|
167
|
-
/**
|
168
|
-
* Creates the audio slots
|
169
|
-
*/
|
170
|
-
private createAudioMedia;
|
171
|
-
/**
|
172
|
-
* Creates the audio slots for named media
|
173
|
-
*/
|
174
|
-
private createInterpretationAudioMedia;
|
175
|
-
/**
|
176
|
-
* Creates receive slots required for receiving screen share audio and video
|
177
|
-
*/
|
178
|
-
private createScreenShareReceiveSlots;
|
179
|
-
/**
|
180
|
-
* Creates RemoteMedia objects for screen share
|
181
|
-
*/
|
182
|
-
private createScreenShareAudioMedia;
|
183
|
-
/**
|
184
|
-
* Goes over all receiver-selected slots and keeps only the ones that are required by a given layout,
|
185
|
-
* the rest are all moved to the "unused" list
|
186
|
-
*/
|
187
|
-
private trimReceiverSelectedSlots;
|
188
|
-
/**
|
189
|
-
* Releases all the "unused" video slots.
|
190
|
-
*/
|
191
|
-
private releaseUnusedVideoSlots;
|
192
|
-
/**
|
193
|
-
* Allocates receive slots to all active speaker video panes
|
194
|
-
* in the current selected layout.
|
195
|
-
*
|
196
|
-
* Allocation tries to keep the same order of the slots between the previous
|
197
|
-
* layout and the new one. Sorting helps making sure that highest priority slots
|
198
|
-
* go in the same order in the new layout.
|
199
|
-
*/
|
200
|
-
private allocateSlotsToActiveSpeakerPaneGroups;
|
201
|
-
/**
|
202
|
-
* Allocates receive slots to all receiver selected video panes
|
203
|
-
* in the current selected layout
|
204
|
-
*/
|
205
|
-
private allocateSlotsToReceiverSelectedVideoPaneGroups;
|
206
|
-
/**
|
207
|
-
* Ensures that we have enough slots for the current layout.
|
208
|
-
*/
|
209
|
-
private refillRequiredSlotsIfNeeded;
|
210
|
-
/**
|
211
|
-
* Move all active speaker slots to "unused"
|
212
|
-
*/
|
213
|
-
private trimActiveSpeakerSlots;
|
214
|
-
/**
|
215
|
-
* Logs the state of the receive slots
|
216
|
-
*/
|
217
|
-
private logMainVideoReceiveSlots;
|
218
|
-
/** logs main audio slots */
|
219
|
-
private logMainAudioReceiveSlots;
|
220
|
-
/** logs slides video slots */
|
221
|
-
private logSlidesVideoReceiveSlots;
|
222
|
-
/** logs slides audio slots */
|
223
|
-
private logSlidesAudioReceiveSlots;
|
224
|
-
/** Logs all current receive slots */
|
225
|
-
logAllReceiveSlots(): void;
|
226
|
-
/**
|
227
|
-
* Makes sure we have the right number of receive slots created for the current layout
|
228
|
-
* and allocates them to the right video panes / pane groups
|
229
|
-
*
|
230
|
-
* @returns {Promise}
|
231
|
-
*/
|
232
|
-
private updateVideoReceiveSlots;
|
233
|
-
/**
|
234
|
-
* Creates new RemoteMedia and RemoteMediaGroup objects for the current layout
|
235
|
-
* and sends the media requests for all of them.
|
236
|
-
*/
|
237
|
-
private updateVideoRemoteMediaObjects;
|
238
|
-
/**
|
239
|
-
* Checks if current layout requires a screen share.
|
240
|
-
* If it does, it creates new RemoteMediaGroup object for screen share
|
241
|
-
* and sends the media requests for it.
|
242
|
-
* If it doesn't, it makes sure we clean up any RemoteMediaGroup objects
|
243
|
-
* created earlier for screen share (for previous layout).
|
244
|
-
*/
|
245
|
-
private updateScreenShareVideoRemoteMediaObject;
|
246
|
-
/**
|
247
|
-
* Invalidates all remote media objects belonging to currently selected layout
|
248
|
-
*/
|
249
|
-
private invalidateCurrentRemoteMedia;
|
250
|
-
/** emits Event.VideoLayoutChanged */
|
251
|
-
private emitVideoLayoutChangedEvent;
|
252
|
-
/**
|
253
|
-
* Sets a new CSI on a given remote media object
|
254
|
-
*
|
255
|
-
* @param {RemoteMedia} remoteMedia remote Media object to modify
|
256
|
-
* @param {CSI} csi new CSI value, can be null if we want to stop receiving media
|
257
|
-
*/
|
258
|
-
setRemoteVideoCsi(remoteMedia: RemoteMedia, csi: CSI | null): void;
|
259
|
-
/**
|
260
|
-
* Adds a new member video pane to the currently selected layout.
|
261
|
-
*
|
262
|
-
* Changes to the layout are lost after a layout change.
|
263
|
-
*
|
264
|
-
* @param {MemberVideoPane} newPane
|
265
|
-
* @returns {Promise<RemoteMedia>}
|
266
|
-
*/
|
267
|
-
addMemberVideoPane(newPane: MemberVideoPane): Promise<RemoteMedia>;
|
268
|
-
/**
|
269
|
-
* Removes a member video pane from the currently selected layout.
|
270
|
-
*
|
271
|
-
* Changes to the layout are lost after a layout change.
|
272
|
-
*
|
273
|
-
* @param {PaneId} paneId pane id of the pane to remove
|
274
|
-
* @returns {Promise<void>}
|
275
|
-
*/
|
276
|
-
removeMemberVideoPane(paneId: PaneId): Promise<void>;
|
277
|
-
/**
|
278
|
-
* Pins an active speaker remote media object to the given CSI value. From that moment
|
279
|
-
* onwards the remote media will only play audio/video from that specific CSI until
|
280
|
-
* unpinActiveSpeakerVideoPane() is called or current layout is changed.
|
281
|
-
*
|
282
|
-
* @param {RemoteMedia} remoteMedia remote media object reference
|
283
|
-
* @param {CSI} csi CSI value to pin to, if undefined, then current CSI value is used
|
284
|
-
*/
|
285
|
-
pinActiveSpeakerVideoPane(remoteMedia: RemoteMedia, csi?: CSI): void;
|
286
|
-
/**
|
287
|
-
* Unpins a remote media object from the fixed CSI value it was pinned to.
|
288
|
-
*
|
289
|
-
* @param {RemoteMedia} remoteMedia remote media object reference
|
290
|
-
*/
|
291
|
-
unpinActiveSpeakerVideoPane(remoteMedia: RemoteMedia): void;
|
292
|
-
/**
|
293
|
-
* Returns true if a given remote media object belongs to an active speaker group and has been pinned.
|
294
|
-
* Throws an error if the remote media object doesn't belong to any active speaker remote media group.
|
295
|
-
*
|
296
|
-
* @param {RemoteMedia} remoteMedia remote media object
|
297
|
-
* @returns {boolean}
|
298
|
-
*/
|
299
|
-
isPinned(remoteMedia: RemoteMedia): boolean;
|
300
|
-
}
|
@@ -1,69 +0,0 @@
|
|
1
|
-
import { SendSlot, MediaType, LocalStream, MultistreamRoapMediaConnection, NamedMediaGroup } from '@webex/internal-media-core';
|
2
|
-
export default class SendSlotManager {
|
3
|
-
private readonly slots;
|
4
|
-
private readonly LoggerProxy;
|
5
|
-
constructor(LoggerProxy: any);
|
6
|
-
/**
|
7
|
-
* This method is used to create a sendSlot for the given mediaType and returns the created sendSlot
|
8
|
-
* @param {MultistreamRoapMediaConnection} mediaConnection MultistreamRoapMediaConnection for which a sendSlot needs to be created
|
9
|
-
* @param {MediaType} mediaType MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
10
|
-
* @param {boolean} active This is optional boolean to set the active state of the sendSlot. Default is true
|
11
|
-
* @returns {SendSlot} slot The created sendSlot
|
12
|
-
*/
|
13
|
-
createSlot(mediaConnection: MultistreamRoapMediaConnection, mediaType: MediaType, active?: boolean): SendSlot;
|
14
|
-
/**
|
15
|
-
* This method is used to retrieve the sendSlot for the given mediaType
|
16
|
-
* @param {MediaType} mediaType of which the slot needs to be retrieved
|
17
|
-
* @returns {SendSlot}
|
18
|
-
*/
|
19
|
-
getSlot(mediaType: MediaType): SendSlot;
|
20
|
-
/**
|
21
|
-
* Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.
|
22
|
-
* @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group
|
23
|
-
* @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,
|
24
|
-
* named media group will be canceled and the audio stream will be sent to the floor.
|
25
|
-
* @returns {void}
|
26
|
-
*/
|
27
|
-
setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]): void;
|
28
|
-
/**
|
29
|
-
* This method publishes the given stream to the sendSlot for the given mediaType
|
30
|
-
* @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
31
|
-
* @param {LocalStream} stream LocalStream to be published
|
32
|
-
* @returns {Promise<void>}
|
33
|
-
*/
|
34
|
-
publishStream(mediaType: MediaType, stream: LocalStream): Promise<void>;
|
35
|
-
/**
|
36
|
-
* This method unpublishes the stream from the sendSlot of the given mediaType
|
37
|
-
* @param {MediaType} mediaType MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
38
|
-
* @returns {Promise<void>}
|
39
|
-
*/
|
40
|
-
unpublishStream(mediaType: MediaType): Promise<void>;
|
41
|
-
/**
|
42
|
-
* This method is used to set the active state of the sendSlot for the given mediaType
|
43
|
-
* @param {MediaType} mediaType The MediaType of the sendSlot for which the active state needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
44
|
-
* @param {boolean} active The boolean to set the active state of the sendSlot. Default is true
|
45
|
-
* @returns {void}
|
46
|
-
*/
|
47
|
-
setActive(mediaType: MediaType, active?: boolean): void;
|
48
|
-
/**
|
49
|
-
* This method is used to set the codec parameters for the sendSlot of the given mediaType
|
50
|
-
* @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
51
|
-
* @param {Object} codecParameters
|
52
|
-
* @returns {Promise<void>}
|
53
|
-
*/
|
54
|
-
setCodecParameters(mediaType: MediaType, codecParameters: {
|
55
|
-
[key: string]: string | undefined;
|
56
|
-
}): Promise<void>;
|
57
|
-
/**
|
58
|
-
* This method is used to delete the codec parameters for the sendSlot of the given mediaType
|
59
|
-
* @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
60
|
-
* @param {Array<String>} parameters Array of keys of the codec parameters to be deleted
|
61
|
-
* @returns {Promise<void>}
|
62
|
-
*/
|
63
|
-
deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise<void>;
|
64
|
-
/**
|
65
|
-
* This method is used to reset the SendSlotsManager by deleting all the sendSlots
|
66
|
-
* @returns {undefined}
|
67
|
-
*/
|
68
|
-
reset(): void;
|
69
|
-
}
|
@@ -1,70 +0,0 @@
|
|
1
|
-
import EventsScope from '../common/events/events-scope';
|
2
|
-
/**
|
3
|
-
* Meeting - network quality event
|
4
|
-
* Emitted on each interval of retrieving stats Analyzer data
|
5
|
-
* @event network:quality
|
6
|
-
* @type {Object}
|
7
|
-
* @property {string} mediaType {video|audio}
|
8
|
-
* @property {number} networkQualityScore - value determined in determineUplinkNetworkQuality
|
9
|
-
* @memberof NetworkQualityMonitor
|
10
|
-
*/
|
11
|
-
/**
|
12
|
-
* NetworkQualityMonitor class that will emit events based on detected quality
|
13
|
-
*
|
14
|
-
* @class NetworkQualityMonitor
|
15
|
-
* @extends {EventsScope}
|
16
|
-
*/
|
17
|
-
export default class NetworkQualityMonitor extends EventsScope {
|
18
|
-
config: any;
|
19
|
-
frequencyTypes: any;
|
20
|
-
indicatorTypes: any;
|
21
|
-
mediaType: any;
|
22
|
-
networkQualityScore: any;
|
23
|
-
networkQualityStatus: any;
|
24
|
-
/**
|
25
|
-
* Creates a new instance of NetworkQualityMonitor
|
26
|
-
* @constructor
|
27
|
-
* @public
|
28
|
-
* @param {Object} config
|
29
|
-
* @property {Object} indicatorTypes - network properties used to evaluate network quality used as constants
|
30
|
-
* @property {Object} frequencyTypes - frequency properties used as constants {uplink|send} {downlink|receive}
|
31
|
-
* @property {number} networkQualityScore - 0|1 1 is acceptable 0 is bad/unknown
|
32
|
-
* @property {Object} networkQualityStatus - hash object based on indicatorTypes and frequencyTypes
|
33
|
-
* @property {string} mediaType - audio|video
|
34
|
-
*/
|
35
|
-
constructor(config: any);
|
36
|
-
/**
|
37
|
-
* emits NETWORK_QUALITY event on meeting with payload of media type and uplinkNetworkQuality score
|
38
|
-
*
|
39
|
-
* @memberof NetworkQualityMonitor
|
40
|
-
* @returns {void}
|
41
|
-
*/
|
42
|
-
emitNetworkQuality(): void;
|
43
|
-
/**
|
44
|
-
* invokes emitNetworkQuality method resets values back to default
|
45
|
-
* @returns {void}
|
46
|
-
* @memberof NetworkQualityMonitor
|
47
|
-
*/
|
48
|
-
updateNetworkQualityStatus(): void;
|
49
|
-
/**
|
50
|
-
* filter data to determine uplink network quality, invoked on same interval as stats analyzer remote-inbout-rtp
|
51
|
-
* @param {Object} configObj
|
52
|
-
* @param {string} configObj.mediaType {audio|video}
|
53
|
-
* @param {RTCStats} configObj.remoteRtpResults RTC stats remote obj
|
54
|
-
* @param {Object} configObj.statsAnalyzerCurrentStats statsResults
|
55
|
-
* @returns {void}
|
56
|
-
* @public
|
57
|
-
* @memberof NetworkQualityMonitor
|
58
|
-
*/
|
59
|
-
determineUplinkNetworkQuality({ mediaType, remoteRtpResults, statsAnalyzerCurrentStats, }: {
|
60
|
-
mediaType: string;
|
61
|
-
remoteRtpResults: any;
|
62
|
-
statsAnalyzerCurrentStats: object;
|
63
|
-
}): void;
|
64
|
-
/**
|
65
|
-
* Get the current status of network quaility object - networkQualityStatus
|
66
|
-
* @returns {Object}
|
67
|
-
* @public
|
68
|
-
*/
|
69
|
-
get networkQualityStats(): any;
|
70
|
-
}
|
@@ -1,221 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
var _Reflect$construct = require("@babel/runtime-corejs2/core-js/reflect/construct");
|
4
|
-
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
5
|
-
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
6
|
-
_Object$defineProperty(exports, "__esModule", {
|
7
|
-
value: true
|
8
|
-
});
|
9
|
-
exports.default = void 0;
|
10
|
-
var _freeze = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/freeze"));
|
11
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
12
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
13
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
14
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
15
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
16
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
17
|
-
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
18
|
-
var _constants = require("../constants");
|
19
|
-
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2.default)(o), (0, _possibleConstructorReturn2.default)(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], (0, _getPrototypeOf2.default)(t).constructor) : o.apply(t, e)); }
|
20
|
-
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
21
|
-
/**
|
22
|
-
* Meeting - network quality event
|
23
|
-
* Emitted on each interval of retrieving stats Analyzer data
|
24
|
-
* @event network:quality
|
25
|
-
* @type {Object}
|
26
|
-
* @property {string} mediaType {video|audio}
|
27
|
-
* @property {number} networkQualityScore - value determined in determineUplinkNetworkQuality
|
28
|
-
* @memberof NetworkQualityMonitor
|
29
|
-
*/
|
30
|
-
/**
|
31
|
-
* NetworkQualityMonitor class that will emit events based on detected quality
|
32
|
-
*
|
33
|
-
* @class NetworkQualityMonitor
|
34
|
-
* @extends {EventsScope}
|
35
|
-
*/
|
36
|
-
var NetworkQualityMonitor = exports.default = /*#__PURE__*/function (_EventsScope) {
|
37
|
-
/**
|
38
|
-
* Creates a new instance of NetworkQualityMonitor
|
39
|
-
* @constructor
|
40
|
-
* @public
|
41
|
-
* @param {Object} config
|
42
|
-
* @property {Object} indicatorTypes - network properties used to evaluate network quality used as constants
|
43
|
-
* @property {Object} frequencyTypes - frequency properties used as constants {uplink|send} {downlink|receive}
|
44
|
-
* @property {number} networkQualityScore - 0|1 1 is acceptable 0 is bad/unknown
|
45
|
-
* @property {Object} networkQualityStatus - hash object based on indicatorTypes and frequencyTypes
|
46
|
-
* @property {string} mediaType - audio|video
|
47
|
-
*/
|
48
|
-
function NetworkQualityMonitor(config) {
|
49
|
-
var _this;
|
50
|
-
(0, _classCallCheck2.default)(this, NetworkQualityMonitor);
|
51
|
-
_this = _callSuper(this, NetworkQualityMonitor);
|
52
|
-
(0, _defineProperty2.default)(_this, "config", void 0);
|
53
|
-
(0, _defineProperty2.default)(_this, "frequencyTypes", void 0);
|
54
|
-
(0, _defineProperty2.default)(_this, "indicatorTypes", void 0);
|
55
|
-
(0, _defineProperty2.default)(_this, "mediaType", void 0);
|
56
|
-
(0, _defineProperty2.default)(_this, "networkQualityScore", void 0);
|
57
|
-
(0, _defineProperty2.default)(_this, "networkQualityStatus", void 0);
|
58
|
-
_this.config = config;
|
59
|
-
_this.indicatorTypes = (0, _freeze.default)({
|
60
|
-
PACKETLOSS: 'packetLoss',
|
61
|
-
LATENCY: 'latency',
|
62
|
-
JITTER: 'jitter'
|
63
|
-
});
|
64
|
-
_this.frequencyTypes = (0, _freeze.default)({
|
65
|
-
UPLINK: 'uplink',
|
66
|
-
DOWNLINK: 'downlink'
|
67
|
-
});
|
68
|
-
_this.networkQualityScore = 1;
|
69
|
-
_this.networkQualityStatus = (0, _defineProperty2.default)({}, _this.frequencyTypes.UPLINK, (0, _defineProperty2.default)((0, _defineProperty2.default)((0, _defineProperty2.default)({}, _constants.STATS.VIDEO_CORRELATE, {}), _constants.STATS.AUDIO_CORRELATE, {}), _constants.STATS.SHARE_CORRELATE, {}));
|
70
|
-
_this.mediaType = null;
|
71
|
-
return _this;
|
72
|
-
}
|
73
|
-
|
74
|
-
/**
|
75
|
-
* emits NETWORK_QUALITY event on meeting with payload of media type and uplinkNetworkQuality score
|
76
|
-
*
|
77
|
-
* @memberof NetworkQualityMonitor
|
78
|
-
* @returns {void}
|
79
|
-
*/
|
80
|
-
(0, _inherits2.default)(NetworkQualityMonitor, _EventsScope);
|
81
|
-
return (0, _createClass2.default)(NetworkQualityMonitor, [{
|
82
|
-
key: "emitNetworkQuality",
|
83
|
-
value: function emitNetworkQuality() {
|
84
|
-
this.emit({
|
85
|
-
file: 'networkQualityMonitor',
|
86
|
-
function: 'emitNetworkQuality'
|
87
|
-
}, _constants.EVENT_TRIGGERS.NETWORK_QUALITY, {
|
88
|
-
mediaType: this.mediaType,
|
89
|
-
networkQualityScore: this.networkQualityScore
|
90
|
-
});
|
91
|
-
}
|
92
|
-
|
93
|
-
/**
|
94
|
-
* invokes emitNetworkQuality method resets values back to default
|
95
|
-
* @returns {void}
|
96
|
-
* @memberof NetworkQualityMonitor
|
97
|
-
*/
|
98
|
-
}, {
|
99
|
-
key: "updateNetworkQualityStatus",
|
100
|
-
value: function updateNetworkQualityStatus() {
|
101
|
-
this.emitNetworkQuality();
|
102
|
-
|
103
|
-
// reset values
|
104
|
-
this.networkQualityScore = 1;
|
105
|
-
this.mediaType = null;
|
106
|
-
}
|
107
|
-
|
108
|
-
/**
|
109
|
-
* filter data to determine uplink network quality, invoked on same interval as stats analyzer remote-inbout-rtp
|
110
|
-
* @param {Object} configObj
|
111
|
-
* @param {string} configObj.mediaType {audio|video}
|
112
|
-
* @param {RTCStats} configObj.remoteRtpResults RTC stats remote obj
|
113
|
-
* @param {Object} configObj.statsAnalyzerCurrentStats statsResults
|
114
|
-
* @returns {void}
|
115
|
-
* @public
|
116
|
-
* @memberof NetworkQualityMonitor
|
117
|
-
*/
|
118
|
-
}, {
|
119
|
-
key: "determineUplinkNetworkQuality",
|
120
|
-
value: function determineUplinkNetworkQuality(_ref) {
|
121
|
-
var _this2 = this;
|
122
|
-
var mediaType = _ref.mediaType,
|
123
|
-
remoteRtpResults = _ref.remoteRtpResults,
|
124
|
-
statsAnalyzerCurrentStats = _ref.statsAnalyzerCurrentStats;
|
125
|
-
var roundTripTimeInMilliseconds = remoteRtpResults.roundTripTime * 1000;
|
126
|
-
var jitterInMilliseconds = remoteRtpResults.jitter * 1000;
|
127
|
-
var currentPacketLossRatio = statsAnalyzerCurrentStats[mediaType].send.currentPacketLossRatio;
|
128
|
-
this.mediaType = mediaType;
|
129
|
-
var _this$indicatorTypes = this.indicatorTypes,
|
130
|
-
JITTER = _this$indicatorTypes.JITTER,
|
131
|
-
PACKETLOSS = _this$indicatorTypes.PACKETLOSS,
|
132
|
-
LATENCY = _this$indicatorTypes.LATENCY;
|
133
|
-
var UPLINK = this.frequencyTypes.UPLINK;
|
134
|
-
|
135
|
-
/**
|
136
|
-
* determines if packetLoss ratio is over threshold set in config
|
137
|
-
* sets networkQualityScore to 0 if over threshold
|
138
|
-
* @returns {boolean}
|
139
|
-
*/
|
140
|
-
var determinePacketLoss = function determinePacketLoss() {
|
141
|
-
if (currentPacketLossRatio > _this2.config.videoPacketLossRatioThreshold) {
|
142
|
-
_this2.networkQualityScore = 0;
|
143
|
-
return false;
|
144
|
-
}
|
145
|
-
return true;
|
146
|
-
};
|
147
|
-
|
148
|
-
/**
|
149
|
-
* determines if round trip time value is over threshold set in config
|
150
|
-
* sets networkQualityScore to 0 if over threshold
|
151
|
-
* @returns {boolean}
|
152
|
-
*/
|
153
|
-
var determineLatency = function determineLatency() {
|
154
|
-
if (roundTripTimeInMilliseconds > _this2.config.rttThreshold) {
|
155
|
-
_this2.networkQualityScore = 0;
|
156
|
-
return false;
|
157
|
-
}
|
158
|
-
return true;
|
159
|
-
};
|
160
|
-
|
161
|
-
/**
|
162
|
-
* determines if jitter value is over threshold in config
|
163
|
-
* sets networkQualityScore to 0 if over threshold
|
164
|
-
* @returns {boolean}
|
165
|
-
*/
|
166
|
-
var deterMineJitter = function deterMineJitter() {
|
167
|
-
if (jitterInMilliseconds > _this2.config.jitterThreshold) {
|
168
|
-
_this2.networkQualityScore = 0;
|
169
|
-
return false;
|
170
|
-
}
|
171
|
-
return true;
|
172
|
-
};
|
173
|
-
|
174
|
-
/**
|
175
|
-
* returns null if val is specifically undefined
|
176
|
-
* @param {(number|undefined)} value
|
177
|
-
* @returns {(number|null)}
|
178
|
-
*/
|
179
|
-
var determineIfUndefined = function determineIfUndefined(value) {
|
180
|
-
return typeof value === 'undefined' ? null : value;
|
181
|
-
};
|
182
|
-
|
183
|
-
/**
|
184
|
-
* Values for some browsers specifically Safari will be undefined we explicitly set to null
|
185
|
-
* https://bugs.webkit.org/show_bug.cgi?id=206645
|
186
|
-
* https://bugs.webkit.org/show_bug.cgi?id=212668
|
187
|
-
*/
|
188
|
-
// PACKET LOSS
|
189
|
-
this.networkQualityStatus[UPLINK][mediaType][PACKETLOSS] = {
|
190
|
-
acceptable: determinePacketLoss(),
|
191
|
-
value: determineIfUndefined(currentPacketLossRatio)
|
192
|
-
};
|
193
|
-
|
194
|
-
// LATENCY measured in Round trip time
|
195
|
-
this.networkQualityStatus[UPLINK][mediaType][LATENCY] = {
|
196
|
-
acceptable: determineLatency(),
|
197
|
-
value: determineIfUndefined(remoteRtpResults.roundTripTime)
|
198
|
-
};
|
199
|
-
|
200
|
-
// JITTER
|
201
|
-
this.networkQualityStatus[UPLINK][mediaType][JITTER] = {
|
202
|
-
acceptable: deterMineJitter(),
|
203
|
-
value: determineIfUndefined(remoteRtpResults.jitter)
|
204
|
-
};
|
205
|
-
this.updateNetworkQualityStatus();
|
206
|
-
}
|
207
|
-
|
208
|
-
/**
|
209
|
-
* Get the current status of network quaility object - networkQualityStatus
|
210
|
-
* @returns {Object}
|
211
|
-
* @public
|
212
|
-
*/
|
213
|
-
}, {
|
214
|
-
key: "networkQualityStats",
|
215
|
-
get: function get() {
|
216
|
-
var UPLINK = this.frequencyTypes.UPLINK;
|
217
|
-
return this.networkQualityStatus[UPLINK];
|
218
|
-
}
|
219
|
-
}]);
|
220
|
-
}(_eventsScope.default);
|
221
|
-
//# sourceMappingURL=index.js.map
|