@webex/plugin-meetings 3.1.0 → 3.2.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/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/reconnection-not-started.js +46 -0
- package/dist/common/errors/reconnection-not-started.js.map +1 -0
- package/dist/constants.js +16 -5
- package/dist/constants.js.map +1 -1
- package/dist/index.js +80 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/controlsUtils.js +7 -1
- package/dist/locus-info/controlsUtils.js.map +1 -1
- package/dist/locus-info/index.js +10 -0
- package/dist/locus-info/index.js.map +1 -1
- package/dist/media/properties.js +102 -57
- package/dist/media/properties.js.map +1 -1
- package/dist/mediaQualityMetrics/config.js +10 -10
- package/dist/mediaQualityMetrics/config.js.map +1 -1
- package/dist/meeting/in-meeting-actions.js +6 -0
- package/dist/meeting/in-meeting-actions.js.map +1 -1
- package/dist/meeting/index.js +564 -475
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/locusMediaRequest.js +27 -0
- package/dist/meeting/locusMediaRequest.js.map +1 -1
- package/dist/meeting/util.js +9 -16
- package/dist/meeting/util.js.map +1 -1
- package/dist/meeting/voicea-meeting.js +37 -49
- package/dist/meeting/voicea-meeting.js.map +1 -1
- package/dist/meeting-info/util.js +304 -267
- package/dist/meeting-info/util.js.map +1 -1
- package/dist/meeting-info/utilv2.js +334 -298
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +12 -28
- package/dist/meetings/index.js.map +1 -1
- package/dist/reachability/index.js +88 -9
- package/dist/reachability/index.js.map +1 -1
- package/dist/reconnection-manager/index.js +138 -109
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/request.js +3 -27
- package/dist/roap/request.js.map +1 -1
- package/dist/statsAnalyzer/index.js +8 -2
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +17 -0
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/annotation/annotation.types.d.ts +42 -0
- package/dist/types/annotation/constants.d.ts +31 -0
- package/dist/types/annotation/index.d.ts +117 -0
- package/dist/types/breakouts/breakout.d.ts +8 -0
- package/dist/types/breakouts/collection.d.ts +5 -0
- package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
- package/dist/types/breakouts/events.d.ts +8 -0
- package/dist/types/breakouts/index.d.ts +5 -0
- package/dist/types/breakouts/request.d.ts +22 -0
- package/dist/types/breakouts/utils.d.ts +15 -0
- package/dist/types/common/browser-detection.d.ts +9 -0
- package/dist/types/common/collection.d.ts +48 -0
- package/dist/types/common/config.d.ts +2 -0
- package/dist/types/common/errors/captcha-error.d.ts +15 -0
- package/dist/types/common/errors/intent-to-join.d.ts +16 -0
- package/dist/types/common/errors/join-meeting.d.ts +17 -0
- package/dist/types/common/errors/media.d.ts +15 -0
- package/dist/types/common/errors/no-meeting-info.d.ts +14 -0
- package/dist/types/common/errors/parameter.d.ts +15 -0
- package/dist/types/common/errors/password-error.d.ts +15 -0
- package/dist/types/common/errors/permission.d.ts +14 -0
- package/dist/types/common/errors/reclaim-host-role-errors.d.ts +60 -0
- package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
- package/dist/types/common/errors/reconnection.d.ts +15 -0
- package/dist/types/common/errors/stats.d.ts +15 -0
- package/dist/types/common/errors/webex-errors.d.ts +93 -0
- package/dist/types/common/errors/webex-meetings-error.d.ts +20 -0
- package/dist/types/common/events/events-scope.d.ts +17 -0
- package/dist/types/common/events/events.d.ts +12 -0
- package/dist/types/common/events/trigger-proxy.d.ts +2 -0
- package/dist/types/common/events/util.d.ts +2 -0
- package/dist/types/common/logs/logger-config.d.ts +2 -0
- package/dist/types/common/logs/logger-proxy.d.ts +2 -0
- package/dist/types/common/logs/request.d.ts +36 -0
- package/dist/types/common/queue.d.ts +34 -0
- package/dist/types/config.d.ts +73 -0
- package/dist/types/constants.d.ts +1098 -0
- package/dist/types/controls-options-manager/constants.d.ts +4 -0
- package/dist/types/controls-options-manager/enums.d.ts +15 -0
- package/dist/types/controls-options-manager/index.d.ts +136 -0
- package/dist/types/controls-options-manager/types.d.ts +43 -0
- package/dist/types/controls-options-manager/util.d.ts +1 -0
- package/dist/types/index.d.ts +19 -0
- package/dist/types/interceptors/index.d.ts +2 -0
- package/dist/types/interceptors/locusRetry.d.ts +27 -0
- package/dist/types/interpretation/collection.d.ts +5 -0
- package/dist/types/interpretation/index.d.ts +5 -0
- package/dist/types/interpretation/siLanguage.d.ts +5 -0
- package/dist/types/locus-info/controlsUtils.d.ts +2 -0
- package/dist/types/locus-info/embeddedAppsUtils.d.ts +2 -0
- package/dist/types/locus-info/fullState.d.ts +2 -0
- package/dist/types/locus-info/hostUtils.d.ts +2 -0
- package/dist/types/locus-info/index.d.ts +322 -0
- package/dist/types/locus-info/infoUtils.d.ts +2 -0
- package/dist/types/locus-info/mediaSharesUtils.d.ts +2 -0
- package/dist/types/locus-info/parser.d.ts +272 -0
- package/dist/types/locus-info/selfUtils.d.ts +2 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/types/media/index.d.ts +34 -0
- package/dist/types/media/properties.d.ts +117 -0
- package/dist/types/media/util.d.ts +2 -0
- package/dist/types/mediaQualityMetrics/config.d.ts +247 -0
- package/dist/types/meeting/in-meeting-actions.d.ts +173 -0
- package/dist/types/meeting/index.d.ts +1832 -0
- package/dist/types/meeting/locusMediaRequest.d.ts +75 -0
- package/dist/types/meeting/muteState.d.ts +178 -0
- package/dist/types/meeting/request.d.ts +295 -0
- package/dist/types/meeting/request.type.d.ts +11 -0
- package/dist/types/meeting/state.d.ts +9 -0
- package/dist/types/meeting/util.d.ts +122 -0
- package/dist/types/meeting/voicea-meeting.d.ts +17 -0
- package/dist/types/meeting-info/collection.d.ts +20 -0
- package/dist/types/meeting-info/index.d.ts +69 -0
- package/dist/types/meeting-info/meeting-info-v2.d.ts +123 -0
- package/dist/types/meeting-info/request.d.ts +22 -0
- package/dist/types/meeting-info/util.d.ts +49 -0
- package/dist/types/meeting-info/utilv2.d.ts +65 -0
- package/dist/types/meetings/collection.d.ts +40 -0
- package/dist/types/meetings/index.d.ts +383 -0
- package/dist/types/meetings/meetings.types.d.ts +4 -0
- package/dist/types/meetings/request.d.ts +27 -0
- package/dist/types/meetings/util.d.ts +18 -0
- package/dist/types/member/index.d.ts +160 -0
- package/dist/types/member/types.d.ts +32 -0
- package/dist/types/member/util.d.ts +2 -0
- package/dist/types/members/collection.d.ts +29 -0
- package/dist/types/members/index.d.ts +353 -0
- package/dist/types/members/request.d.ts +114 -0
- package/dist/types/members/types.d.ts +25 -0
- package/dist/types/members/util.d.ts +215 -0
- package/dist/types/metrics/constants.d.ts +70 -0
- package/dist/types/metrics/index.d.ts +45 -0
- package/dist/types/multistream/mediaRequestManager.d.ts +119 -0
- package/dist/types/multistream/receiveSlot.d.ts +68 -0
- package/dist/types/multistream/receiveSlotManager.d.ts +56 -0
- package/dist/types/multistream/remoteMedia.d.ts +72 -0
- package/dist/types/multistream/remoteMediaGroup.d.ts +49 -0
- package/dist/types/multistream/remoteMediaManager.d.ts +300 -0
- package/dist/types/multistream/sendSlotManager.d.ts +69 -0
- package/dist/types/networkQualityMonitor/index.d.ts +70 -0
- package/dist/types/personal-meeting-room/index.d.ts +47 -0
- package/dist/types/personal-meeting-room/request.d.ts +14 -0
- package/dist/types/personal-meeting-room/util.d.ts +2 -0
- package/dist/types/reachability/clusterReachability.d.ts +110 -0
- package/dist/types/reachability/index.d.ts +120 -0
- package/dist/types/reachability/request.d.ts +39 -0
- package/dist/types/reachability/util.d.ts +15 -0
- package/dist/types/reactions/constants.d.ts +3 -0
- package/dist/types/reactions/reactions.d.ts +4 -0
- package/dist/types/reactions/reactions.type.d.ts +52 -0
- package/dist/types/reconnection-manager/index.d.ts +126 -0
- package/dist/types/recording-controller/enums.d.ts +7 -0
- package/dist/types/recording-controller/index.d.ts +207 -0
- package/dist/types/recording-controller/util.d.ts +14 -0
- package/dist/types/roap/index.d.ts +86 -0
- package/dist/types/roap/request.d.ts +39 -0
- package/dist/types/roap/turnDiscovery.d.ts +155 -0
- package/dist/types/rtcMetrics/constants.d.ts +4 -0
- package/dist/types/rtcMetrics/index.d.ts +61 -0
- package/dist/types/statsAnalyzer/global.d.ts +36 -0
- package/dist/types/statsAnalyzer/index.d.ts +217 -0
- package/dist/types/statsAnalyzer/mqaUtil.d.ts +48 -0
- package/dist/types/transcription/index.d.ts +64 -0
- package/dist/types/webinar/collection.d.ts +16 -0
- package/dist/types/webinar/index.d.ts +5 -0
- package/dist/webinar/index.js +1 -1
- package/package.json +22 -22
- package/src/common/errors/reconnection-not-started.ts +25 -0
- package/src/constants.ts +14 -5
- package/src/index.ts +30 -0
- package/src/locus-info/controlsUtils.ts +11 -0
- package/src/locus-info/index.ts +16 -0
- package/src/media/properties.ts +67 -15
- package/src/mediaQualityMetrics/config.ts +13 -7
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +144 -107
- package/src/meeting/locusMediaRequest.ts +31 -0
- package/src/meeting/util.ts +9 -16
- package/src/meeting/voicea-meeting.ts +44 -46
- package/src/meeting-info/util.ts +241 -233
- package/src/meeting-info/utilv2.ts +250 -244
- package/src/meetings/index.ts +15 -27
- package/src/reachability/index.ts +60 -0
- package/src/reconnection-manager/index.ts +128 -105
- package/src/roap/request.ts +1 -24
- package/src/statsAnalyzer/index.ts +10 -3
- package/src/statsAnalyzer/mqaUtil.ts +23 -0
- package/test/unit/spec/locus-info/controlsUtils.js +20 -0
- package/test/unit/spec/locus-info/index.js +21 -0
- package/test/unit/spec/media/properties.ts +145 -140
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +271 -105
- package/test/unit/spec/meeting/locusMediaRequest.ts +49 -0
- package/test/unit/spec/meeting/utils.js +3 -10
- package/test/unit/spec/meeting/voicea-meeting.ts +5 -14
- package/test/unit/spec/meetings/index.js +59 -17
- package/test/unit/spec/reachability/index.ts +266 -0
- package/test/unit/spec/reconnection-manager/index.js +127 -39
- package/test/unit/spec/roap/request.ts +0 -37
- package/test/unit/spec/stats-analyzer/index.js +100 -8
- package/src/common/errors/reconnection-in-progress.ts +0 -8
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
declare const BEHAVIORAL_METRICS: {
|
|
2
|
+
MEETINGS_REGISTRATION_FAILED: string;
|
|
3
|
+
MEETINGS_REGISTRATION_SUCCESS: string;
|
|
4
|
+
MEETINGS_REGISTRATION_STEP: string;
|
|
5
|
+
MERCURY_CONNECTION_FAILURE: string;
|
|
6
|
+
MERCURY_CONNECTION_RESTORED: string;
|
|
7
|
+
JOIN_SUCCESS: string;
|
|
8
|
+
JOIN_FAILURE: string;
|
|
9
|
+
ADD_MEDIA_SUCCESS: string;
|
|
10
|
+
ADD_MEDIA_FAILURE: string;
|
|
11
|
+
ADD_MEDIA_RETRY: string;
|
|
12
|
+
ROAP_MERCURY_EVENT_RECEIVED: string;
|
|
13
|
+
CONNECTION_SUCCESS: string;
|
|
14
|
+
CONNECTION_FAILURE: string;
|
|
15
|
+
MEETING_LEAVE_FAILURE: string;
|
|
16
|
+
MEETING_END_ALL_FAILURE: string;
|
|
17
|
+
MEETING_END_ALL_INITIATED: string;
|
|
18
|
+
GET_USER_MEDIA_FAILURE: string;
|
|
19
|
+
GET_DISPLAY_MEDIA_FAILURE: string;
|
|
20
|
+
JOIN_WITH_MEDIA_FAILURE: string;
|
|
21
|
+
LLM_CONNECTION_AFTER_JOIN_FAILURE: string;
|
|
22
|
+
RECEIVE_TRANSCRIPTION_AFTER_JOIN_FAILURE: string;
|
|
23
|
+
DISCONNECT_DUE_TO_INACTIVITY: string;
|
|
24
|
+
MEETING_MEDIA_INACTIVE: string;
|
|
25
|
+
MEETING_RECONNECT_FAILURE: string;
|
|
26
|
+
MEETING_MAX_REJOIN_FAILURE: string;
|
|
27
|
+
MEETING_SHARE_SUCCESS: string;
|
|
28
|
+
MEETING_SHARE_FAILURE: string;
|
|
29
|
+
MEETING_START_WHITEBOARD_SHARE_FAILURE: string;
|
|
30
|
+
MEETING_STOP_WHITEBOARD_SHARE_FAILURE: string;
|
|
31
|
+
MEETING_SHARE_VIDEO_MUTE_STATE_CHANGE: string;
|
|
32
|
+
MUTE_AUDIO_FAILURE: string;
|
|
33
|
+
MUTE_VIDEO_FAILURE: string;
|
|
34
|
+
SET_MEETING_QUALITY_FAILURE: string;
|
|
35
|
+
STOP_FLOOR_REQUEST_FAILURE: string;
|
|
36
|
+
ADD_DIAL_IN_FAILURE: string;
|
|
37
|
+
ADD_DIAL_OUT_FAILURE: string;
|
|
38
|
+
UPDATE_MEDIA_FAILURE: string;
|
|
39
|
+
UNMUTE_AUDIO_FAILURE: string;
|
|
40
|
+
UNMUTE_VIDEO_FAILURE: string;
|
|
41
|
+
ROAP_ANSWER_FAILURE: string;
|
|
42
|
+
ROAP_GLARE_CONDITION: string;
|
|
43
|
+
PEERCONNECTION_FAILURE: string;
|
|
44
|
+
INVALID_ICE_CANDIDATE: string;
|
|
45
|
+
UPLOAD_LOGS_FAILURE: string;
|
|
46
|
+
UPLOAD_LOGS_SUCCESS: string;
|
|
47
|
+
RECEIVE_TRANSCRIPTION_FAILURE: string;
|
|
48
|
+
FETCH_MEETING_INFO_V1_SUCCESS: string;
|
|
49
|
+
FETCH_MEETING_INFO_V1_FAILURE: string;
|
|
50
|
+
ADHOC_MEETING_SUCCESS: string;
|
|
51
|
+
ADHOC_MEETING_FAILURE: string;
|
|
52
|
+
VERIFY_PASSWORD_SUCCESS: string;
|
|
53
|
+
VERIFY_PASSWORD_ERROR: string;
|
|
54
|
+
VERIFY_CAPTCHA_ERROR: string;
|
|
55
|
+
MOVE_TO_SUCCESS: string;
|
|
56
|
+
MOVE_TO_FAILURE: string;
|
|
57
|
+
MOVE_FROM_SUCCESS: string;
|
|
58
|
+
MOVE_FROM_FAILURE: string;
|
|
59
|
+
TURN_DISCOVERY_FAILURE: string;
|
|
60
|
+
MEETING_INFO_POLICY_ERROR: string;
|
|
61
|
+
LOCUS_DELTA_SYNC_FAILED: string;
|
|
62
|
+
LOCUS_DELTA_OUT_OF_ORDER: string;
|
|
63
|
+
PERMISSION_TOKEN_REFRESH: string;
|
|
64
|
+
PERMISSION_TOKEN_REFRESH_ERROR: string;
|
|
65
|
+
TURN_DISCOVERY_LATENCY: string;
|
|
66
|
+
ROAP_OFFER_TO_ANSWER_LATENCY: string;
|
|
67
|
+
ROAP_HTTP_RESPONSE_MISSING: string;
|
|
68
|
+
TURN_DISCOVERY_REQUIRES_OK: string;
|
|
69
|
+
};
|
|
70
|
+
export { BEHAVIORAL_METRICS as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @description Metrics handles all the call metrics events
|
|
6
|
+
* @export
|
|
7
|
+
* @class Metrics
|
|
8
|
+
*/
|
|
9
|
+
declare class Metrics {
|
|
10
|
+
static instance: Metrics;
|
|
11
|
+
webex: any;
|
|
12
|
+
/**
|
|
13
|
+
* Create Metrics Object
|
|
14
|
+
* @constructor
|
|
15
|
+
* @public
|
|
16
|
+
* @memberof Meetings
|
|
17
|
+
*/
|
|
18
|
+
constructor();
|
|
19
|
+
/**
|
|
20
|
+
* Initializes the Metrics singleton with a meeting Collection.
|
|
21
|
+
*
|
|
22
|
+
* @param {Object} webex webex SDK object
|
|
23
|
+
*
|
|
24
|
+
* @returns {void}
|
|
25
|
+
*/
|
|
26
|
+
initialSetup(webex: object): void;
|
|
27
|
+
/**
|
|
28
|
+
* Uploads given metric to the Metrics service as an Behavioral metric.
|
|
29
|
+
* Metadata about the environment such as browser, OS, SDK and their versions
|
|
30
|
+
* are automatically added when the metric is sent.
|
|
31
|
+
*
|
|
32
|
+
* The Metrics service will send an Behavioral metric to InfluxDB for
|
|
33
|
+
* aggregation.
|
|
34
|
+
* See https://confluence-eng-gpk2.cisco.com/conf/display/WBXT/Getting+started+with+Metrics+Service.
|
|
35
|
+
*
|
|
36
|
+
* @param {string} metricName Name of the metric (measurement) to send
|
|
37
|
+
* @param {Object} metricFields Key-valye pairs of data or values about this metric
|
|
38
|
+
* @param {Object} metricTags Key-value pairs of metric metadata
|
|
39
|
+
*
|
|
40
|
+
* @returns {void}
|
|
41
|
+
*/
|
|
42
|
+
sendBehavioralMetric(metricName: string, metricFields?: object, metricTags?: object): void;
|
|
43
|
+
}
|
|
44
|
+
declare const instance: Metrics;
|
|
45
|
+
export default instance;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { StreamRequest, NamedMediaGroup } from '@webex/internal-media-core';
|
|
2
|
+
import { ReceiveSlot } from './receiveSlot';
|
|
3
|
+
export interface ActiveSpeakerPolicyInfo {
|
|
4
|
+
policy: 'active-speaker';
|
|
5
|
+
priority: number;
|
|
6
|
+
crossPriorityDuplication: boolean;
|
|
7
|
+
crossPolicyDuplication: boolean;
|
|
8
|
+
preferLiveVideo: boolean;
|
|
9
|
+
namedMediaGroups?: NamedMediaGroup[];
|
|
10
|
+
}
|
|
11
|
+
export interface ReceiverSelectedPolicyInfo {
|
|
12
|
+
policy: 'receiver-selected';
|
|
13
|
+
csi: number;
|
|
14
|
+
}
|
|
15
|
+
export type PolicyInfo = ActiveSpeakerPolicyInfo | ReceiverSelectedPolicyInfo;
|
|
16
|
+
export interface H264CodecInfo {
|
|
17
|
+
codec: 'h264';
|
|
18
|
+
maxFs?: number;
|
|
19
|
+
maxFps?: number;
|
|
20
|
+
maxMbps?: number;
|
|
21
|
+
maxWidth?: number;
|
|
22
|
+
maxHeight?: number;
|
|
23
|
+
}
|
|
24
|
+
export type CodecInfo = H264CodecInfo;
|
|
25
|
+
export interface MediaRequest {
|
|
26
|
+
policyInfo: PolicyInfo;
|
|
27
|
+
receiveSlots: Array<ReceiveSlot>;
|
|
28
|
+
codecInfo?: CodecInfo;
|
|
29
|
+
preferredMaxFs?: number;
|
|
30
|
+
handleMaxFs?: ({ maxFs }: {
|
|
31
|
+
maxFs: number;
|
|
32
|
+
}) => void;
|
|
33
|
+
}
|
|
34
|
+
export type MediaRequestId = string;
|
|
35
|
+
type DegradationPreferences = {
|
|
36
|
+
maxMacroblocksLimit: number;
|
|
37
|
+
};
|
|
38
|
+
type SendMediaRequestsCallback = (streamRequests: StreamRequest[]) => void;
|
|
39
|
+
type Kind = 'audio' | 'video';
|
|
40
|
+
type Options = {
|
|
41
|
+
degradationPreferences: DegradationPreferences;
|
|
42
|
+
kind: Kind;
|
|
43
|
+
trimRequestsToNumOfSources: boolean;
|
|
44
|
+
};
|
|
45
|
+
export declare class MediaRequestManager {
|
|
46
|
+
private sendMediaRequestsCallback;
|
|
47
|
+
private kind;
|
|
48
|
+
private counter;
|
|
49
|
+
private clientRequests;
|
|
50
|
+
private degradationPreferences;
|
|
51
|
+
private sourceUpdateListener;
|
|
52
|
+
private debouncedSourceUpdateListener;
|
|
53
|
+
private previousStreamRequests;
|
|
54
|
+
private trimRequestsToNumOfSources;
|
|
55
|
+
private numTotalSources;
|
|
56
|
+
private numLiveSources;
|
|
57
|
+
constructor(sendMediaRequestsCallback: SendMediaRequestsCallback, options: Options);
|
|
58
|
+
setDegradationPreferences(degradationPreferences: DegradationPreferences): void;
|
|
59
|
+
private getDegradedClientRequests;
|
|
60
|
+
/**
|
|
61
|
+
* Returns true if two stream requests are the same, false otherwise.
|
|
62
|
+
*
|
|
63
|
+
* @param {StreamRequest} streamRequestA - Stream request A for comparison.
|
|
64
|
+
* @param {StreamRequest} streamRequestB - Stream request B for comparison.
|
|
65
|
+
* @returns {boolean} - Whether they are equal.
|
|
66
|
+
*/
|
|
67
|
+
isEqual(streamRequestA: StreamRequest, streamRequestB: StreamRequest): boolean;
|
|
68
|
+
/**
|
|
69
|
+
* Compares new stream requests to previous ones and determines
|
|
70
|
+
* if they are the same.
|
|
71
|
+
*
|
|
72
|
+
* @param {StreamRequest[]} newRequests - Array with new requests.
|
|
73
|
+
* @returns {boolean} - True if they are equal, false otherwise.
|
|
74
|
+
*/
|
|
75
|
+
private checkIsNewRequestsEqualToPrev;
|
|
76
|
+
/**
|
|
77
|
+
* Returns the maxPayloadBitsPerSecond per Stream
|
|
78
|
+
*
|
|
79
|
+
* If MediaRequestManager kind is "audio", a constant bitrate will be returned.
|
|
80
|
+
* If MediaRequestManager kind is "video", the bitrate will be calculated based
|
|
81
|
+
* on maxFs (default h264 maxFs as fallback if maxFs is not defined)
|
|
82
|
+
*
|
|
83
|
+
* @param {MediaRequest} mediaRequest - mediaRequest to take data from
|
|
84
|
+
* @returns {number} maxPayloadBitsPerSecond
|
|
85
|
+
*/
|
|
86
|
+
private getMaxPayloadBitsPerSecond;
|
|
87
|
+
/**
|
|
88
|
+
* Returns the max Macro Blocks per second (maxMbps) per H264 Stream
|
|
89
|
+
*
|
|
90
|
+
* The maxMbps will be calculated based on maxFs and maxFps
|
|
91
|
+
* (default h264 maxFps as fallback if maxFps is not defined)
|
|
92
|
+
*
|
|
93
|
+
* @param {MediaRequest} mediaRequest - mediaRequest to take data from
|
|
94
|
+
* @returns {number} maxMbps
|
|
95
|
+
*/
|
|
96
|
+
private getH264MaxMbps;
|
|
97
|
+
/**
|
|
98
|
+
* Clears the previous stream requests.
|
|
99
|
+
*
|
|
100
|
+
* @returns {void}
|
|
101
|
+
*/
|
|
102
|
+
clearPreviousRequests(): void;
|
|
103
|
+
/** Modifies the passed in clientRequests and makes sure that in total they don't ask
|
|
104
|
+
* for more streams than there are available.
|
|
105
|
+
*
|
|
106
|
+
* @param {Object} clientRequests
|
|
107
|
+
* @returns {void}
|
|
108
|
+
*/
|
|
109
|
+
private trimRequests;
|
|
110
|
+
private getPreferLiveVideo;
|
|
111
|
+
private cloneClientRequests;
|
|
112
|
+
private sendRequests;
|
|
113
|
+
addRequest(mediaRequest: MediaRequest, commit?: boolean): MediaRequestId;
|
|
114
|
+
cancelRequest(requestId: MediaRequestId, commit?: boolean): void;
|
|
115
|
+
commit(): void;
|
|
116
|
+
reset(): void;
|
|
117
|
+
setNumCurrentSources(numTotalSources: number, numLiveSources: number): void;
|
|
118
|
+
}
|
|
119
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { MediaType, ReceiveSlot as WcmeReceiveSlot, StreamState } from '@webex/internal-media-core';
|
|
2
|
+
import EventsScope from '../common/events/events-scope';
|
|
3
|
+
export declare const ReceiveSlotEvents: {
|
|
4
|
+
SourceUpdate: string;
|
|
5
|
+
MaxFsUpdate: string;
|
|
6
|
+
};
|
|
7
|
+
export type { StreamState } from '@webex/internal-media-core';
|
|
8
|
+
export type CSI = number;
|
|
9
|
+
export type MemberId = string;
|
|
10
|
+
export type ReceiveSlotId = string;
|
|
11
|
+
export type FindMemberIdCallback = (csi: CSI) => MemberId | undefined;
|
|
12
|
+
/**
|
|
13
|
+
* Class representing a receive slot. A single receive slot is able to receive a single track
|
|
14
|
+
* for example some participant's main video or audio
|
|
15
|
+
*/
|
|
16
|
+
export declare class ReceiveSlot extends EventsScope {
|
|
17
|
+
#private;
|
|
18
|
+
private readonly mcReceiveSlot;
|
|
19
|
+
private readonly findMemberIdCallback;
|
|
20
|
+
readonly id: ReceiveSlotId;
|
|
21
|
+
readonly mediaType: MediaType;
|
|
22
|
+
/**
|
|
23
|
+
* constructor - don't use it directly, you should always use meeting.receiveSlotManager.allocateSlot()
|
|
24
|
+
* to create any receive slots
|
|
25
|
+
*
|
|
26
|
+
* @param {MediaType} mediaType
|
|
27
|
+
* @param {ReceiveSlot} mcReceiveSlot
|
|
28
|
+
* @param {FindMemberIdCallback} findMemberIdCallback callback for finding memberId for given CSI
|
|
29
|
+
*/
|
|
30
|
+
constructor(mediaType: MediaType, mcReceiveSlot: WcmeReceiveSlot, findMemberIdCallback: FindMemberIdCallback);
|
|
31
|
+
/**
|
|
32
|
+
* Getter for memberId
|
|
33
|
+
*/
|
|
34
|
+
get memberId(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Getter for csi
|
|
37
|
+
*/
|
|
38
|
+
get csi(): number;
|
|
39
|
+
/**
|
|
40
|
+
* Set the max frame size for this slot
|
|
41
|
+
* @param newFs frame size
|
|
42
|
+
*/
|
|
43
|
+
setMaxFs(newFs: any): void;
|
|
44
|
+
/**
|
|
45
|
+
* Getter for sourceState
|
|
46
|
+
*/
|
|
47
|
+
get sourceState(): StreamState;
|
|
48
|
+
/**
|
|
49
|
+
* registers event handlers with the underlying ReceiveSlot
|
|
50
|
+
*/
|
|
51
|
+
private setupEventListeners;
|
|
52
|
+
/** Tries to find the member id for this receive slot if it hasn't got one */
|
|
53
|
+
findMemberId(): void;
|
|
54
|
+
/**
|
|
55
|
+
* @returns {string} a log message used to identify the receive slot
|
|
56
|
+
*/
|
|
57
|
+
get logString(): string;
|
|
58
|
+
/**
|
|
59
|
+
* The MediaStream object associated with this slot.
|
|
60
|
+
*
|
|
61
|
+
* @returns {MediaStream} The MediaStreamTrack.
|
|
62
|
+
*/
|
|
63
|
+
get stream(): MediaStream;
|
|
64
|
+
/**
|
|
65
|
+
* The underlying WCME receive slot
|
|
66
|
+
*/
|
|
67
|
+
get wcmeReceiveSlot(): WcmeReceiveSlot;
|
|
68
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { MediaType, ReceiveSlot as WcmeReceiveSlot } from '@webex/internal-media-core';
|
|
2
|
+
import { FindMemberIdCallback, ReceiveSlot } from './receiveSlot';
|
|
3
|
+
export type CreateSlotCallback = (mediaType: MediaType) => Promise<WcmeReceiveSlot>;
|
|
4
|
+
export type { CSI, FindMemberIdCallback } from './receiveSlot';
|
|
5
|
+
/**
|
|
6
|
+
* Manages all receive slots used by a meeting. WMCE receive slots cannot be ever deleted,
|
|
7
|
+
* so this manager has a pool in order to re-use the slots that were released earlier.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ReceiveSlotManager {
|
|
10
|
+
private allocatedSlots;
|
|
11
|
+
private freeSlots;
|
|
12
|
+
private createSlotCallback;
|
|
13
|
+
private findMemberIdByCsiCallback;
|
|
14
|
+
/**
|
|
15
|
+
* Constructor
|
|
16
|
+
* @param {Meeting} meeting
|
|
17
|
+
*/
|
|
18
|
+
constructor(createSlotCallback: CreateSlotCallback, findMemberIdByCsiCallback: FindMemberIdCallback);
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new receive slot or returns one from the existing pool of free slots
|
|
21
|
+
*
|
|
22
|
+
* @param {MediaType} mediaType
|
|
23
|
+
* @returns {Promise<ReceiveSlot>}
|
|
24
|
+
*/
|
|
25
|
+
allocateSlot(mediaType: MediaType): Promise<ReceiveSlot>;
|
|
26
|
+
/**
|
|
27
|
+
* Releases the slot back to the pool so it can be re-used by others in the future
|
|
28
|
+
* @param {ReceiveSlot} slot
|
|
29
|
+
*/
|
|
30
|
+
releaseSlot(slot: ReceiveSlot): void;
|
|
31
|
+
/**
|
|
32
|
+
* Resets the slot manager - this method should be called when the media connection is torn down
|
|
33
|
+
*/
|
|
34
|
+
reset(): void;
|
|
35
|
+
/**
|
|
36
|
+
* Returns statistics about the managed slots
|
|
37
|
+
*
|
|
38
|
+
* @returns {Object}
|
|
39
|
+
*/
|
|
40
|
+
getStats(): {
|
|
41
|
+
numAllocatedSlots: {};
|
|
42
|
+
numFreeSlots: {};
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Tries to find the member id on all allocated receive slots
|
|
46
|
+
* This function should be called when new members are added to the meeting.
|
|
47
|
+
*/
|
|
48
|
+
updateMemberIds(): void;
|
|
49
|
+
/**
|
|
50
|
+
* Find a receive slot by a ssrc.
|
|
51
|
+
*
|
|
52
|
+
* @param ssrc - The ssrc of the receive slot to find.
|
|
53
|
+
* @returns - The receive slot with this ssrc, undefined if not found.
|
|
54
|
+
*/
|
|
55
|
+
findReceiveSlotBySsrc(ssrc: number): ReceiveSlot | undefined;
|
|
56
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { MediaType, StreamState } from '@webex/internal-media-core';
|
|
2
|
+
import EventsScope from '../common/events/events-scope';
|
|
3
|
+
import { MediaRequestManager } from './mediaRequestManager';
|
|
4
|
+
import { ReceiveSlot } from './receiveSlot';
|
|
5
|
+
export declare const RemoteMediaEvents: {
|
|
6
|
+
SourceUpdate: string;
|
|
7
|
+
Stopped: string;
|
|
8
|
+
};
|
|
9
|
+
export type RemoteVideoResolution = 'thumbnail' | 'very small' | 'small' | 'medium' | 'large' | 'best';
|
|
10
|
+
/**
|
|
11
|
+
* Converts pane size into h264 maxFs
|
|
12
|
+
* @param {PaneSize} paneSize
|
|
13
|
+
* @returns {number}
|
|
14
|
+
*/
|
|
15
|
+
export declare function getMaxFs(paneSize: RemoteVideoResolution): number;
|
|
16
|
+
type Options = {
|
|
17
|
+
resolution?: RemoteVideoResolution;
|
|
18
|
+
};
|
|
19
|
+
export type RemoteMediaId = string;
|
|
20
|
+
/**
|
|
21
|
+
* Class representing a remote audio/video stream.
|
|
22
|
+
*
|
|
23
|
+
* Internally it is associated with a specific receive slot
|
|
24
|
+
* and a media request for it.
|
|
25
|
+
*/
|
|
26
|
+
export declare class RemoteMedia extends EventsScope {
|
|
27
|
+
private receiveSlot?;
|
|
28
|
+
private readonly mediaRequestManager;
|
|
29
|
+
private readonly options;
|
|
30
|
+
private mediaRequestId?;
|
|
31
|
+
readonly id: RemoteMediaId;
|
|
32
|
+
/**
|
|
33
|
+
* Constructs RemoteMedia instance
|
|
34
|
+
*
|
|
35
|
+
* @param receiveSlot
|
|
36
|
+
* @param mediaRequestManager
|
|
37
|
+
* @param options
|
|
38
|
+
*/
|
|
39
|
+
constructor(receiveSlot: ReceiveSlot, mediaRequestManager: MediaRequestManager, options?: Options);
|
|
40
|
+
/**
|
|
41
|
+
* Supply the width and height of the video element
|
|
42
|
+
* to restrict the requested resolution to this size
|
|
43
|
+
* @param width width of the video element
|
|
44
|
+
* @param height height of the video element
|
|
45
|
+
*/
|
|
46
|
+
setSizeHint(width: any, height: any): void;
|
|
47
|
+
/**
|
|
48
|
+
* registers event listeners on the receive slot and forwards all the events
|
|
49
|
+
*/
|
|
50
|
+
private setupEventListeners;
|
|
51
|
+
/**
|
|
52
|
+
* Getter for mediaType
|
|
53
|
+
*/
|
|
54
|
+
get mediaType(): MediaType;
|
|
55
|
+
/**
|
|
56
|
+
* Getter for memberId
|
|
57
|
+
*/
|
|
58
|
+
get memberId(): string;
|
|
59
|
+
/**
|
|
60
|
+
* Getter for csi
|
|
61
|
+
*/
|
|
62
|
+
get csi(): number;
|
|
63
|
+
/**
|
|
64
|
+
* Getter for source state
|
|
65
|
+
*/
|
|
66
|
+
get sourceState(): StreamState;
|
|
67
|
+
/**
|
|
68
|
+
* Getter for remote media stream
|
|
69
|
+
*/
|
|
70
|
+
get stream(): MediaStream;
|
|
71
|
+
}
|
|
72
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { NamedMediaGroup } from '@webex/internal-media-core';
|
|
2
|
+
import { RemoteMedia, RemoteVideoResolution } from './remoteMedia';
|
|
3
|
+
import { MediaRequestManager } from './mediaRequestManager';
|
|
4
|
+
import { CSI, ReceiveSlot } from './receiveSlot';
|
|
5
|
+
type Options = {
|
|
6
|
+
resolution?: RemoteVideoResolution;
|
|
7
|
+
preferLiveVideo?: boolean;
|
|
8
|
+
namedMediaGroup?: NamedMediaGroup;
|
|
9
|
+
};
|
|
10
|
+
export declare class RemoteMediaGroup {
|
|
11
|
+
private mediaRequestManager;
|
|
12
|
+
private priority;
|
|
13
|
+
private options;
|
|
14
|
+
private unpinnedRemoteMedia;
|
|
15
|
+
private mediaRequestId?;
|
|
16
|
+
private pinnedRemoteMedia;
|
|
17
|
+
constructor(mediaRequestManager: MediaRequestManager, receiveSlots: ReceiveSlot[], priority: number, commitMediaRequest: boolean, options?: Options);
|
|
18
|
+
/**
|
|
19
|
+
* Gets the array of remote media elements from the group
|
|
20
|
+
*
|
|
21
|
+
* @param {string} filter - 'all' (default) returns both pinned and unpinned
|
|
22
|
+
* @returns {Array<RemoteMedia>}
|
|
23
|
+
*/
|
|
24
|
+
getRemoteMedia(filter?: 'all' | 'pinned' | 'unpinned'): RemoteMedia[];
|
|
25
|
+
/**
|
|
26
|
+
* Pins a specific remote media instance to a specfic CSI, so the media will
|
|
27
|
+
* no longer come from active speaker, but from that CSI.
|
|
28
|
+
* If no CSI is given, the current CSI value is used.
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
pin(remoteMedia: RemoteMedia, csi?: CSI): void;
|
|
32
|
+
/**
|
|
33
|
+
* Unpins a remote media instance, so that it will again provide media from active speakers
|
|
34
|
+
*
|
|
35
|
+
*/
|
|
36
|
+
unpin(remoteMedia: RemoteMedia): void;
|
|
37
|
+
isPinned(remoteMedia: RemoteMedia): boolean;
|
|
38
|
+
private sendActiveSpeakerMediaRequest;
|
|
39
|
+
private cancelActiveSpeakerMediaRequest;
|
|
40
|
+
/**
|
|
41
|
+
* Checks if a given RemoteMedia instance belongs to this group.
|
|
42
|
+
*
|
|
43
|
+
* @param remoteMedia RemoteMedia instance to check
|
|
44
|
+
* @param filter controls which remote media from the group to check
|
|
45
|
+
* @returns true if remote media is found
|
|
46
|
+
*/
|
|
47
|
+
includes(remoteMedia: RemoteMedia, filter?: 'all' | 'pinned' | 'unpinned'): boolean;
|
|
48
|
+
}
|
|
49
|
+
export {};
|