@webex/plugin-meetings 3.7.0 → 3.8.0
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/dist/annotation/annotation.types.d.ts +42 -0
- package/dist/annotation/constants.d.ts +31 -0
- package/dist/annotation/index.d.ts +117 -0
- package/dist/annotation/index.js +17 -0
- package/dist/annotation/index.js.map +1 -1
- package/dist/breakouts/breakout.d.ts +8 -0
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/collection.d.ts +5 -0
- package/dist/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/breakouts/events.d.ts +8 -0
- package/dist/breakouts/index.d.ts +5 -0
- package/dist/breakouts/index.js +1 -1
- package/dist/breakouts/request.d.ts +22 -0
- package/dist/breakouts/utils.d.ts +15 -0
- package/dist/common/browser-detection.d.ts +9 -0
- package/dist/common/collection.d.ts +48 -0
- package/dist/common/config.d.ts +2 -0
- package/dist/common/errors/captcha-error.d.ts +15 -0
- package/dist/common/errors/intent-to-join.d.ts +16 -0
- package/dist/common/errors/join-forbidden-error.js +52 -0
- package/dist/common/errors/join-forbidden-error.js.map +1 -0
- package/dist/common/errors/join-meeting.d.ts +17 -0
- package/dist/common/errors/{webinar-registration-error.js → join-webinar-error.js} +12 -12
- package/dist/common/errors/join-webinar-error.js.map +1 -0
- package/dist/common/errors/media.d.ts +15 -0
- package/dist/common/errors/multistream-not-supported-error.js +53 -0
- package/dist/common/errors/multistream-not-supported-error.js.map +1 -0
- package/dist/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/common/errors/parameter.d.ts +15 -0
- package/dist/common/errors/password-error.d.ts +15 -0
- package/dist/common/errors/permission.d.ts +14 -0
- package/dist/common/errors/reclaim-host-role-error.js +149 -0
- package/dist/common/errors/reclaim-host-role-error.js.map +1 -0
- package/dist/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/common/errors/reconnection-in-progress.js +33 -0
- package/dist/common/errors/reconnection-in-progress.js.map +1 -0
- package/dist/common/errors/reconnection.d.ts +15 -0
- package/dist/common/errors/stats.d.ts +15 -0
- package/dist/common/errors/webex-errors.d.ts +93 -0
- package/dist/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/common/events/events-scope.d.ts +17 -0
- package/dist/common/events/events.d.ts +12 -0
- package/dist/common/events/trigger-proxy.d.ts +2 -0
- package/dist/common/events/util.d.ts +2 -0
- package/dist/common/logs/logger-config.d.ts +2 -0
- package/dist/common/logs/logger-proxy.d.ts +2 -0
- package/dist/common/logs/request.d.ts +36 -0
- package/dist/common/queue.d.ts +34 -0
- package/dist/config.d.ts +72 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.d.ts +1088 -0
- package/dist/constants.js +68 -6
- package/dist/constants.js.map +1 -1
- package/dist/controls-options-manager/constants.d.ts +4 -0
- package/dist/controls-options-manager/enums.d.ts +15 -0
- package/dist/controls-options-manager/index.d.ts +136 -0
- package/dist/controls-options-manager/types.d.ts +43 -0
- package/dist/controls-options-manager/util.d.ts +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +16 -11
- package/dist/index.js.map +1 -1
- package/dist/interceptors/index.d.ts +2 -0
- package/dist/interceptors/locusRetry.d.ts +27 -0
- package/dist/interpretation/collection.d.ts +5 -0
- package/dist/interpretation/index.d.ts +5 -0
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.d.ts +5 -0
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.d.ts +2 -0
- package/dist/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/locus-info/fullState.d.ts +2 -0
- package/dist/locus-info/hostUtils.d.ts +2 -0
- package/dist/locus-info/index.d.ts +322 -0
- package/dist/locus-info/index.js +14 -3
- package/dist/locus-info/index.js.map +1 -1
- package/dist/locus-info/infoUtils.d.ts +2 -0
- package/dist/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/locus-info/parser.d.ts +272 -0
- package/dist/locus-info/selfUtils.d.ts +2 -0
- package/dist/locus-info/selfUtils.js +35 -17
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +1 -0
- package/dist/media/MediaConnectionAwaiter.js.map +1 -1
- package/dist/media/index.d.ts +34 -0
- package/dist/media/properties.d.ts +93 -0
- package/dist/media/properties.js +30 -16
- package/dist/media/properties.js.map +1 -1
- package/dist/media/util.d.ts +2 -0
- package/dist/mediaQualityMetrics/config.d.ts +241 -0
- package/dist/mediaQualityMetrics/config.js +502 -0
- package/dist/mediaQualityMetrics/config.js.map +1 -0
- package/dist/meeting/brbState.js +167 -0
- package/dist/meeting/brbState.js.map +1 -0
- package/dist/meeting/effectsState.js +260 -0
- package/dist/meeting/effectsState.js.map +1 -0
- package/dist/meeting/in-meeting-actions.d.ts +167 -0
- package/dist/meeting/in-meeting-actions.js +13 -1
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.d.ts +1825 -0
- package/dist/meeting/index.js +1331 -1051
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.d.ts +74 -0
- package/dist/meeting/locusMediaRequest.js +11 -6
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/muteState.d.ts +178 -0
- package/dist/meeting/muteState.js +1 -6
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.d.ts +295 -0
- package/dist/meeting/request.js +51 -29
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/request.type.d.ts +11 -0
- package/dist/meeting/request.type.js.map +1 -1
- package/dist/meeting/state.d.ts +9 -0
- package/dist/meeting/util.d.ts +119 -0
- package/dist/meeting/util.js +103 -67
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.d.ts +16 -0
- package/dist/meeting-info/collection.d.ts +20 -0
- package/dist/meeting-info/index.d.ts +69 -0
- package/dist/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/meeting-info/meeting-info-v2.js +115 -45
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/request.d.ts +22 -0
- package/dist/meeting-info/util.d.ts +2 -0
- package/dist/meeting-info/utilv2.d.ts +2 -0
- package/dist/meeting-info/utilv2.js +6 -2
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/collection.d.ts +40 -0
- package/dist/meetings/index.d.ts +390 -0
- package/dist/meetings/index.js +107 -55
- package/dist/meetings/index.js.map +1 -1
- package/dist/meetings/meetings.types.d.ts +4 -0
- package/dist/meetings/meetings.types.js +2 -0
- package/dist/meetings/meetings.types.js.map +1 -1
- package/dist/meetings/request.d.ts +27 -0
- package/dist/meetings/util.d.ts +18 -0
- package/dist/meetings/util.js +1 -1
- package/dist/meetings/util.js.map +1 -1
- package/dist/member/index.d.ts +160 -0
- package/dist/member/index.js +9 -0
- package/dist/member/index.js.map +1 -1
- package/dist/member/member.types.js +17 -0
- package/dist/member/member.types.js.map +1 -0
- package/dist/member/types.d.ts +32 -0
- package/dist/member/types.js.map +1 -1
- package/dist/member/util.d.ts +2 -0
- package/dist/member/util.js +39 -28
- package/dist/member/util.js.map +1 -1
- package/dist/members/collection.d.ts +29 -0
- package/dist/members/index.d.ts +353 -0
- package/dist/members/request.d.ts +114 -0
- package/dist/members/types.d.ts +25 -0
- package/dist/members/util.d.ts +215 -0
- package/dist/members/util.js +4 -2
- package/dist/members/util.js.map +1 -1
- package/dist/metrics/config.js +276 -0
- package/dist/metrics/config.js.map +1 -0
- package/dist/metrics/constants.d.ts +70 -0
- package/dist/metrics/constants.js +6 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/metrics/index.d.ts +45 -0
- package/dist/multistream/mediaRequestManager.d.ts +119 -0
- package/dist/multistream/receiveSlot.d.ts +68 -0
- package/dist/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/multistream/remoteMedia.d.ts +72 -0
- package/dist/multistream/remoteMedia.js +30 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.d.ts +49 -0
- package/dist/multistream/remoteMediaManager.d.ts +300 -0
- package/dist/multistream/sendSlotManager.d.ts +69 -0
- package/dist/multistream/sendSlotManager.js +24 -0
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/networkQualityMonitor/index.d.ts +70 -0
- package/dist/networkQualityMonitor/index.js +13 -19
- package/dist/networkQualityMonitor/index.js.map +1 -1
- 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.js +109 -0
- package/dist/peer-connection-manager/util.js.map +1 -0
- package/dist/personal-meeting-room/index.d.ts +47 -0
- package/dist/personal-meeting-room/request.d.ts +14 -0
- package/dist/personal-meeting-room/util.d.ts +2 -0
- package/dist/reachability/clusterReachability.d.ts +109 -0
- package/dist/reachability/clusterReachability.js +12 -15
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.d.ts +105 -0
- package/dist/reachability/index.js +461 -136
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/reachability.types.js +7 -0
- package/dist/reachability/reachability.types.js.map +1 -0
- package/dist/reachability/request.d.ts +39 -0
- package/dist/reachability/request.js +21 -8
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.d.ts +8 -0
- package/dist/reactions/constants.d.ts +3 -0
- package/dist/reactions/reactions.d.ts +4 -0
- package/dist/reactions/reactions.type.d.ts +52 -0
- package/dist/reconnection-manager/index.d.ts +136 -0
- package/dist/recording-controller/enums.d.ts +7 -0
- package/dist/recording-controller/enums.js +8 -4
- package/dist/recording-controller/enums.js.map +1 -1
- package/dist/recording-controller/index.d.ts +207 -0
- package/dist/recording-controller/index.js +18 -9
- package/dist/recording-controller/index.js.map +1 -1
- package/dist/recording-controller/util.d.ts +14 -0
- package/dist/recording-controller/util.js +13 -9
- package/dist/recording-controller/util.js.map +1 -1
- package/dist/roap/collection.js +62 -0
- package/dist/roap/collection.js.map +1 -0
- package/dist/roap/handler.js +275 -0
- package/dist/roap/handler.js.map +1 -0
- package/dist/roap/index.d.ts +86 -0
- package/dist/roap/index.js +15 -15
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.d.ts +39 -0
- package/dist/roap/request.js +45 -79
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/state.js +126 -0
- package/dist/roap/state.js.map +1 -0
- package/dist/roap/turnDiscovery.d.ts +155 -0
- package/dist/roap/turnDiscovery.js +3 -6
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/roap/util.js +75 -0
- package/dist/roap/util.js.map +1 -0
- package/dist/rtcMetrics/constants.d.ts +4 -0
- package/dist/rtcMetrics/index.d.ts +61 -0
- package/dist/statsAnalyzer/global.d.ts +36 -0
- package/dist/statsAnalyzer/global.js +126 -0
- package/dist/statsAnalyzer/global.js.map +1 -0
- package/dist/statsAnalyzer/index.d.ts +217 -0
- package/dist/statsAnalyzer/index.js +1013 -0
- package/dist/statsAnalyzer/index.js.map +1 -0
- package/dist/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/statsAnalyzer/mqaUtil.js +179 -0
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -0
- package/dist/transcription/index.d.ts +64 -0
- package/dist/types/annotation/index.d.ts +5 -0
- package/dist/types/common/errors/join-forbidden-error.d.ts +15 -0
- package/dist/types/common/errors/{webinar-registration-error.d.ts → join-webinar-error.d.ts} +2 -2
- package/dist/types/common/errors/multistream-not-supported-error.d.ts +17 -0
- package/dist/types/common/errors/reconnection-in-progress.d.ts +9 -0
- package/dist/types/config.d.ts +1 -0
- package/dist/types/constants.d.ts +53 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/locus-info/index.d.ts +2 -1
- package/dist/types/mediaQualityMetrics/config.d.ts +241 -0
- package/dist/types/meeting/brbState.d.ts +54 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +12 -0
- package/dist/types/meeting/index.d.ts +64 -14
- package/dist/types/meeting/locusMediaRequest.d.ts +6 -3
- package/dist/types/meeting/request.d.ts +14 -3
- package/dist/types/meeting/request.type.d.ts +6 -0
- package/dist/types/meeting/util.d.ts +3 -3
- package/dist/types/meeting-info/meeting-info-v2.d.ts +30 -5
- package/dist/types/meetings/index.d.ts +20 -2
- package/dist/types/meetings/meetings.types.d.ts +8 -0
- package/dist/types/member/index.d.ts +1 -0
- package/dist/types/member/types.d.ts +7 -0
- package/dist/types/members/util.d.ts +2 -0
- package/dist/types/metrics/constants.d.ts +6 -1
- package/dist/types/multistream/sendSlotManager.d.ts +8 -1
- package/dist/types/reachability/clusterReachability.d.ts +1 -10
- package/dist/types/reachability/index.d.ts +83 -36
- package/dist/types/reachability/reachability.types.d.ts +64 -0
- package/dist/types/reachability/request.d.ts +5 -1
- package/dist/types/recording-controller/enums.d.ts +5 -2
- package/dist/types/recording-controller/index.d.ts +1 -0
- package/dist/types/recording-controller/util.d.ts +2 -1
- package/dist/types/roap/request.d.ts +1 -13
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +217 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/webinar/collection.d.ts +16 -0
- package/dist/webinar/index.d.ts +5 -0
- package/dist/webinar/index.js +390 -7
- package/dist/webinar/index.js.map +1 -1
- package/package.json +23 -22
- package/src/annotation/index.ts +16 -0
- package/src/common/errors/join-forbidden-error.ts +26 -0
- package/src/common/errors/join-webinar-error.ts +24 -0
- package/src/common/errors/multistream-not-supported-error.ts +30 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +61 -3
- package/src/index.ts +5 -3
- package/src/locus-info/index.ts +20 -3
- package/src/locus-info/selfUtils.ts +24 -6
- package/src/media/MediaConnectionAwaiter.ts +2 -0
- package/src/media/properties.ts +34 -13
- package/src/meeting/brbState.ts +169 -0
- package/src/meeting/in-meeting-actions.ts +25 -0
- package/src/meeting/index.ts +443 -87
- package/src/meeting/locusMediaRequest.ts +11 -8
- package/src/meeting/muteState.ts +1 -6
- package/src/meeting/request.ts +30 -12
- package/src/meeting/request.type.ts +7 -0
- package/src/meeting/util.ts +32 -13
- package/src/meeting-info/meeting-info-v2.ts +83 -12
- package/src/meeting-info/utilv2.ts +17 -3
- package/src/meetings/index.ts +79 -20
- package/src/meetings/meetings.types.ts +10 -0
- package/src/meetings/util.ts +2 -1
- package/src/member/index.ts +9 -0
- package/src/member/types.ts +8 -0
- package/src/member/util.ts +34 -24
- package/src/members/util.ts +1 -0
- package/src/metrics/constants.ts +6 -1
- package/src/multistream/remoteMedia.ts +28 -15
- package/src/multistream/sendSlotManager.ts +31 -0
- package/src/reachability/clusterReachability.ts +5 -15
- package/src/reachability/index.ts +311 -75
- package/src/reachability/reachability.types.ts +85 -0
- package/src/reachability/request.ts +55 -31
- package/src/recording-controller/enums.ts +5 -2
- package/src/recording-controller/index.ts +17 -4
- package/src/recording-controller/util.ts +20 -5
- package/src/roap/index.ts +14 -13
- package/src/roap/request.ts +30 -44
- package/src/roap/turnDiscovery.ts +2 -4
- package/src/webinar/index.ts +235 -9
- package/test/unit/spec/annotation/index.ts +46 -1
- package/test/unit/spec/locus-info/index.js +292 -60
- package/test/unit/spec/locus-info/selfConstant.js +7 -0
- package/test/unit/spec/locus-info/selfUtils.js +101 -1
- package/test/unit/spec/media/properties.ts +15 -0
- package/test/unit/spec/meeting/brbState.ts +114 -0
- package/test/unit/spec/meeting/in-meeting-actions.ts +15 -1
- package/test/unit/spec/meeting/index.js +851 -107
- package/test/unit/spec/meeting/locusMediaRequest.ts +18 -11
- package/test/unit/spec/meeting/muteState.js +0 -24
- package/test/unit/spec/meeting/request.js +3 -26
- package/test/unit/spec/meeting/utils.js +73 -28
- package/test/unit/spec/meeting-info/meetinginfov2.js +46 -4
- package/test/unit/spec/meeting-info/utilv2.js +26 -0
- package/test/unit/spec/meetings/index.js +159 -18
- package/test/unit/spec/meetings/utils.js +10 -0
- package/test/unit/spec/member/util.js +52 -11
- package/test/unit/spec/members/utils.js +95 -0
- package/test/unit/spec/multistream/remoteMedia.ts +11 -7
- package/test/unit/spec/reachability/clusterReachability.ts +7 -0
- package/test/unit/spec/reachability/index.ts +383 -9
- package/test/unit/spec/reachability/request.js +48 -12
- package/test/unit/spec/recording-controller/index.js +61 -5
- package/test/unit/spec/recording-controller/util.js +39 -3
- package/test/unit/spec/roap/index.ts +48 -1
- package/test/unit/spec/roap/request.ts +51 -109
- package/test/unit/spec/roap/turnDiscovery.ts +202 -147
- package/test/unit/spec/webinar/index.ts +504 -0
- package/dist/common/errors/webinar-registration-error.js.map +0 -1
- package/src/common/errors/webinar-registration-error.ts +0 -27
@@ -0,0 +1,300 @@
|
|
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
|
+
}
|
@@ -0,0 +1,69 @@
|
|
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
|
+
}
|
@@ -77,6 +77,30 @@ var SendSlotManager = exports.default = /*#__PURE__*/function () {
|
|
77
77
|
this.LoggerProxy.logger.info("SendSlotsManager->setNamedMediaGroups#set named media group ".concat(namedMediaGroups));
|
78
78
|
}
|
79
79
|
|
80
|
+
/**
|
81
|
+
* Sets the source state override for the given media type.
|
82
|
+
* @param {MediaType} mediaType - The type of media (must be MediaType.VideoMain to apply source state changes).
|
83
|
+
* @param {StreamState | null} state - The state to set or null to clear the override value.
|
84
|
+
* @returns {void}
|
85
|
+
*/
|
86
|
+
}, {
|
87
|
+
key: "setSourceStateOverride",
|
88
|
+
value: function setSourceStateOverride(mediaType, state) {
|
89
|
+
if (mediaType !== _internalMediaCore.MediaType.VideoMain) {
|
90
|
+
throw new Error("sendSlotManager cannot set source state override which media type is ".concat(mediaType));
|
91
|
+
}
|
92
|
+
var slot = this.slots.get(mediaType);
|
93
|
+
if (!slot) {
|
94
|
+
throw new Error("Slot for ".concat(mediaType, " does not exist"));
|
95
|
+
}
|
96
|
+
if (state) {
|
97
|
+
slot.setSourceStateOverride(state);
|
98
|
+
} else {
|
99
|
+
slot.clearSourceStateOverride();
|
100
|
+
}
|
101
|
+
this.LoggerProxy.logger.info("SendSlotsManager->setSourceStateOverride#set source state override for ".concat(mediaType, " to ").concat(state));
|
102
|
+
}
|
103
|
+
|
80
104
|
/**
|
81
105
|
* This method publishes the given stream to the sendSlot for the given mediaType
|
82
106
|
* @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_internalMediaCore","require","SendSlotManager","exports","default","LoggerProxy","_classCallCheck2","_defineProperty2","_map","_createClass2","key","value","createSlot","mediaConnection","mediaType","active","arguments","length","undefined","slots","has","Error","concat","slot","createSendSlot","set","logger","info","getSlot","get","setNamedMediaGroups","namedMediaGroups","MediaType","AudioMain","_publishStream","_asyncToGenerator2","_regenerator","mark","_callee","stream","wrap","_callee$","_context","prev","next","publishStream","label","muted","stop","_x","_x2","apply","_unpublishStream","_callee2","_callee2$","_context2","unpublishStream","_x3","setActive","_setCodecParameters","_callee3","codecParameters","_callee3$","_context3","setCodecParameters","_x4","_x5","_deleteCodecParameters","_callee4","parameters","_callee4$","_context4","deleteCodecParameters","_x6","_x7","reset","clear"],"sources":["sendSlotManager.ts"],"sourcesContent":["import {\n SendSlot,\n MediaType,\n LocalStream,\n MultistreamRoapMediaConnection,\n NamedMediaGroup,\n} from '@webex/internal-media-core';\n\nexport default class SendSlotManager {\n private readonly slots: Map<MediaType, SendSlot> = new Map();\n private readonly LoggerProxy: any;\n\n constructor(LoggerProxy: any) {\n this.LoggerProxy = LoggerProxy;\n }\n\n /**\n * This method is used to create a sendSlot for the given mediaType and returns the created sendSlot\n * @param {MultistreamRoapMediaConnection} mediaConnection MultistreamRoapMediaConnection for which a sendSlot needs to be created\n * @param {MediaType} mediaType MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active This is optional boolean to set the active state of the sendSlot. Default is true\n * @returns {SendSlot} slot The created sendSlot\n */\n public createSlot(\n mediaConnection: MultistreamRoapMediaConnection,\n mediaType: MediaType,\n active = true\n ): SendSlot {\n if (this.slots.has(mediaType)) {\n throw new Error(`Slot for ${mediaType} already exists`);\n }\n\n const slot: SendSlot = mediaConnection.createSendSlot(mediaType, active);\n\n this.slots.set(mediaType, slot);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->createSlot#Created slot for ${mediaType} with active ${active}`\n );\n\n return slot;\n }\n\n /**\n * This method is used to retrieve the sendSlot for the given mediaType\n * @param {MediaType} mediaType of which the slot needs to be retrieved\n * @returns {SendSlot}\n */\n public getSlot(mediaType: MediaType): SendSlot {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n return slot;\n }\n\n /**\n * Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.\n * @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group\n * @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,\n * named media group will be canceled and the audio stream will be sent to the floor.\n * @returns {void}\n */\n public setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]) {\n if (mediaType !== MediaType.AudioMain) {\n throw new Error(\n `sendSlotManager cannot set named media group which media type is ${mediaType}`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.setNamedMediaGroups(namedMediaGroups);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setNamedMediaGroups#set named media group ${namedMediaGroups}`\n );\n }\n\n /**\n * This method publishes the given stream to the sendSlot for the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {LocalStream} stream LocalStream to be published\n * @returns {Promise<void>}\n */\n public async publishStream(mediaType: MediaType, stream: LocalStream): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.publishStream(stream);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->publishStream#Published stream for ${mediaType} and stream with label ${stream.label} and muted ${stream.muted}`\n );\n }\n\n /**\n * This method unpublishes the stream from the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @returns {Promise<void>}\n */\n public async unpublishStream(mediaType: MediaType): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.unpublishStream();\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->unpublishStream#Unpublished stream for ${mediaType}`\n );\n }\n\n /**\n * This method is used to set the active state of the sendSlot for the given mediaType\n * @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)\n * @param {boolean} active The boolean to set the active state of the sendSlot. Default is true\n * @returns {void}\n */\n public setActive(mediaType: MediaType, active = true): void {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.active = active;\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setActive#Set active for ${mediaType} to ${active}`\n );\n }\n\n /**\n * This method is used to set the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Object} codecParameters\n * @returns {Promise<void>}\n */\n public async setCodecParameters(\n mediaType: MediaType,\n codecParameters: {\n [key: string]: string | undefined; // As per ts-sdp undefined is considered as a valid value to be used for codec parameters\n }\n ): Promise<void> {\n // These codec parameter changes underneath are SDP value changes that are taken care by WCME automatically. So no need for any change in streams from the web sdk side\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.setCodecParameters(codecParameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setCodecParameters#Set codec parameters for ${mediaType} to ${codecParameters}`\n );\n }\n\n /**\n * This method is used to delete the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Array<String>} parameters Array of keys of the codec parameters to be deleted\n * @returns {Promise<void>}\n */\n public async deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.deleteCodecParameters(parameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->deleteCodecParameters#Deleted the following codec parameters -> ${parameters} for ${mediaType}`\n );\n }\n\n /**\n * This method is used to reset the SendSlotsManager by deleting all the sendSlots\n * @returns {undefined}\n */\n public reset(): void {\n this.slots.clear();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAMoC,IAEfC,eAAe,GAAAC,OAAA,CAAAC,OAAA;EAIlC,SAAAF,gBAAYG,WAAgB,EAAE;IAAA,IAAAC,gBAAA,CAAAF,OAAA,QAAAF,eAAA;IAAA,IAAAK,gBAAA,CAAAH,OAAA,iBAHqB,IAAAI,IAAA,CAAAJ,OAAA,CAAQ,CAAC;IAAA,IAAAG,gBAAA,CAAAH,OAAA;IAI1D,IAAI,CAACC,WAAW,GAAGA,WAAW;EAChC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE,IAAAI,aAAA,CAAAL,OAAA,EAAAF,eAAA;IAAAQ,GAAA;IAAAC,KAAA,EAOA,SAAAC,WACEC,eAA+C,EAC/CC,SAAoB,EAEV;MAAA,IADVC,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;MAEb,IAAI,IAAI,CAACG,KAAK,CAACC,GAAG,CAACN,SAAS,CAAC,EAAE;QAC7B,MAAM,IAAIO,KAAK,aAAAC,MAAA,CAAaR,SAAS,oBAAiB,CAAC;MACzD;MAEA,IAAMS,IAAc,GAAGV,eAAe,CAACW,cAAc,CAACV,SAAS,EAAEC,MAAM,CAAC;MAExE,IAAI,CAACI,KAAK,CAACM,GAAG,CAACX,SAAS,EAAES,IAAI,CAAC;MAE/B,IAAI,CAAClB,WAAW,CAACqB,MAAM,CAACC,IAAI,kDAAAL,MAAA,CACuBR,SAAS,mBAAAQ,MAAA,CAAgBP,MAAM,CAClF,CAAC;MAED,OAAOQ,IAAI;IACb;;IAEA;AACF;AACA;AACA;AACA;EAJE;IAAAb,GAAA;IAAAC,KAAA,EAKA,SAAAiB,QAAed,SAAoB,EAAY;MAC7C,IAAMS,IAAI,GAAG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C,IAAI,sFAAAL,MAAA,CAC2D+C,UAAU,WAAA/C,MAAA,CAAQR,SAAS,CAClH,CAAC;YAAC;YAAA;cAAA,OAAAyD,SAAA,CAAAvB,IAAA;UAAA;QAAA,GAAAoB,QAAA;MAAA,CACH;MAAA,SAAAI,sBAAAC,GAAA,EAAAC,GAAA;QAAA,OAAAP,sBAAA,CAAAhB,KAAA,OAAAnC,SAAA;MAAA;MAAA,OAAAwD,qBAAA;IAAA;IAED;AACF;AACA;AACA;IAHE;EAAA;IAAA9D,GAAA;IAAAC,KAAA,EAIA,SAAAgE,MAAA,EAAqB;MACnB,IAAI,CAACxD,KAAK,CAACyD,KAAK,CAAC,CAAC;IACpB;EAAC;EAAA,OAAA1E,eAAA;AAAA"}
|
1
|
+
{"version":3,"names":["_internalMediaCore","require","SendSlotManager","exports","default","LoggerProxy","_classCallCheck2","_defineProperty2","_map","_createClass2","key","value","createSlot","mediaConnection","mediaType","active","arguments","length","undefined","slots","has","Error","concat","slot","createSendSlot","set","logger","info","getSlot","get","setNamedMediaGroups","namedMediaGroups","MediaType","AudioMain","setSourceStateOverride","state","VideoMain","clearSourceStateOverride","_publishStream","_asyncToGenerator2","_regenerator","mark","_callee","stream","wrap","_callee$","_context","prev","next","publishStream","label","muted","stop","_x","_x2","apply","_unpublishStream","_callee2","_callee2$","_context2","unpublishStream","_x3","setActive","_setCodecParameters","_callee3","codecParameters","_callee3$","_context3","setCodecParameters","_x4","_x5","_deleteCodecParameters","_callee4","parameters","_callee4$","_context4","deleteCodecParameters","_x6","_x7","reset","clear"],"sources":["sendSlotManager.ts"],"sourcesContent":["import {\n SendSlot,\n MediaType,\n LocalStream,\n MultistreamRoapMediaConnection,\n NamedMediaGroup,\n StreamState,\n} from '@webex/internal-media-core';\n\nexport default class SendSlotManager {\n private readonly slots: Map<MediaType, SendSlot> = new Map();\n private readonly LoggerProxy: any;\n\n constructor(LoggerProxy: any) {\n this.LoggerProxy = LoggerProxy;\n }\n\n /**\n * This method is used to create a sendSlot for the given mediaType and returns the created sendSlot\n * @param {MultistreamRoapMediaConnection} mediaConnection MultistreamRoapMediaConnection for which a sendSlot needs to be created\n * @param {MediaType} mediaType MediaType for which a sendSlot needs to be created (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {boolean} active This is optional boolean to set the active state of the sendSlot. Default is true\n * @returns {SendSlot} slot The created sendSlot\n */\n public createSlot(\n mediaConnection: MultistreamRoapMediaConnection,\n mediaType: MediaType,\n active = true\n ): SendSlot {\n if (this.slots.has(mediaType)) {\n throw new Error(`Slot for ${mediaType} already exists`);\n }\n\n const slot: SendSlot = mediaConnection.createSendSlot(mediaType, active);\n\n this.slots.set(mediaType, slot);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->createSlot#Created slot for ${mediaType} with active ${active}`\n );\n\n return slot;\n }\n\n /**\n * This method is used to retrieve the sendSlot for the given mediaType\n * @param {MediaType} mediaType of which the slot needs to be retrieved\n * @returns {SendSlot}\n */\n public getSlot(mediaType: MediaType): SendSlot {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n return slot;\n }\n\n /**\n * Allow users to specify 'namedMediaGroups' to indicate which named media group its audio should be sent to.\n * @param {MediaType} mediaType MediaType of the sendSlot to which the audio stream needs to be send to the media group\n * @param {[]}namedMediaGroups - Allow users to specify 'namedMediaGroups'.If the value of 'namedMediaGroups' is zero,\n * named media group will be canceled and the audio stream will be sent to the floor.\n * @returns {void}\n */\n public setNamedMediaGroups(mediaType: MediaType, namedMediaGroups: NamedMediaGroup[]) {\n if (mediaType !== MediaType.AudioMain) {\n throw new Error(\n `sendSlotManager cannot set named media group which media type is ${mediaType}`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.setNamedMediaGroups(namedMediaGroups);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setNamedMediaGroups#set named media group ${namedMediaGroups}`\n );\n }\n\n /**\n * Sets the source state override for the given media type.\n * @param {MediaType} mediaType - The type of media (must be MediaType.VideoMain to apply source state changes).\n * @param {StreamState | null} state - The state to set or null to clear the override value.\n * @returns {void}\n */\n public setSourceStateOverride(mediaType: MediaType, state: StreamState | null) {\n if (mediaType !== MediaType.VideoMain) {\n throw new Error(\n `sendSlotManager cannot set source state override which media type is ${mediaType}`\n );\n }\n\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n if (state) {\n slot.setSourceStateOverride(state);\n } else {\n slot.clearSourceStateOverride();\n }\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setSourceStateOverride#set source state override for ${mediaType} to ${state}`\n );\n }\n\n /**\n * This method publishes the given stream to the sendSlot for the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot to which a stream needs to be published (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {LocalStream} stream LocalStream to be published\n * @returns {Promise<void>}\n */\n public async publishStream(mediaType: MediaType, stream: LocalStream): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.publishStream(stream);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->publishStream#Published stream for ${mediaType} and stream with label ${stream.label} and muted ${stream.muted}`\n );\n }\n\n /**\n * This method unpublishes the stream from the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot from which a stream needs to be unpublished (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @returns {Promise<void>}\n */\n public async unpublishStream(mediaType: MediaType): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.unpublishStream();\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->unpublishStream#Unpublished stream for ${mediaType}`\n );\n }\n\n /**\n * This method is used to set the active state of the sendSlot for the given mediaType\n * @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)\n * @param {boolean} active The boolean to set the active state of the sendSlot. Default is true\n * @returns {void}\n */\n public setActive(mediaType: MediaType, active = true): void {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n slot.active = active;\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setActive#Set active for ${mediaType} to ${active}`\n );\n }\n\n /**\n * This method is used to set the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be set (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Object} codecParameters\n * @returns {Promise<void>}\n */\n public async setCodecParameters(\n mediaType: MediaType,\n codecParameters: {\n [key: string]: string | undefined; // As per ts-sdp undefined is considered as a valid value to be used for codec parameters\n }\n ): Promise<void> {\n // These codec parameter changes underneath are SDP value changes that are taken care by WCME automatically. So no need for any change in streams from the web sdk side\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.setCodecParameters(codecParameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->setCodecParameters#Set codec parameters for ${mediaType} to ${codecParameters}`\n );\n }\n\n /**\n * This method is used to delete the codec parameters for the sendSlot of the given mediaType\n * @param {MediaType} mediaType MediaType of the sendSlot for which the codec parameters needs to be deleted (AUDIO_MAIN/VIDEO_MAIN/AUDIO_SLIDES/VIDEO_SLIDES)\n * @param {Array<String>} parameters Array of keys of the codec parameters to be deleted\n * @returns {Promise<void>}\n */\n public async deleteCodecParameters(mediaType: MediaType, parameters: string[]): Promise<void> {\n const slot = this.slots.get(mediaType);\n\n if (!slot) {\n throw new Error(`Slot for ${mediaType} does not exist`);\n }\n\n await slot.deleteCodecParameters(parameters);\n\n this.LoggerProxy.logger.info(\n `SendSlotsManager->deleteCodecParameters#Deleted the following codec parameters -> ${parameters} for ${mediaType}`\n );\n }\n\n /**\n * This method is used to reset the SendSlotsManager by deleting all the sendSlots\n * @returns {undefined}\n */\n public reset(): void {\n this.slots.clear();\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAOoC,IAEfC,eAAe,GAAAC,OAAA,CAAAC,OAAA;EAIlC,SAAAF,gBAAYG,WAAgB,EAAE;IAAA,IAAAC,gBAAA,CAAAF,OAAA,QAAAF,eAAA;IAAA,IAAAK,gBAAA,CAAAH,OAAA,iBAHqB,IAAAI,IAAA,CAAAJ,OAAA,CAAQ,CAAC;IAAA,IAAAG,gBAAA,CAAAH,OAAA;IAI1D,IAAI,CAACC,WAAW,GAAGA,WAAW;EAChC;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE,IAAAI,aAAA,CAAAL,OAAA,EAAAF,eAAA;IAAAQ,GAAA;IAAAC,KAAA,EAOA,SAAAC,WACEC,eAA+C,EAC/CC,SAAoB,EAEV;MAAA,IADVC,MAAM,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,IAAI;MAEb,IAAI,IAAI,CAACG,KAAK,CAACC,GAAG,CAACN,SAAS,CAAC,EAAE;QAC7B,MAAM,IAAIO,KAAK,aAAAC,MAAA,CAAaR,SAAS,oBAAiB,CAAC;MACzD;MAEA,IAAMS,IAAc,GAAGV,eAAe,CAACW,cAAc,CAACV,SAAS,EAAEC,MAAM,CAAC;MAExE,IAAI,CAACI,KAAK,CAACM,GAAG,CAACX,SAAS,EAAES,IAAI,CAAC;MAE/B,IAAI,CAAClB,WAAW,CAACqB,MAAM,CAACC,IAAI,kDAAAL,MAAA,CACuBR,SAAS,mBAAAQ,MAAA,CAAgBP,MAAM,CAClF,CAA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AAK,CAAC,CAAC;IACpB;EAAC;EAAA,OAAA9E,eAAA;AAAA"}
|
@@ -0,0 +1,70 @@
|
|
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
|
+
}
|
@@ -10,15 +10,14 @@ exports.default = void 0;
|
|
10
10
|
var _freeze = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/object/freeze"));
|
11
11
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/classCallCheck"));
|
12
12
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/createClass"));
|
13
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/assertThisInitialized"));
|
14
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
15
13
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/possibleConstructorReturn"));
|
16
14
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/getPrototypeOf"));
|
15
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/inherits"));
|
17
16
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/defineProperty"));
|
18
17
|
var _eventsScope = _interopRequireDefault(require("../common/events/events-scope"));
|
19
18
|
var _constants = require("../constants");
|
20
|
-
function
|
21
|
-
function _isNativeReflectConstruct() {
|
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; })(); }
|
22
21
|
/**
|
23
22
|
* Meeting - network quality event
|
24
23
|
* Emitted on each interval of retrieving stats Analyzer data
|
@@ -35,8 +34,6 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
|
|
35
34
|
* @extends {EventsScope}
|
36
35
|
*/
|
37
36
|
var NetworkQualityMonitor = exports.default = /*#__PURE__*/function (_EventsScope) {
|
38
|
-
(0, _inherits2.default)(NetworkQualityMonitor, _EventsScope);
|
39
|
-
var _super = _createSuper(NetworkQualityMonitor);
|
40
37
|
/**
|
41
38
|
* Creates a new instance of NetworkQualityMonitor
|
42
39
|
* @constructor
|
@@ -51,13 +48,13 @@ var NetworkQualityMonitor = exports.default = /*#__PURE__*/function (_EventsScop
|
|
51
48
|
function NetworkQualityMonitor(config) {
|
52
49
|
var _this;
|
53
50
|
(0, _classCallCheck2.default)(this, NetworkQualityMonitor);
|
54
|
-
_this =
|
55
|
-
(0, _defineProperty2.default)(
|
56
|
-
(0, _defineProperty2.default)(
|
57
|
-
(0, _defineProperty2.default)(
|
58
|
-
(0, _defineProperty2.default)(
|
59
|
-
(0, _defineProperty2.default)(
|
60
|
-
(0, _defineProperty2.default)(
|
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);
|
61
58
|
_this.config = config;
|
62
59
|
_this.indicatorTypes = (0, _freeze.default)({
|
63
60
|
PACKETLOSS: 'packetLoss',
|
@@ -69,7 +66,7 @@ var NetworkQualityMonitor = exports.default = /*#__PURE__*/function (_EventsScop
|
|
69
66
|
DOWNLINK: 'downlink'
|
70
67
|
});
|
71
68
|
_this.networkQualityScore = 1;
|
72
|
-
_this.networkQualityStatus = (0, _defineProperty2.default)({}, _this.frequencyTypes.UPLINK, {});
|
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, {}));
|
73
70
|
_this.mediaType = null;
|
74
71
|
return _this;
|
75
72
|
}
|
@@ -80,7 +77,8 @@ var NetworkQualityMonitor = exports.default = /*#__PURE__*/function (_EventsScop
|
|
80
77
|
* @memberof NetworkQualityMonitor
|
81
78
|
* @returns {void}
|
82
79
|
*/
|
83
|
-
(0,
|
80
|
+
(0, _inherits2.default)(NetworkQualityMonitor, _EventsScope);
|
81
|
+
return (0, _createClass2.default)(NetworkQualityMonitor, [{
|
84
82
|
key: "emitNetworkQuality",
|
85
83
|
value: function emitNetworkQuality() {
|
86
84
|
this.emit({
|
@@ -181,9 +179,6 @@ var NetworkQualityMonitor = exports.default = /*#__PURE__*/function (_EventsScop
|
|
181
179
|
var determineIfUndefined = function determineIfUndefined(value) {
|
182
180
|
return typeof value === 'undefined' ? null : value;
|
183
181
|
};
|
184
|
-
if (!this.networkQualityStatus[UPLINK][mediaType]) {
|
185
|
-
this.networkQualityStatus[UPLINK][mediaType] = {};
|
186
|
-
}
|
187
182
|
|
188
183
|
/**
|
189
184
|
* Values for some browsers specifically Safari will be undefined we explicitly set to null
|
@@ -222,6 +217,5 @@ var NetworkQualityMonitor = exports.default = /*#__PURE__*/function (_EventsScop
|
|
222
217
|
return this.networkQualityStatus[UPLINK];
|
223
218
|
}
|
224
219
|
}]);
|
225
|
-
return NetworkQualityMonitor;
|
226
220
|
}(_eventsScope.default);
|
227
221
|
//# sourceMappingURL=index.js.map
|