@webex/plugin-meetings 3.0.0 → 3.1.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +8 -4
- package/dist/constants.js.map +1 -1
- package/dist/index.js +86 -0
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +16 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/mediaSharesUtils.js +15 -1
- package/dist/locus-info/mediaSharesUtils.js.map +1 -1
- package/dist/locus-info/selfUtils.js +5 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/media/MediaConnectionAwaiter.js +163 -0
- package/dist/media/MediaConnectionAwaiter.js.map +1 -0
- package/dist/media/index.js +4 -1
- package/dist/media/index.js.map +1 -1
- package/dist/media/properties.js +4 -24
- package/dist/media/properties.js.map +1 -1
- package/dist/meeting/index.js +893 -677
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/muteState.js +37 -25
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/meeting/request.js +32 -23
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +1 -0
- package/dist/meeting/util.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 -295
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +20 -0
- package/dist/meetings/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +1 -1
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/remoteMediaGroup.js +16 -2
- package/dist/multistream/remoteMediaGroup.js.map +1 -1
- package/dist/multistream/remoteMediaManager.js +179 -65
- package/dist/multistream/remoteMediaManager.js.map +1 -1
- package/dist/multistream/sendSlotManager.js +22 -0
- package/dist/multistream/sendSlotManager.js.map +1 -1
- package/dist/reachability/clusterReachability.js +29 -15
- package/dist/reachability/clusterReachability.js.map +1 -1
- package/dist/reachability/index.js +18 -2
- package/dist/reachability/index.js.map +1 -1
- package/dist/reachability/request.js +12 -10
- package/dist/reachability/request.js.map +1 -1
- package/dist/reachability/util.js +19 -0
- package/dist/reachability/util.js.map +1 -1
- package/dist/reconnection-manager/index.js +2 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/index.js +15 -0
- package/dist/roap/index.js.map +1 -1
- package/dist/roap/request.js +3 -3
- package/dist/roap/request.js.map +1 -1
- package/dist/roap/turnDiscovery.js +307 -126
- package/dist/roap/turnDiscovery.js.map +1 -1
- package/dist/statsAnalyzer/index.js +53 -30
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/{config.d.ts → types/config.d.ts} +1 -0
- package/dist/{constants.d.ts → types/constants.d.ts} +5 -4
- package/dist/types/index.d.ts +19 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/{meeting → types/meeting}/index.d.ts +26 -7
- package/dist/{meeting → types/meeting}/muteState.d.ts +2 -8
- package/dist/{meeting → types/meeting}/request.d.ts +3 -0
- package/dist/{meeting-info → types/meeting-info}/index.d.ts +1 -1
- package/dist/{meeting-info → types/meeting-info}/meeting-info-v2.d.ts +1 -1
- package/dist/types/meeting-info/util.d.ts +49 -0
- package/dist/types/meeting-info/utilv2.d.ts +65 -0
- package/dist/{meetings → types/meetings}/index.d.ts +8 -0
- package/dist/{multistream → types/multistream}/mediaRequestManager.d.ts +2 -1
- package/dist/{multistream → types/multistream}/remoteMediaGroup.d.ts +2 -0
- package/dist/{multistream → types/multistream}/remoteMediaManager.d.ts +15 -0
- package/dist/{multistream → types/multistream}/sendSlotManager.d.ts +9 -1
- package/dist/{reachability → types/reachability}/clusterReachability.d.ts +1 -0
- package/dist/{reachability → types/reachability}/index.d.ts +4 -0
- package/dist/{reachability → types/reachability}/util.d.ts +7 -0
- package/dist/{roap → types/roap}/index.d.ts +10 -2
- package/dist/{roap → types/roap}/turnDiscovery.d.ts +64 -17
- package/dist/webinar/index.js +1 -1
- package/package.json +23 -23
- package/src/config.ts +1 -0
- package/src/constants.ts +7 -3
- package/src/index.ts +31 -0
- package/src/interpretation/index.ts +18 -1
- package/src/locus-info/mediaSharesUtils.ts +16 -0
- package/src/locus-info/selfUtils.ts +5 -0
- package/src/media/MediaConnectionAwaiter.ts +174 -0
- package/src/media/index.ts +3 -1
- package/src/media/properties.ts +6 -31
- package/src/meeting/index.ts +321 -106
- package/src/meeting/muteState.ts +34 -20
- package/src/meeting/request.ts +18 -2
- package/src/meeting/util.ts +1 -0
- package/src/meeting-info/util.ts +241 -233
- package/src/meeting-info/utilv2.ts +250 -243
- package/src/meetings/index.ts +18 -0
- package/src/multistream/mediaRequestManager.ts +4 -1
- package/src/multistream/remoteMediaGroup.ts +19 -0
- package/src/multistream/remoteMediaManager.ts +101 -16
- package/src/multistream/sendSlotManager.ts +28 -0
- package/src/reachability/clusterReachability.ts +20 -5
- package/src/reachability/index.ts +24 -1
- package/src/reachability/request.ts +15 -11
- package/src/reachability/util.ts +21 -0
- package/src/reconnection-manager/index.ts +1 -1
- package/src/roap/index.ts +25 -3
- package/src/roap/request.ts +3 -3
- package/src/roap/turnDiscovery.ts +244 -78
- package/src/statsAnalyzer/index.ts +63 -27
- package/test/integration/spec/journey.js +14 -14
- package/test/integration/spec/space-meeting.js +1 -1
- package/test/unit/spec/interpretation/index.ts +39 -3
- package/test/unit/spec/locus-info/index.js +28 -19
- package/test/unit/spec/locus-info/mediaSharesUtils.ts +9 -0
- package/test/unit/spec/locus-info/selfUtils.js +42 -12
- package/test/unit/spec/media/MediaConnectionAwaiter.ts +344 -0
- package/test/unit/spec/media/index.ts +89 -78
- package/test/unit/spec/media/properties.ts +16 -70
- package/test/unit/spec/meeting/index.js +638 -139
- package/test/unit/spec/meeting/muteState.js +219 -67
- package/test/unit/spec/meeting/request.js +21 -0
- package/test/unit/spec/meeting/utils.js +6 -1
- package/test/unit/spec/meeting-info/utilv2.js +6 -0
- package/test/unit/spec/meetings/index.js +40 -20
- package/test/unit/spec/multistream/mediaRequestManager.ts +20 -2
- package/test/unit/spec/multistream/remoteMediaGroup.ts +79 -1
- package/test/unit/spec/multistream/remoteMediaManager.ts +199 -1
- package/test/unit/spec/multistream/sendSlotManager.ts +50 -18
- package/test/unit/spec/reachability/clusterReachability.ts +86 -22
- package/test/unit/spec/reachability/index.ts +197 -60
- package/test/unit/spec/reachability/request.js +15 -7
- package/test/unit/spec/reachability/util.ts +32 -2
- package/test/unit/spec/reconnection-manager/index.js +28 -0
- package/test/unit/spec/roap/index.ts +61 -6
- package/test/unit/spec/roap/turnDiscovery.ts +298 -16
- package/test/unit/spec/stats-analyzer/index.js +179 -0
- package/dist/index.d.ts +0 -7
- package/dist/meeting-info/util.d.ts +0 -2
- package/dist/meeting-info/utilv2.d.ts +0 -2
- package/dist/member/member.types.d.ts +0 -11
- package/dist/member/member.types.js +0 -17
- package/dist/member/member.types.js.map +0 -1
- package/src/member/member.types.ts +0 -13
- /package/dist/{annotation → types/annotation}/annotation.types.d.ts +0 -0
- /package/dist/{annotation → types/annotation}/constants.d.ts +0 -0
- /package/dist/{annotation → types/annotation}/index.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/breakout.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/collection.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/edit-lock-error.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/events.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/index.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/request.d.ts +0 -0
- /package/dist/{breakouts → types/breakouts}/utils.d.ts +0 -0
- /package/dist/{common → types/common}/browser-detection.d.ts +0 -0
- /package/dist/{common → types/common}/collection.d.ts +0 -0
- /package/dist/{common → types/common}/config.d.ts +0 -0
- /package/dist/{common → types/common}/errors/captcha-error.d.ts +0 -0
- /package/dist/{common → types/common}/errors/intent-to-join.d.ts +0 -0
- /package/dist/{common → types/common}/errors/join-meeting.d.ts +0 -0
- /package/dist/{common → types/common}/errors/media.d.ts +0 -0
- /package/dist/{common → types/common}/errors/no-meeting-info.d.ts +0 -0
- /package/dist/{common → types/common}/errors/parameter.d.ts +0 -0
- /package/dist/{common → types/common}/errors/password-error.d.ts +0 -0
- /package/dist/{common → types/common}/errors/permission.d.ts +0 -0
- /package/dist/{common → types/common}/errors/reclaim-host-role-errors.d.ts +0 -0
- /package/dist/{common → types/common}/errors/reconnection-in-progress.d.ts +0 -0
- /package/dist/{common → types/common}/errors/reconnection.d.ts +0 -0
- /package/dist/{common → types/common}/errors/stats.d.ts +0 -0
- /package/dist/{common → types/common}/errors/webex-errors.d.ts +0 -0
- /package/dist/{common → types/common}/errors/webex-meetings-error.d.ts +0 -0
- /package/dist/{common → types/common}/events/events-scope.d.ts +0 -0
- /package/dist/{common → types/common}/events/events.d.ts +0 -0
- /package/dist/{common → types/common}/events/trigger-proxy.d.ts +0 -0
- /package/dist/{common → types/common}/events/util.d.ts +0 -0
- /package/dist/{common → types/common}/logs/logger-config.d.ts +0 -0
- /package/dist/{common → types/common}/logs/logger-proxy.d.ts +0 -0
- /package/dist/{common → types/common}/logs/request.d.ts +0 -0
- /package/dist/{common → types/common}/queue.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/constants.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/enums.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/index.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/types.d.ts +0 -0
- /package/dist/{controls-options-manager → types/controls-options-manager}/util.d.ts +0 -0
- /package/dist/{interceptors → types/interceptors}/index.d.ts +0 -0
- /package/dist/{interceptors → types/interceptors}/locusRetry.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/collection.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/index.d.ts +0 -0
- /package/dist/{interpretation → types/interpretation}/siLanguage.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/controlsUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/embeddedAppsUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/fullState.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/hostUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/index.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/infoUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/mediaSharesUtils.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/parser.d.ts +0 -0
- /package/dist/{locus-info → types/locus-info}/selfUtils.d.ts +0 -0
- /package/dist/{media → types/media}/index.d.ts +0 -0
- /package/dist/{media → types/media}/properties.d.ts +0 -0
- /package/dist/{media → types/media}/util.d.ts +0 -0
- /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/locusMediaRequest.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/request.type.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/state.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/util.d.ts +0 -0
- /package/dist/{meeting → types/meeting}/voicea-meeting.d.ts +0 -0
- /package/dist/{meeting-info → types/meeting-info}/collection.d.ts +0 -0
- /package/dist/{meeting-info → types/meeting-info}/request.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/collection.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/meetings.types.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/request.d.ts +0 -0
- /package/dist/{meetings → types/meetings}/util.d.ts +0 -0
- /package/dist/{member → types/member}/index.d.ts +0 -0
- /package/dist/{member → types/member}/types.d.ts +0 -0
- /package/dist/{member → types/member}/util.d.ts +0 -0
- /package/dist/{members → types/members}/collection.d.ts +0 -0
- /package/dist/{members → types/members}/index.d.ts +0 -0
- /package/dist/{members → types/members}/request.d.ts +0 -0
- /package/dist/{members → types/members}/types.d.ts +0 -0
- /package/dist/{members → types/members}/util.d.ts +0 -0
- /package/dist/{metrics → types/metrics}/constants.d.ts +0 -0
- /package/dist/{metrics → types/metrics}/index.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/receiveSlot.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/receiveSlotManager.d.ts +0 -0
- /package/dist/{multistream → types/multistream}/remoteMedia.d.ts +0 -0
- /package/dist/{networkQualityMonitor → types/networkQualityMonitor}/index.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/index.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/request.d.ts +0 -0
- /package/dist/{personal-meeting-room → types/personal-meeting-room}/util.d.ts +0 -0
- /package/dist/{reachability → types/reachability}/request.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/constants.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/reactions.d.ts +0 -0
- /package/dist/{reactions → types/reactions}/reactions.type.d.ts +0 -0
- /package/dist/{reconnection-manager → types/reconnection-manager}/index.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/enums.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/index.d.ts +0 -0
- /package/dist/{recording-controller → types/recording-controller}/util.d.ts +0 -0
- /package/dist/{roap → types/roap}/request.d.ts +0 -0
- /package/dist/{rtcMetrics → types/rtcMetrics}/constants.d.ts +0 -0
- /package/dist/{rtcMetrics → types/rtcMetrics}/index.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/global.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/index.d.ts +0 -0
- /package/dist/{statsAnalyzer → types/statsAnalyzer}/mqaUtil.d.ts +0 -0
- /package/dist/{transcription → types/transcription}/index.d.ts +0 -0
- /package/dist/{webinar → types/webinar}/collection.d.ts +0 -0
- /package/dist/{webinar → types/webinar}/index.d.ts +0 -0
- /package/test/unit/spec/locus-info/{lib/selfConstant.js → selfConstant.js} +0 -0
package/src/config.ts
CHANGED
package/src/constants.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @ts-ignore
|
|
2
2
|
import {hydraTypes} from '@webex/common';
|
|
3
3
|
|
|
4
|
-
type Enum<T extends Record<string, unknown>> = T[keyof T];
|
|
4
|
+
export type Enum<T extends Record<string, unknown>> = T[keyof T];
|
|
5
5
|
|
|
6
6
|
// *********** LOWERCASE / CAMELCASE STRINGS ************
|
|
7
7
|
|
|
@@ -196,7 +196,7 @@ export const ICE_FAIL_TIMEOUT = 3000;
|
|
|
196
196
|
|
|
197
197
|
export const RETRY_TIMEOUT = 3000;
|
|
198
198
|
|
|
199
|
-
export const ICE_AND_DTLS_CONNECTION_TIMEOUT =
|
|
199
|
+
export const ICE_AND_DTLS_CONNECTION_TIMEOUT = 20000;
|
|
200
200
|
export const ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT = 35000;
|
|
201
201
|
|
|
202
202
|
// ******************** REGEX **********************
|
|
@@ -361,6 +361,7 @@ export const EVENT_TRIGGERS = {
|
|
|
361
361
|
REMOTE_VIDEO_SOURCE_COUNT_CHANGED: 'media:remoteVideoSourceCountChanged',
|
|
362
362
|
REMOTE_AUDIO_SOURCE_COUNT_CHANGED: 'media:remoteAudioSourceCountChanged',
|
|
363
363
|
REMOTE_MEDIA_AUDIO_CREATED: 'media:remoteAudio:created',
|
|
364
|
+
REMOTE_MEDIA_INTERPRETATION_AUDIO_CREATED: 'media:remoteInterpretationAudio:created',
|
|
364
365
|
REMOTE_MEDIA_SCREEN_SHARE_AUDIO_CREATED: 'media:remoteScreenShareAudio:created',
|
|
365
366
|
REMOTE_MEDIA_VIDEO_LAYOUT_CHANGED: 'media:remoteVideo:layoutChanged',
|
|
366
367
|
// Controls
|
|
@@ -971,7 +972,7 @@ export const SELF_ROLES = {
|
|
|
971
972
|
COHOST: 'COHOST',
|
|
972
973
|
MODERATOR: 'MODERATOR',
|
|
973
974
|
ATTENDEE: 'ATTENDEE',
|
|
974
|
-
|
|
975
|
+
PANELIST: 'PANELIST',
|
|
975
976
|
};
|
|
976
977
|
|
|
977
978
|
export const MEETING_STATE = {
|
|
@@ -1318,3 +1319,6 @@ export type IP_VERSION = Enum<typeof IP_VERSION>;
|
|
|
1318
1319
|
// constant for if the permissionToken is about to expire in the next 30 seconds, refresh it
|
|
1319
1320
|
export const MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC = 30;
|
|
1320
1321
|
export const MEETING_PERMISSION_TOKEN_REFRESH_REASON = 'ttl-join';
|
|
1322
|
+
|
|
1323
|
+
// constant for named media group type
|
|
1324
|
+
export const NAMED_MEDIA_GROUP_TYPE_AUDIO = 1;
|
package/src/index.ts
CHANGED
|
@@ -4,6 +4,19 @@ import {registerPlugin} from '@webex/webex-core';
|
|
|
4
4
|
import Meetings from './meetings';
|
|
5
5
|
import config from './config';
|
|
6
6
|
import {LocusRetryStatusInterceptor} from './interceptors';
|
|
7
|
+
import CaptchaError from './common/errors/captcha-error';
|
|
8
|
+
import IntentToJoinError from './common/errors/intent-to-join';
|
|
9
|
+
import PasswordError from './common/errors/password-error';
|
|
10
|
+
import PermissionError from './common/errors/permission';
|
|
11
|
+
import {
|
|
12
|
+
ReclaimHostEmptyWrongKeyError,
|
|
13
|
+
ReclaimHostIsHostAlreadyError,
|
|
14
|
+
ReclaimHostNotAllowedError,
|
|
15
|
+
ReclaimHostNotSupportedError,
|
|
16
|
+
} from './common/errors/reclaim-host-role-errors';
|
|
17
|
+
import Meeting from './meeting';
|
|
18
|
+
import MeetingInfoUtil from './meeting-info/utilv2';
|
|
19
|
+
import JoinMeetingError from './common/errors/join-meeting';
|
|
7
20
|
|
|
8
21
|
registerPlugin('meetings', Meetings, {
|
|
9
22
|
config,
|
|
@@ -19,6 +32,7 @@ export {
|
|
|
19
32
|
LocalSystemAudioStream,
|
|
20
33
|
LocalStreamEventNames,
|
|
21
34
|
StreamEventNames,
|
|
35
|
+
RemoteStreamEventNames,
|
|
22
36
|
type ServerMuteReason,
|
|
23
37
|
LocalMicrophoneStreamEventNames,
|
|
24
38
|
LocalCameraStreamEventNames,
|
|
@@ -38,6 +52,23 @@ export default Meetings;
|
|
|
38
52
|
|
|
39
53
|
export * as CONSTANTS from './constants';
|
|
40
54
|
export * as REACTIONS from './reactions/reactions';
|
|
55
|
+
export * as sdkAnnotationTypes from './annotation/annotation.types';
|
|
56
|
+
export * as MeetingInfoV2 from './meeting-info/meeting-info-v2';
|
|
57
|
+
export {type Reaction} from './reactions/reactions.type';
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
CaptchaError,
|
|
61
|
+
IntentToJoinError,
|
|
62
|
+
JoinMeetingError,
|
|
63
|
+
PasswordError,
|
|
64
|
+
PermissionError,
|
|
65
|
+
ReclaimHostIsHostAlreadyError,
|
|
66
|
+
ReclaimHostNotAllowedError,
|
|
67
|
+
ReclaimHostNotSupportedError,
|
|
68
|
+
ReclaimHostEmptyWrongKeyError,
|
|
69
|
+
Meeting,
|
|
70
|
+
MeetingInfoUtil,
|
|
71
|
+
};
|
|
41
72
|
|
|
42
73
|
export {RemoteMedia} from './multistream/remoteMedia';
|
|
43
74
|
|
|
@@ -121,14 +121,31 @@ const SimultaneousInterpretation = WebexPlugin.extend({
|
|
|
121
121
|
* Update self's interpretation information (self is interpreter)
|
|
122
122
|
* @param {Object} interpretation
|
|
123
123
|
* @param {String} selfParticipantId
|
|
124
|
-
* @returns {
|
|
124
|
+
* @returns {bool} is target language changed
|
|
125
125
|
*/
|
|
126
126
|
updateSelfInterpretation({interpretation, selfParticipantId}) {
|
|
127
|
+
const preTargetLanguage = this.targetLanguage;
|
|
127
128
|
const {originalLanguage, sourceLanguage, order, isActive, targetLanguage, receiveLanguage} =
|
|
128
129
|
interpretation || {};
|
|
129
130
|
this.set({originalLanguage, sourceLanguage, order, isActive, targetLanguage, receiveLanguage});
|
|
130
131
|
this.set('selfParticipantId', selfParticipantId);
|
|
132
|
+
this.set('selfIsInterpreter', !!targetLanguage);
|
|
133
|
+
|
|
134
|
+
return !!(preTargetLanguage !== targetLanguage);
|
|
131
135
|
},
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Get the language code of the interpreter target language
|
|
139
|
+
* @returns {number}
|
|
140
|
+
*/
|
|
141
|
+
getTargetLanguageCode() {
|
|
142
|
+
if (this.selfIsInterpreter) {
|
|
143
|
+
return this.siLanguages.get(this.targetLanguage)?.languageCode;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return 0;
|
|
147
|
+
},
|
|
148
|
+
|
|
132
149
|
/**
|
|
133
150
|
* query interpretation languages
|
|
134
151
|
* @returns {Promise}
|
|
@@ -17,6 +17,7 @@ MediaSharesUtils.parse = (mediaShares: object) => {
|
|
|
17
17
|
url: MediaSharesUtils.getContentUrl(mediaShares),
|
|
18
18
|
shareInstanceId: MediaSharesUtils.getShareInstanceId(mediaShares),
|
|
19
19
|
deviceUrlSharing: MediaSharesUtils.getContentBeneficiaryDeviceUrl(mediaShares),
|
|
20
|
+
resourceType: MediaSharesUtils.getContentResourceType(mediaShares),
|
|
20
21
|
},
|
|
21
22
|
whiteboard: {
|
|
22
23
|
beneficiaryId: MediaSharesUtils.getWhiteboardBeneficiaryId(mediaShares),
|
|
@@ -159,6 +160,21 @@ MediaSharesUtils.getContentAnnotation = (mediaShares: object) => {
|
|
|
159
160
|
return extractContent.annotation;
|
|
160
161
|
};
|
|
161
162
|
|
|
163
|
+
/**
|
|
164
|
+
* get live resourceType is sharing from media shares (content)
|
|
165
|
+
* @param {Object} mediaShares
|
|
166
|
+
* @returns {Object}
|
|
167
|
+
*/
|
|
168
|
+
MediaSharesUtils.getContentResourceType = (mediaShares: object) => {
|
|
169
|
+
const extractContent = MediaSharesUtils.extractContent(mediaShares);
|
|
170
|
+
|
|
171
|
+
if (!extractContent || !extractContent.resourceType) {
|
|
172
|
+
return undefined;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
return extractContent.resourceType;
|
|
176
|
+
};
|
|
177
|
+
|
|
162
178
|
/**
|
|
163
179
|
* get url is sharing from media shares (content)
|
|
164
180
|
* @param {Object} mediaShares
|
|
@@ -428,6 +428,11 @@ SelfUtils.mutedByOthersChanged = (oldSelf, changedSelf) => {
|
|
|
428
428
|
return false;
|
|
429
429
|
}
|
|
430
430
|
|
|
431
|
+
// there is no need to trigger user update if no one muted user
|
|
432
|
+
if (changedSelf.selfIdentity === changedSelf.modifiedBy) {
|
|
433
|
+
return false;
|
|
434
|
+
}
|
|
435
|
+
|
|
431
436
|
return (
|
|
432
437
|
changedSelf.remoteMuted !== null &&
|
|
433
438
|
(oldSelf.remoteMuted !== changedSelf.remoteMuted ||
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import {Defer} from '@webex/common';
|
|
2
|
+
import {ConnectionState, Event} from '@webex/internal-media-core';
|
|
3
|
+
import LoggerProxy from '../common/logs/logger-proxy';
|
|
4
|
+
import {ICE_AND_DTLS_CONNECTION_TIMEOUT} from '../constants';
|
|
5
|
+
|
|
6
|
+
export interface MediaConnectionAwaiterProps {
|
|
7
|
+
webrtcMediaConnection: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* @class MediaConnectionAwaiter
|
|
12
|
+
*/
|
|
13
|
+
export default class MediaConnectionAwaiter {
|
|
14
|
+
private webrtcMediaConnection: any;
|
|
15
|
+
private timer: any;
|
|
16
|
+
private defer: Defer;
|
|
17
|
+
private retried: boolean;
|
|
18
|
+
private onTimeoutCallback: () => void;
|
|
19
|
+
private connectionStateCallback: () => void;
|
|
20
|
+
private iceGatheringStateCallback: () => void;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @param {MediaConnectionAwaiterProps} mediaConnectionAwaiterProps
|
|
24
|
+
*/
|
|
25
|
+
constructor({webrtcMediaConnection}: MediaConnectionAwaiterProps) {
|
|
26
|
+
this.webrtcMediaConnection = webrtcMediaConnection;
|
|
27
|
+
this.defer = new Defer();
|
|
28
|
+
this.retried = false;
|
|
29
|
+
this.onTimeoutCallback = this.onTimeout.bind(this);
|
|
30
|
+
this.connectionStateCallback = this.connectionStateListenerCallback.bind(this);
|
|
31
|
+
this.iceGatheringStateCallback = this.iceGatheringStateListenerCallback.bind(this);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Returns true if the connection is connected, false otherwise.
|
|
36
|
+
*
|
|
37
|
+
* @returns {boolean}
|
|
38
|
+
*/
|
|
39
|
+
private isConnected(): boolean {
|
|
40
|
+
return this.webrtcMediaConnection.getConnectionState() === ConnectionState.Connected;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Returns true if the ICE Gathering is completed, false otherwise.
|
|
45
|
+
*
|
|
46
|
+
* @returns {boolean}
|
|
47
|
+
*/
|
|
48
|
+
private isIceGatheringCompleted(): boolean {
|
|
49
|
+
return this.webrtcMediaConnection.getIceGatheringState() === 'complete';
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Clears the callbacks.
|
|
54
|
+
*
|
|
55
|
+
* @returns {void}
|
|
56
|
+
*/
|
|
57
|
+
private clearCallbacks(): void {
|
|
58
|
+
this.webrtcMediaConnection.off(
|
|
59
|
+
Event.ICE_GATHERING_STATE_CHANGED,
|
|
60
|
+
this.iceGatheringStateCallback
|
|
61
|
+
);
|
|
62
|
+
this.webrtcMediaConnection.off(Event.CONNECTION_STATE_CHANGED, this.connectionStateCallback);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Listener for connection state change.
|
|
67
|
+
*
|
|
68
|
+
* @returns {void}
|
|
69
|
+
*/
|
|
70
|
+
connectionStateListenerCallback(): void {
|
|
71
|
+
LoggerProxy.logger.log(
|
|
72
|
+
`Media:MediaConnectionAwaiter#connectionStateListenerCallback --> connection state: ${this.webrtcMediaConnection.getConnectionState()}`
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
if (!this.isConnected()) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
clearTimeout(this.timer);
|
|
80
|
+
|
|
81
|
+
this.clearCallbacks();
|
|
82
|
+
|
|
83
|
+
this.defer.resolve();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Listener for ICE gathering state change.
|
|
88
|
+
*
|
|
89
|
+
* @returns {void}
|
|
90
|
+
*/
|
|
91
|
+
iceGatheringStateListenerCallback(): void {
|
|
92
|
+
const iceGatheringState = this.webrtcMediaConnection.getIceGatheringState();
|
|
93
|
+
|
|
94
|
+
LoggerProxy.logger.log(
|
|
95
|
+
`Media:MediaConnectionAwaiter#iceGatheringStateListenerCallback --> ICE gathering state change -> ${iceGatheringState}`
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
if (!this.isIceGatheringCompleted()) {
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
if (this.isConnected()) {
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
clearTimeout(this.timer);
|
|
107
|
+
|
|
108
|
+
this.timer = setTimeout(this.onTimeoutCallback, ICE_AND_DTLS_CONNECTION_TIMEOUT);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* Function called when the timeout is reached.
|
|
113
|
+
*
|
|
114
|
+
* @returns {void}
|
|
115
|
+
*/
|
|
116
|
+
onTimeout(): void {
|
|
117
|
+
if (this.isConnected()) {
|
|
118
|
+
this.clearCallbacks();
|
|
119
|
+
|
|
120
|
+
this.defer.resolve();
|
|
121
|
+
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
if (!this.isIceGatheringCompleted()) {
|
|
126
|
+
if (!this.retried) {
|
|
127
|
+
LoggerProxy.logger.warn(
|
|
128
|
+
'Media:MediaConnectionAwaiter#onTimeout --> ICE gathering did not complete within the timeout for the first time, retrying once'
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
// retry once if ICE gathering is not completed
|
|
132
|
+
this.retried = true;
|
|
133
|
+
clearTimeout(this.timer);
|
|
134
|
+
this.timer = setTimeout(this.onTimeoutCallback, ICE_AND_DTLS_CONNECTION_TIMEOUT);
|
|
135
|
+
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
LoggerProxy.logger.warn(
|
|
140
|
+
'Media:MediaConnectionAwaiter#onTimeout --> ICE gathering did not complete within the timeout for the second time, rejecting'
|
|
141
|
+
);
|
|
142
|
+
} else {
|
|
143
|
+
LoggerProxy.logger.warn(
|
|
144
|
+
'Media:MediaConnectionAwaiter#onTimeout --> ICE gathering completed, but connection state is not connected, rejecting'
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
this.clearCallbacks();
|
|
149
|
+
|
|
150
|
+
this.defer.reject();
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Waits for the webrtc media connection to be connected.
|
|
155
|
+
*
|
|
156
|
+
* @returns {Promise}
|
|
157
|
+
*/
|
|
158
|
+
waitForMediaConnectionConnected(): Promise<void> {
|
|
159
|
+
if (this.isConnected()) {
|
|
160
|
+
return Promise.resolve();
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
this.webrtcMediaConnection.on(Event.CONNECTION_STATE_CHANGED, this.connectionStateCallback);
|
|
164
|
+
|
|
165
|
+
this.webrtcMediaConnection.on(
|
|
166
|
+
Event.ICE_GATHERING_STATE_CHANGED,
|
|
167
|
+
this.iceGatheringStateCallback
|
|
168
|
+
);
|
|
169
|
+
|
|
170
|
+
this.timer = setTimeout(this.onTimeoutCallback, ICE_AND_DTLS_CONNECTION_TIMEOUT);
|
|
171
|
+
|
|
172
|
+
return this.defer.promise;
|
|
173
|
+
}
|
|
174
|
+
}
|
package/src/media/index.ts
CHANGED
|
@@ -160,7 +160,9 @@ Media.createMediaConnection = (
|
|
|
160
160
|
|
|
161
161
|
const iceServers = [];
|
|
162
162
|
|
|
163
|
-
if
|
|
163
|
+
// we might not have any TURN server if TURN discovery failed or wasn't done or
|
|
164
|
+
// we might get an empty TURN url if we land on a video mesh node
|
|
165
|
+
if (turnServerInfo?.url) {
|
|
164
166
|
iceServers.push({
|
|
165
167
|
urls: turnServerInfo.url,
|
|
166
168
|
username: turnServerInfo.username || '',
|
package/src/media/properties.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {ConnectionState, Event} from '@webex/internal-media-core';
|
|
2
|
-
|
|
3
1
|
import {
|
|
4
2
|
LocalCameraStream,
|
|
5
3
|
LocalMicrophoneStream,
|
|
@@ -8,8 +6,9 @@ import {
|
|
|
8
6
|
RemoteStream,
|
|
9
7
|
} from '@webex/media-helpers';
|
|
10
8
|
|
|
11
|
-
import {MEETINGS,
|
|
9
|
+
import {MEETINGS, QUALITY_LEVELS} from '../constants';
|
|
12
10
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
11
|
+
import MediaConnectionAwaiter from './MediaConnectionAwaiter';
|
|
13
12
|
|
|
14
13
|
export type MediaDirection = {
|
|
15
14
|
sendAudio: boolean;
|
|
@@ -175,35 +174,11 @@ export default class MediaProperties {
|
|
|
175
174
|
* @returns {Promise<void>}
|
|
176
175
|
*/
|
|
177
176
|
waitForMediaConnectionConnected(): Promise<void> {
|
|
178
|
-
const
|
|
179
|
-
this.webrtcMediaConnection
|
|
180
|
-
|
|
181
|
-
if (isConnected()) {
|
|
182
|
-
return Promise.resolve();
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
return new Promise<void>((resolve, reject) => {
|
|
186
|
-
let timer;
|
|
187
|
-
|
|
188
|
-
const connectionStateListener = () => {
|
|
189
|
-
LoggerProxy.logger.log(
|
|
190
|
-
`Media:properties#waitForMediaConnectionConnected --> connection state: ${this.webrtcMediaConnection.getConnectionState()}`
|
|
191
|
-
);
|
|
192
|
-
|
|
193
|
-
if (isConnected()) {
|
|
194
|
-
clearTimeout(timer);
|
|
195
|
-
this.webrtcMediaConnection.off(Event.CONNECTION_STATE_CHANGED, connectionStateListener);
|
|
196
|
-
resolve();
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
|
|
200
|
-
timer = setTimeout(() => {
|
|
201
|
-
this.webrtcMediaConnection.off(Event.CONNECTION_STATE_CHANGED, connectionStateListener);
|
|
202
|
-
reject();
|
|
203
|
-
}, ICE_AND_DTLS_CONNECTION_TIMEOUT);
|
|
204
|
-
|
|
205
|
-
this.webrtcMediaConnection.on(Event.CONNECTION_STATE_CHANGED, connectionStateListener);
|
|
177
|
+
const mediaConnectionAwaiter = new MediaConnectionAwaiter({
|
|
178
|
+
webrtcMediaConnection: this.webrtcMediaConnection,
|
|
206
179
|
});
|
|
180
|
+
|
|
181
|
+
return mediaConnectionAwaiter.waitForMediaConnectionConnected();
|
|
207
182
|
}
|
|
208
183
|
|
|
209
184
|
/**
|