@webex/plugin-meetings 3.0.0 → 3.1.0-next.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/{reconnection-in-progress.js → reconnection-not-started.js} +27 -15
- package/dist/common/errors/reconnection-not-started.js.map +1 -0
- package/dist/config.js +2 -1
- package/dist/config.js.map +1 -1
- package/dist/constants.js +18 -6
- 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/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/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 +106 -81
- package/dist/media/properties.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 +1010 -753
- 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 +10 -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 +21 -23
- 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 +140 -110
- 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 +57 -30
- package/dist/statsAnalyzer/index.js.map +1 -1
- package/dist/statsAnalyzer/mqaUtil.js +3 -0
- package/dist/statsAnalyzer/mqaUtil.js.map +1 -1
- package/dist/types/common/errors/reconnection-not-started.d.ts +13 -0
- package/dist/{config.d.ts → types/config.d.ts} +1 -0
- package/dist/{constants.d.ts → types/constants.d.ts} +15 -6
- package/dist/types/index.d.ts +19 -0
- package/dist/types/media/MediaConnectionAwaiter.d.ts +61 -0
- package/dist/{media → types/media}/properties.d.ts +26 -2
- package/dist/{meeting → types/meeting}/in-meeting-actions.d.ts +6 -0
- package/dist/{meeting → types/meeting}/index.d.ts +29 -12
- package/dist/{meeting → types/meeting}/muteState.d.ts +2 -8
- package/dist/{meeting → types/meeting}/request.d.ts +3 -0
- package/dist/{meeting → types/meeting}/util.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 +9 -16
- 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/{reconnection-manager → types/reconnection-manager}/index.d.ts +4 -14
- 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/common/errors/reconnection-not-started.ts +25 -0
- package/src/config.ts +1 -0
- package/src/constants.ts +18 -6
- package/src/index.ts +31 -0
- package/src/interpretation/index.ts +18 -1
- package/src/locus-info/controlsUtils.ts +11 -0
- package/src/locus-info/index.ts +16 -0
- 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 +73 -46
- package/src/meeting/in-meeting-actions.ts +12 -0
- package/src/meeting/index.ts +389 -180
- package/src/meeting/muteState.ts +34 -20
- package/src/meeting/request.ts +18 -2
- package/src/meeting/util.ts +9 -0
- package/src/meeting-info/util.ts +241 -233
- package/src/meeting-info/utilv2.ts +250 -243
- package/src/meetings/index.ts +20 -24
- 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 +129 -106
- 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 +67 -27
- package/src/statsAnalyzer/mqaUtil.ts +5 -0
- 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/controlsUtils.js +20 -0
- package/test/unit/spec/locus-info/index.js +49 -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 +160 -209
- package/test/unit/spec/meeting/in-meeting-actions.ts +6 -0
- package/test/unit/spec/meeting/index.js +833 -205
- 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 +9 -1
- package/test/unit/spec/meeting-info/utilv2.js +6 -0
- package/test/unit/spec/meetings/index.js +41 -26
- 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 +155 -39
- 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 +190 -0
- package/dist/common/errors/reconnection-in-progress.d.ts +0 -9
- package/dist/common/errors/reconnection-in-progress.js.map +0 -1
- 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/common/errors/reconnection-in-progress.ts +0 -8
- 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.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}/util.d.ts +0 -0
- /package/dist/{mediaQualityMetrics → types/mediaQualityMetrics}/config.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}/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/{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/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
|
|
@@ -379,7 +380,7 @@ export const EVENT_TRIGGERS = {
|
|
|
379
380
|
MEETING_TRANSCRIPTION_CONNECTED: 'meeting:transcription:connected',
|
|
380
381
|
MEETING_STARTED_RECEIVING_TRANSCRIPTION: 'meeting:receiveTranscription:started',
|
|
381
382
|
MEETING_STOPPED_RECEIVING_TRANSCRIPTION: 'meeting:receiveTranscription:stopped',
|
|
382
|
-
|
|
383
|
+
MEETING_MANUAL_CAPTION_UPDATED: 'meeting:manualCaptionControl:updated',
|
|
383
384
|
MEETING_CAPTION_RECEIVED: 'meeting:caption-received',
|
|
384
385
|
};
|
|
385
386
|
|
|
@@ -534,6 +535,12 @@ export const ERROR_DICTIONARY = {
|
|
|
534
535
|
'Participant Having Host Role Already. Participant who sends request to reclaim host role has already a host role.',
|
|
535
536
|
CODE: 14,
|
|
536
537
|
},
|
|
538
|
+
RECONNECTION_NOT_STARTED: {
|
|
539
|
+
NAME: 'ReconnectionNotStartedError',
|
|
540
|
+
MESSAGE:
|
|
541
|
+
'Reconnection was not started, because there is one already in progress or reconnections are disabled in config.',
|
|
542
|
+
CODE: 15,
|
|
543
|
+
},
|
|
537
544
|
};
|
|
538
545
|
|
|
539
546
|
export const FLOOR_ACTION = {
|
|
@@ -670,6 +677,7 @@ export const LOCUSINFO = {
|
|
|
670
677
|
CONTROLS_MEETING_LAYOUT_UPDATED: 'CONTROLS_MEETING_LAYOUT_UPDATED',
|
|
671
678
|
CONTROLS_RECORDING_UPDATED: 'CONTROLS_RECORDING_UPDATED',
|
|
672
679
|
CONTROLS_MEETING_TRANSCRIBE_UPDATED: 'CONTROLS_MEETING_TRANSCRIBE_UPDATED',
|
|
680
|
+
CONTROLS_MEETING_MANUAL_CAPTION_UPDATED: 'CONTROLS_MEETING_MANUAL_CAPTION_UPDATED',
|
|
673
681
|
CONTROLS_MEETING_BREAKOUT_UPDATED: 'CONTROLS_MEETING_BREAKOUT_UPDATED',
|
|
674
682
|
CONTROLS_MEETING_CONTAINER_UPDATED: 'CONTROLS_MEETING_CONTAINER_UPDATED',
|
|
675
683
|
CONTROLS_MEETING_INTERPRETATION_UPDATED: 'CONTROLS_MEETING_INTERPRETATION_UPDATED',
|
|
@@ -908,6 +916,9 @@ export const DISPLAY_HINTS = {
|
|
|
908
916
|
LEAVE_END_MEETING: 'LEAVE_END_MEETING',
|
|
909
917
|
CAPTION_START: 'CAPTION_START',
|
|
910
918
|
CAPTION_STATUS_ACTIVE: 'CAPTION_STATUS_ACTIVE',
|
|
919
|
+
MANUAL_CAPTION_START: 'MANUAL_CAPTION_START',
|
|
920
|
+
MANUAL_CAPTION_STOP: 'MANUAL_CAPTION_STOP',
|
|
921
|
+
MANUAL_CAPTION_STATUS_ACTIVE: 'MANUAL_CAPTION_STATUS_ACTIVE',
|
|
911
922
|
DISPLAY_REAL_TIME_TRANSLATION: 'DISPLAY_REAL_TIME_TRANSLATION',
|
|
912
923
|
ENABLE_CAPTION_PANEL: 'ENABLE_CAPTION_PANEL',
|
|
913
924
|
DISPLAY_NON_ENGLISH_ASR: 'DISPLAY_NON_ENGLISH_ASR',
|
|
@@ -971,7 +982,7 @@ export const SELF_ROLES = {
|
|
|
971
982
|
COHOST: 'COHOST',
|
|
972
983
|
MODERATOR: 'MODERATOR',
|
|
973
984
|
ATTENDEE: 'ATTENDEE',
|
|
974
|
-
|
|
985
|
+
PANELIST: 'PANELIST',
|
|
975
986
|
};
|
|
976
987
|
|
|
977
988
|
export const MEETING_STATE = {
|
|
@@ -1042,9 +1053,7 @@ export const PEER_CONNECTION_STATE = {
|
|
|
1042
1053
|
export const RECONNECTION = {
|
|
1043
1054
|
STATE: {
|
|
1044
1055
|
IN_PROGRESS: 'IN_PROGRESS',
|
|
1045
|
-
COMPLETE: 'COMPLETE',
|
|
1046
1056
|
FAILURE: 'FAILURE',
|
|
1047
|
-
DEFAULT_TRY_COUNT: 0,
|
|
1048
1057
|
DEFAULT_STATUS: '',
|
|
1049
1058
|
},
|
|
1050
1059
|
} as const;
|
|
@@ -1318,3 +1327,6 @@ export type IP_VERSION = Enum<typeof IP_VERSION>;
|
|
|
1318
1327
|
// constant for if the permissionToken is about to expire in the next 30 seconds, refresh it
|
|
1319
1328
|
export const MEETING_PERMISSION_TOKEN_REFRESH_THRESHOLD_IN_SEC = 30;
|
|
1320
1329
|
export const MEETING_PERMISSION_TOKEN_REFRESH_REASON = 'ttl-join';
|
|
1330
|
+
|
|
1331
|
+
// constant for named media group type
|
|
1332
|
+
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}
|
|
@@ -43,6 +43,12 @@ ControlsUtils.parse = (controls: any) => {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
if (controls && controls.manualCaptionControl) {
|
|
47
|
+
parsedControls.manualCaptionControl = {
|
|
48
|
+
enabled: controls.manualCaptionControl.enabled,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
|
|
46
52
|
if (controls && controls.entryExitTone) {
|
|
47
53
|
parsedControls.entryExitTone = controls.entryExitTone.enabled
|
|
48
54
|
? controls.entryExitTone.mode
|
|
@@ -143,6 +149,11 @@ ControlsUtils.getControls = (oldControls: any, newControls: any) => {
|
|
|
143
149
|
!isEqual(previous?.transcribe?.transcribing, current?.transcribe?.transcribing) && // upon first join, previous?.record?.recording = undefined; thus, never going to be equal and will always return true
|
|
144
150
|
(previous?.transcribe?.transcribing || current?.transcribe?.transcribing), // therefore, condition added to prevent false firings of #meeting:recording:stopped upon first joining a meeting
|
|
145
151
|
|
|
152
|
+
hasManualCaptionChanged:
|
|
153
|
+
current?.manualCaptionControl &&
|
|
154
|
+
!isEqual(previous?.manualCaptionControl?.enabled, current?.manualCaptionControl?.enabled) &&
|
|
155
|
+
(previous?.manualCaptionControl?.enabled || current?.manualCaptionControl?.enabled),
|
|
156
|
+
|
|
146
157
|
hasEntryExitToneChanged: !!(
|
|
147
158
|
newControls.entryExitTone &&
|
|
148
159
|
!isEqual(previous?.entryExitTone, current?.entryExitTone) &&
|
package/src/locus-info/index.ts
CHANGED
|
@@ -792,6 +792,7 @@ export default class LocusInfo extends EventsScope {
|
|
|
792
792
|
hasRecordingPausedChanged,
|
|
793
793
|
hasMeetingContainerChanged,
|
|
794
794
|
hasTranscribeChanged,
|
|
795
|
+
hasManualCaptionChanged,
|
|
795
796
|
hasEntryExitToneChanged,
|
|
796
797
|
hasBreakoutChanged,
|
|
797
798
|
hasVideoEnabledChanged,
|
|
@@ -923,6 +924,21 @@ export default class LocusInfo extends EventsScope {
|
|
|
923
924
|
);
|
|
924
925
|
}
|
|
925
926
|
|
|
927
|
+
if (hasManualCaptionChanged) {
|
|
928
|
+
const {enabled} = current.manualCaptionControl;
|
|
929
|
+
|
|
930
|
+
this.emitScoped(
|
|
931
|
+
{
|
|
932
|
+
file: 'locus-info',
|
|
933
|
+
function: 'updateControls',
|
|
934
|
+
},
|
|
935
|
+
LOCUSINFO.EVENTS.CONTROLS_MEETING_MANUAL_CAPTION_UPDATED,
|
|
936
|
+
{
|
|
937
|
+
enabled,
|
|
938
|
+
}
|
|
939
|
+
);
|
|
940
|
+
}
|
|
941
|
+
|
|
926
942
|
if (hasBreakoutChanged) {
|
|
927
943
|
const {breakout} = current;
|
|
928
944
|
breakout.breakoutMoveId = SelfUtils.getReplacedBreakoutMoveId(
|
|
@@ -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,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/* eslint-disable class-methods-use-this */
|
|
3
2
|
import {
|
|
4
3
|
LocalCameraStream,
|
|
5
4
|
LocalMicrophoneStream,
|
|
@@ -8,8 +7,9 @@ import {
|
|
|
8
7
|
RemoteStream,
|
|
9
8
|
} from '@webex/media-helpers';
|
|
10
9
|
|
|
11
|
-
import {MEETINGS,
|
|
10
|
+
import {MEETINGS, QUALITY_LEVELS} from '../constants';
|
|
12
11
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
12
|
+
import MediaConnectionAwaiter from './MediaConnectionAwaiter';
|
|
13
13
|
|
|
14
14
|
export type MediaDirection = {
|
|
15
15
|
sendAudio: boolean;
|
|
@@ -175,57 +175,53 @@ export default class MediaProperties {
|
|
|
175
175
|
* @returns {Promise<void>}
|
|
176
176
|
*/
|
|
177
177
|
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);
|
|
178
|
+
const mediaConnectionAwaiter = new MediaConnectionAwaiter({
|
|
179
|
+
webrtcMediaConnection: this.webrtcMediaConnection,
|
|
206
180
|
});
|
|
181
|
+
|
|
182
|
+
return mediaConnectionAwaiter.waitForMediaConnectionConnected();
|
|
207
183
|
}
|
|
208
184
|
|
|
209
185
|
/**
|
|
210
|
-
* Returns
|
|
186
|
+
* Returns ICE transport information:
|
|
187
|
+
* - selectedCandidatePairChanges - number of times the selected candidate pair was changed, it should be at least 1 for successful connections
|
|
188
|
+
* it will be -1 if browser doesn't supply this information
|
|
189
|
+
* - numTransports - number of transports (should be 1 if we're using bundle)
|
|
211
190
|
*
|
|
212
|
-
* @
|
|
191
|
+
* @param {Array<any>} allStatsReports array of RTC stats reports
|
|
192
|
+
* @returns {Object}
|
|
213
193
|
*/
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
194
|
+
private getTransportInfo(allStatsReports: any[]): {
|
|
195
|
+
selectedCandidatePairChanges: number;
|
|
196
|
+
numTransports: number;
|
|
197
|
+
} {
|
|
198
|
+
const transports = allStatsReports.filter((report) => report.type === 'transport');
|
|
217
199
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
try {
|
|
221
|
-
const statsResult = await this.webrtcMediaConnection.getStats();
|
|
222
|
-
statsResult.forEach((report) => allStatsReports.push(report));
|
|
223
|
-
} catch (error) {
|
|
200
|
+
if (transports.length > 1) {
|
|
224
201
|
LoggerProxy.logger.warn(
|
|
225
|
-
`Media:properties#
|
|
202
|
+
`Media:properties#getSelectedCandidatePairChanges --> found more than 1 transport: ${transports.length}`
|
|
226
203
|
);
|
|
227
204
|
}
|
|
228
205
|
|
|
206
|
+
return {
|
|
207
|
+
selectedCandidatePairChanges:
|
|
208
|
+
transports.length > 0 && transports[0].selectedCandidatePairChanges !== undefined
|
|
209
|
+
? transports[0].selectedCandidatePairChanges
|
|
210
|
+
: -1,
|
|
211
|
+
numTransports: transports.length,
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Returns the type of a connection that has been established
|
|
217
|
+
* It should be 'UDP' | 'TCP' | 'TURN-TLS' | 'TURN-TCP' | 'TURN-UDP' | 'unknown'
|
|
218
|
+
*
|
|
219
|
+
* If connection was not established, it returns 'unknown'
|
|
220
|
+
*
|
|
221
|
+
* @param {Array<any>} allStatsReports array of RTC stats reports
|
|
222
|
+
* @returns {string}
|
|
223
|
+
*/
|
|
224
|
+
private getConnectionType(allStatsReports: any[]) {
|
|
229
225
|
const successfulCandidatePairs = allStatsReports.filter(
|
|
230
226
|
(report) => report.type === 'candidate-pair' && report.state?.toLowerCase() === 'succeeded'
|
|
231
227
|
);
|
|
@@ -240,7 +236,7 @@ export default class MediaProperties {
|
|
|
240
236
|
|
|
241
237
|
if (localCandidate === undefined) {
|
|
242
238
|
LoggerProxy.logger.warn(
|
|
243
|
-
`Media:properties#
|
|
239
|
+
`Media:properties#getConnectionType --> failed to find local candidate "${pair.localCandidateId}" in getStats() results`
|
|
244
240
|
);
|
|
245
241
|
|
|
246
242
|
return false;
|
|
@@ -260,7 +256,7 @@ export default class MediaProperties {
|
|
|
260
256
|
return true;
|
|
261
257
|
}
|
|
262
258
|
LoggerProxy.logger.warn(
|
|
263
|
-
`Media:properties#
|
|
259
|
+
`Media:properties#getConnectionType --> missing localCandidate.protocol, candidateType=${localCandidate.candidateType}`
|
|
264
260
|
);
|
|
265
261
|
|
|
266
262
|
return false;
|
|
@@ -272,7 +268,7 @@ export default class MediaProperties {
|
|
|
272
268
|
.map((report) => report.state);
|
|
273
269
|
|
|
274
270
|
LoggerProxy.logger.warn(
|
|
275
|
-
`Media:properties#
|
|
271
|
+
`Media:properties#getConnectionType --> all candidate pair states: ${JSON.stringify(
|
|
276
272
|
candidatePairStates
|
|
277
273
|
)}`
|
|
278
274
|
);
|
|
@@ -280,4 +276,35 @@ export default class MediaProperties {
|
|
|
280
276
|
|
|
281
277
|
return foundConnectionType;
|
|
282
278
|
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Returns information about current webrtc media connection
|
|
282
|
+
*
|
|
283
|
+
* @returns {Promise<Object>}
|
|
284
|
+
*/
|
|
285
|
+
async getCurrentConnectionInfo(): Promise<{
|
|
286
|
+
connectionType: string;
|
|
287
|
+
selectedCandidatePairChanges: number;
|
|
288
|
+
numTransports: number;
|
|
289
|
+
}> {
|
|
290
|
+
const allStatsReports = [];
|
|
291
|
+
|
|
292
|
+
try {
|
|
293
|
+
const statsResult = await this.webrtcMediaConnection.getStats();
|
|
294
|
+
statsResult.forEach((report) => allStatsReports.push(report));
|
|
295
|
+
} catch (error) {
|
|
296
|
+
LoggerProxy.logger.warn(
|
|
297
|
+
`Media:properties#getCurrentConnectionInfo --> getStats() failed: ${error}`
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
const connectionType = this.getConnectionType(allStatsReports);
|
|
302
|
+
const {selectedCandidatePairChanges, numTransports} = this.getTransportInfo(allStatsReports);
|
|
303
|
+
|
|
304
|
+
return {
|
|
305
|
+
connectionType,
|
|
306
|
+
selectedCandidatePairChanges,
|
|
307
|
+
numTransports,
|
|
308
|
+
};
|
|
309
|
+
}
|
|
283
310
|
}
|
|
@@ -34,6 +34,9 @@ interface IInMeetingActions {
|
|
|
34
34
|
canStartTranscribing?: boolean;
|
|
35
35
|
canStopTranscribing?: boolean;
|
|
36
36
|
isClosedCaptionActive?: boolean;
|
|
37
|
+
canStartManualCaption?: boolean;
|
|
38
|
+
canStopManualCaption?: boolean;
|
|
39
|
+
isManualCaptionActive?: boolean;
|
|
37
40
|
isSaveTranscriptsEnabled?: boolean;
|
|
38
41
|
isWebexAssistantActive?: boolean;
|
|
39
42
|
canViewCaptionPanel?: boolean;
|
|
@@ -137,6 +140,12 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
|
137
140
|
|
|
138
141
|
isClosedCaptionActive = null;
|
|
139
142
|
|
|
143
|
+
canStartManualCaption = null;
|
|
144
|
+
|
|
145
|
+
canStopManualCaption = null;
|
|
146
|
+
|
|
147
|
+
isManualCaptionActive = null;
|
|
148
|
+
|
|
140
149
|
isSaveTranscriptsEnabled = null;
|
|
141
150
|
|
|
142
151
|
isWebexAssistantActive = null;
|
|
@@ -257,6 +266,9 @@ export default class InMeetingActions implements IInMeetingActions {
|
|
|
257
266
|
canStartTranscribing: this.canStartTranscribing,
|
|
258
267
|
canStopTranscribing: this.canStopTranscribing,
|
|
259
268
|
isClosedCaptionActive: this.isClosedCaptionActive,
|
|
269
|
+
canStartManualCaption: this.canStartManualCaption,
|
|
270
|
+
canStopManualCaption: this.canStopManualCaption,
|
|
271
|
+
isManualCaptionActive: this.isManualCaptionActive,
|
|
260
272
|
isSaveTranscriptsEnabled: this.isSaveTranscriptsEnabled,
|
|
261
273
|
isWebexAssistantActive: this.isWebexAssistantActive,
|
|
262
274
|
canViewCaptionPanel: this.canViewCaptionPanel,
|