@webex/plugin-meetings 3.0.0-beta.182 → 3.0.0-beta.183
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/interpretation/index.js +16 -2
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +1 -2
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/util.js +49 -0
- package/dist/meeting/util.js.map +1 -1
- package/dist/member/util.js +3 -2
- package/dist/member/util.js.map +1 -1
- package/dist/types/meeting/util.d.ts +1 -0
- package/package.json +19 -19
- package/src/interpretation/index.ts +15 -1
- package/src/meeting/index.ts +1 -3
- package/src/meeting/util.ts +43 -0
- package/src/member/util.ts +2 -2
- package/test/unit/spec/interpretation/index.ts +19 -0
- package/test/unit/spec/meeting/index.js +13 -11
- package/test/unit/spec/meeting/utils.js +62 -0
- package/test/unit/spec/meetings/index.js +1 -1
package/dist/meeting/util.js
CHANGED
|
@@ -6,6 +6,10 @@ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs2/core-js/o
|
|
|
6
6
|
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs2/core-js/object/get-own-property-descriptors");
|
|
7
7
|
var _Object$defineProperties = require("@babel/runtime-corejs2/core-js/object/define-properties");
|
|
8
8
|
var _Object$defineProperty = require("@babel/runtime-corejs2/core-js/object/define-property");
|
|
9
|
+
var _Array$from = require("@babel/runtime-corejs2/core-js/array/from");
|
|
10
|
+
var _Symbol = require("@babel/runtime-corejs2/core-js/symbol");
|
|
11
|
+
var _Symbol$iterator = require("@babel/runtime-corejs2/core-js/symbol/iterator");
|
|
12
|
+
var _Array$isArray = require("@babel/runtime-corejs2/core-js/array/is-array");
|
|
9
13
|
var _interopRequireDefault = require("@babel/runtime-corejs2/helpers/interopRequireDefault");
|
|
10
14
|
_Object$defineProperty(exports, "__esModule", {
|
|
11
15
|
value: true
|
|
@@ -25,6 +29,11 @@ var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
|
|
|
25
29
|
var _permission = _interopRequireDefault(require("../common/errors/permission"));
|
|
26
30
|
var _passwordError = _interopRequireDefault(require("../common/errors/password-error"));
|
|
27
31
|
var _captchaError = _interopRequireDefault(require("../common/errors/captcha-error"));
|
|
32
|
+
var _triggerProxy = _interopRequireDefault(require("../common/events/trigger-proxy"));
|
|
33
|
+
var _this = void 0;
|
|
34
|
+
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof _Symbol !== "undefined" && o[_Symbol$iterator] || o["@@iterator"]; if (!it) { if (_Array$isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
35
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return _Array$from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
36
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
28
37
|
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
29
38
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
30
39
|
var MeetingUtil = {
|
|
@@ -524,6 +533,46 @@ var MeetingUtil = {
|
|
|
524
533
|
return true;
|
|
525
534
|
}
|
|
526
535
|
return userPolicies[feature];
|
|
536
|
+
},
|
|
537
|
+
parseInterpretationInfo: function parseInterpretationInfo(meeting, meetingInfo) {
|
|
538
|
+
var _meetingInfo$meetingS;
|
|
539
|
+
if (!meeting || !meetingInfo) {
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
var siInfo = meetingInfo.simultaneousInterpretation;
|
|
543
|
+
meeting.simultaneousInterpretation.updateMeetingSIEnabled(!!meetingInfo.turnOnSimultaneousInterpretation, !!(siInfo !== null && siInfo !== void 0 && siInfo.currentSIInterpreter));
|
|
544
|
+
var hostSIEnabled = !!(meetingInfo.turnOnSimultaneousInterpretation && meetingInfo !== null && meetingInfo !== void 0 && (_meetingInfo$meetingS = meetingInfo.meetingSiteSetting) !== null && _meetingInfo$meetingS !== void 0 && _meetingInfo$meetingS.enableHostInterpreterControlSI);
|
|
545
|
+
meeting.simultaneousInterpretation.updateHostSIEnabled(hostSIEnabled);
|
|
546
|
+
function renameKey(obj, oldKey, newKey) {
|
|
547
|
+
if (oldKey in obj) {
|
|
548
|
+
obj[newKey] = obj[oldKey];
|
|
549
|
+
delete obj[oldKey];
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
if (siInfo) {
|
|
553
|
+
var _meeting$simultaneous, _meeting$simultaneous2;
|
|
554
|
+
var lanuagesInfo = (0, _cloneDeep2.default)(siInfo.siLanguages);
|
|
555
|
+
var _iterator = _createForOfIteratorHelper(lanuagesInfo),
|
|
556
|
+
_step;
|
|
557
|
+
try {
|
|
558
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
|
559
|
+
var language = _step.value;
|
|
560
|
+
renameKey(language, 'languageCode', 'languageName');
|
|
561
|
+
renameKey(language, 'languageGroupId', 'languageCode');
|
|
562
|
+
}
|
|
563
|
+
} catch (err) {
|
|
564
|
+
_iterator.e(err);
|
|
565
|
+
} finally {
|
|
566
|
+
_iterator.f();
|
|
567
|
+
}
|
|
568
|
+
if (!((_meeting$simultaneous = meeting.simultaneousInterpretation) !== null && _meeting$simultaneous !== void 0 && (_meeting$simultaneous2 = _meeting$simultaneous.siLanguages) !== null && _meeting$simultaneous2 !== void 0 && _meeting$simultaneous2.length)) {
|
|
569
|
+
meeting.simultaneousInterpretation.updateInterpretation(lanuagesInfo);
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
_triggerProxy.default.trigger(_this, {
|
|
573
|
+
file: 'meeting/util',
|
|
574
|
+
function: 'parseInterpretationInfo'
|
|
575
|
+
}, _constants.EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE);
|
|
527
576
|
}
|
|
528
577
|
};
|
|
529
578
|
var _default = MeetingUtil;
|
package/dist/meeting/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MeetingUtil","parseLocusJoin","response","parsed","locus","body","mediaConnections","locusUrl","url","locusId","split","pop","selfId","self","id","forEach","mediaConnection","mediaId","remoteUpdateAudioVideo","meeting","audioMuted","videoMuted","webex","getWebexObject","reject","ParameterError","locusMediaRequest","internal","newMetrics","submitClientEvent","name","options","meetingId","send","type","selfUrl","sequence","locusInfo","muteOptions","then","hasOwner","info","owner","isOwnerSelf","isPinOrGuest","err","errorCode","INTENT_TO_JOIN","includes","joinMeeting","meetingRequest","inviteeAddress","meetingJoinUrl","sipUri","meetingNumber","deviceUrl","correlationId","roapMessage","permissionToken","resourceId","moderator","pin","moveToResource","preferTranscoding","isMultistream","asResourceOccupant","breakoutsSupported","locale","deviceCapabilities","liveAnnotationSupported","res","payload","trigger","identifiers","trackingId","headers","trackingid","cleanUp","breakouts","simultaneousInterpretation","stopStatsAnalyzer","statsAnalyzer","stopAnalyzer","resolve","closeRemoteTracks","closePeerConnections","cleanupLocalTracks","unsetRemoteTracks","unsetPeerConnections","reconnectionManager","stopKeepAlive","updateLLMConnection","disconnectPhoneAudio","phoneUrl","meetingState","FULL_STATE","INACTIVE","MeetingNotActiveError","catch","LoggerProxy","logger","error","leaveMeeting","isUserInLeftState","UserNotJoinedError","defaultOptions","leaveOptions","moveMeeting","declineMeeting","reason","parsedLocus","state","_LEFT_","isUserInIdleState","_IDLE_","isUserInJoinedState","_JOINED_","isMediaEstablished","currentMediaStatus","audio","video","share","joinMeetingOptions","requiredCaptcha","CaptchaError","passwordStatus","PASSWORD_STATUS","REQUIRED","PasswordError","setLocus","IntentToJoinError","JoinMeetingError","getTrack","stream","audioTrack","videoTrack","audioTracks","videoTracks","getAudioTracks","getVideoTracks","length","getModeratorFromLocusInfo","getPolicyFromLocusInfo","policy","getUserDisplayHintsFromLocusInfo","userDisplayHints","canInviteNewParticipants","displayHints","DISPLAY_HINTS","ADD_GUEST","canAdmitParticipant","ROSTER_WAITING_TO_JOIN","canUserLock","LOCK_CONTROL_LOCK","LOCK_STATUS_UNLOCKED","canUserUnlock","LOCK_CONTROL_UNLOCK","LOCK_STATUS_LOCKED","canUserRaiseHand","RAISE_HAND","canUserLowerAllHands","LOWER_ALL_HANDS","canUserLowerSomeoneElsesHand","LOWER_SOMEONE_ELSES_HAND","bothLeaveAndEndMeetingAvailable","LEAVE_TRANSFER_HOST_END_MEETING","LEAVE_END_MEETING","canManageBreakout","BREAKOUT_MANAGEMENT","canBroadcastMessageToBreakout","BROADCAST_MESSAGE_TO_BREAKOUT","isSuppressBreakoutSupport","UCF_SUPPRESS_BREAKOUTS_SUPPORT","canAdmitLobbyToBreakout","DISABLE_LOBBY_TO_BREAKOUT","isBreakoutPreassignmentsEnabled","DISABLE_BREAKOUT_PREASSIGNMENTS","canUserAskForHelp","DISABLE_ASK_FOR_HELP","lockMeeting","actions","request","canLock","lock","PermissionError","unlockMeeting","canUnlock","handleAudioLogging","LOG_HEADER","settings","underlyingTrack","getSettings","deviceId","log","handleVideoLogging","handleDeviceLogging","devices","device","endMeetingForAll","endOptions","canEnableClosedCaption","CAPTION_START","isSaveTranscriptsEnabled","SAVE_TRANSCRIPTS_ENABLED","canStartTranscribing","TRANSCRIPTION_CONTROL_START","canStopTranscribing","TRANSCRIPTION_CONTROL_STOP","isClosedCaptionActive","CAPTION_STATUS_ACTIVE","isWebexAssistantActive","WEBEX_ASSISTANT_STATUS_ACTIVE","canViewCaptionPanel","ENABLE_CAPTION_PANEL","isRealTimeTranslationEnabled","DISPLAY_REAL_TIME_TRANSLATION","canSelectSpokenLanguages","DISPLAY_NON_ENGLISH_ASR","waitingForOthersToJoin","WAITING_FOR_OTHERS","canSendReactions","originalValue","REACTIONS_ACTIVE","REACTIONS_INACTIVE","canUserRenameSelfAndObserved","CAN_RENAME_SELF_AND_OBSERVED","canUserRenameOthers","CAN_RENAME_OTHERS","addSequence","requestBody","updateLocusWithDelta","onDeltaLocus","generateLocusDeltaRequest","originalMeeting","meetingRef","WeakRef","locusDeltaRequest","originalOptions","deref","selfSupportsFeature","feature","userPolicies"],"sources":["util.ts"],"sourcesContent":["import {LocalCameraTrack, LocalMicrophoneTrack} from '@webex/media-helpers';\nimport {cloneDeep} from 'lodash';\nimport {MeetingNotActiveError, UserNotJoinedError} from '../common/errors/webex-errors';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n INTENT_TO_JOIN,\n _LEFT_,\n _IDLE_,\n _JOINED_,\n PASSWORD_STATUS,\n DISPLAY_HINTS,\n FULL_STATE,\n SELF_POLICY,\n} from '../constants';\nimport IntentToJoinError from '../common/errors/intent-to-join';\nimport JoinMeetingError from '../common/errors/join-meeting';\nimport ParameterError from '../common/errors/parameter';\nimport PermissionError from '../common/errors/permission';\nimport PasswordError from '../common/errors/password-error';\nimport CaptchaError from '../common/errors/captcha-error';\n\nconst MeetingUtil = {\n parseLocusJoin: (response) => {\n const parsed: any = {};\n\n // First todo: add check for existance\n parsed.locus = response.body.locus;\n parsed.mediaConnections = response.body.mediaConnections;\n parsed.locusUrl = parsed.locus.url;\n parsed.locusId = parsed.locus.url.split('/').pop();\n parsed.selfId = parsed.locus.self.id;\n\n // we need mediaId before making roap calls\n parsed.mediaConnections.forEach((mediaConnection) => {\n if (mediaConnection.mediaId) {\n parsed.mediaId = mediaConnection.mediaId;\n }\n });\n\n return parsed;\n },\n\n remoteUpdateAudioVideo: (meeting, audioMuted?: boolean, videoMuted?: boolean) => {\n const webex = meeting.getWebexObject();\n if (!meeting) {\n return Promise.reject(new ParameterError('You need a meeting object.'));\n }\n\n if (!meeting.locusMediaRequest) {\n return Promise.reject(\n new ParameterError(\n 'You need a meeting with a media connection, call Meeting.addMedia() first.'\n )\n );\n }\n\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.locus.media.request',\n options: {meetingId: meeting.id},\n });\n\n return meeting.locusMediaRequest\n .send({\n type: 'LocalMute',\n selfUrl: meeting.selfUrl,\n mediaId: meeting.mediaId,\n sequence: meeting.locusInfo.sequence,\n muteOptions: {\n audioMuted,\n videoMuted,\n },\n })\n .then((response) => {\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.locus.media.response',\n options: {meetingId: meeting.id},\n });\n\n return response?.body?.locus;\n });\n },\n\n hasOwner: (info) => info && info.owner,\n\n isOwnerSelf: (owner, selfId) => owner === selfId,\n\n isPinOrGuest: (err) => err?.body?.errorCode && INTENT_TO_JOIN.includes(err.body.errorCode),\n\n joinMeeting: (meeting, options) => {\n if (!meeting) {\n return Promise.reject(new ParameterError('You need a meeting object.'));\n }\n const webex = meeting.getWebexObject();\n\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.locus.join.request',\n options: {meetingId: meeting.id},\n });\n\n // eslint-disable-next-line no-warning-comments\n // TODO: check if the meeting is in JOINING state\n // if Joining state termintate the request as user might click multiple times\n return meeting.meetingRequest\n .joinMeeting({\n inviteeAddress: meeting.meetingJoinUrl || meeting.sipUri,\n meetingNumber: meeting.meetingNumber,\n deviceUrl: meeting.deviceUrl,\n locusUrl: meeting.locusUrl,\n correlationId: meeting.correlationId,\n roapMessage: options.roapMessage,\n permissionToken: meeting.permissionToken,\n resourceId: options.resourceId || null,\n moderator: options.moderator,\n pin: options.pin,\n moveToResource: options.moveToResource,\n preferTranscoding: !meeting.isMultistream,\n asResourceOccupant: options.asResourceOccupant,\n breakoutsSupported: options.breakoutsSupported,\n locale: options.locale,\n deviceCapabilities: options.deviceCapabilities,\n liveAnnotationSupported: options.liveAnnotationSupported,\n })\n .then((res) => {\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.locus.join.response',\n payload: {\n trigger: 'loci-update',\n identifiers: {\n trackingId: res.headers.trackingid,\n },\n },\n options: {\n meetingId: meeting.id,\n mediaConnections: res.body.mediaConnections,\n },\n });\n\n return MeetingUtil.parseLocusJoin(res);\n });\n },\n\n cleanUp: (meeting) => {\n meeting.breakouts.cleanUp();\n meeting.simultaneousInterpretation.cleanUp();\n\n // make sure we send last metrics before we close the peerconnection\n const stopStatsAnalyzer = meeting.statsAnalyzer\n ? meeting.statsAnalyzer.stopAnalyzer()\n : Promise.resolve();\n\n return stopStatsAnalyzer\n .then(() => meeting.closeRemoteTracks())\n .then(() => meeting.closePeerConnections())\n .then(() => {\n meeting.cleanupLocalTracks();\n meeting.unsetRemoteTracks();\n meeting.unsetPeerConnections();\n meeting.reconnectionManager.cleanUp();\n })\n .then(() => meeting.stopKeepAlive())\n .then(() => meeting.updateLLMConnection());\n },\n\n disconnectPhoneAudio: (meeting, phoneUrl) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n return Promise.reject(new MeetingNotActiveError());\n }\n\n const options = {\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n correlationId: meeting.correlationId,\n phoneUrl,\n };\n\n return meeting.meetingRequest.disconnectPhoneAudio(options).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n },\n\n // by default will leave on meeting's resourceId\n // if you explicity want it not to leave on resource id, pass\n // {resourceId: null}\n // TODO: chris, you can modify this however you want\n leaveMeeting: (meeting, options: any = {}) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n // TODO: clean up if the meeting is already inactive\n return Promise.reject(new MeetingNotActiveError());\n }\n\n if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {\n return Promise.reject(new UserNotJoinedError());\n }\n\n const defaultOptions = {\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n correlationId: meeting.correlationId,\n resourceId: meeting.resourceId,\n deviceUrl: meeting.deviceUrl,\n };\n\n const leaveOptions = {...defaultOptions, ...options};\n\n return meeting.meetingRequest\n .leaveMeeting(leaveOptions)\n .then(() => {\n if (options.moveMeeting) {\n return Promise.resolve();\n }\n\n return MeetingUtil.cleanUp(meeting);\n })\n .catch((err) => {\n // TODO: If the meeting state comes as LEFT or INACTIVE as response then\n // 1) on leave clean up the meeting or simply do a sync on the meeting\n // 2) If the error says meeting is inactive then destroy the meeting object\n LoggerProxy.logger.error(\n `Meeting:util#leaveMeeting --> An error occured while trying to leave meeting with an id of ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n },\n declineMeeting: (meeting, reason) =>\n meeting.meetingRequest.declineMeeting({\n locusUrl: meeting.locusUrl,\n deviceUrl: meeting.deviceUrl,\n reason,\n }),\n\n isUserInLeftState: (locusInfo) => locusInfo.parsedLocus?.self?.state === _LEFT_,\n\n isUserInIdleState: (locusInfo) => locusInfo.parsedLocus?.self?.state === _IDLE_,\n\n isUserInJoinedState: (locusInfo) => locusInfo.parsedLocus?.self?.state === _JOINED_,\n\n isMediaEstablished: (currentMediaStatus) =>\n currentMediaStatus &&\n (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share),\n\n joinMeetingOptions: (meeting, options: any = {}) => {\n const webex = meeting.getWebexObject();\n\n meeting.resourceId = meeting.resourceId || options.resourceId;\n\n if (meeting.requiredCaptcha) {\n return Promise.reject(new CaptchaError());\n }\n if (meeting.passwordStatus === PASSWORD_STATUS.REQUIRED) {\n return Promise.reject(new PasswordError());\n }\n\n if (options.pin) {\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.pin.collected',\n options: {\n meetingId: meeting.id,\n },\n });\n }\n\n // normal join meeting, scenario A, D\n return MeetingUtil.joinMeeting(meeting, options)\n .then((response) => {\n meeting.setLocus(response);\n\n return Promise.resolve(response);\n })\n .catch((err) => {\n // joining a claimed PMR that is not my own, scenario B\n if (MeetingUtil.isPinOrGuest(err)) {\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.pin.prompt',\n options: {\n meetingId: meeting.id,\n },\n });\n\n // request host pin or non host for unclaimed PMR, start of Scenario C\n // see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature\n return Promise.reject(new IntentToJoinError('Error Joining Meeting', err));\n }\n LoggerProxy.logger.error(\n 'Meeting:util#joinMeetingOptions --> Error joining the call, ',\n err\n );\n\n return Promise.reject(new JoinMeetingError(options, 'Error Joining Meeting', err));\n });\n },\n\n getTrack: (stream) => {\n let audioTrack = null;\n let videoTrack = null;\n let audioTracks = null;\n let videoTracks = null;\n\n if (!stream) {\n return {audioTrack: null, videoTrack: null};\n }\n if (stream.getAudioTracks) {\n audioTracks = stream.getAudioTracks();\n }\n if (stream.getVideoTracks) {\n videoTracks = stream.getVideoTracks();\n }\n\n if (audioTracks && audioTracks.length > 0) {\n [audioTrack] = audioTracks;\n }\n\n if (videoTracks && videoTracks.length > 0) {\n [videoTrack] = videoTracks;\n }\n\n return {audioTrack, videoTrack};\n },\n\n getModeratorFromLocusInfo: (locusInfo) =>\n locusInfo &&\n locusInfo.parsedLocus &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info.moderator,\n\n getPolicyFromLocusInfo: (locusInfo) =>\n locusInfo &&\n locusInfo.parsedLocus &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info.policy,\n\n getUserDisplayHintsFromLocusInfo: (locusInfo) =>\n locusInfo?.parsedLocus?.info?.userDisplayHints || [],\n\n canInviteNewParticipants: (displayHints) => displayHints.includes(DISPLAY_HINTS.ADD_GUEST),\n\n canAdmitParticipant: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN),\n\n canUserLock: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_LOCK) &&\n displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_UNLOCKED),\n\n canUserUnlock: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) &&\n displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_LOCKED),\n\n canUserRaiseHand: (displayHints) => displayHints.includes(DISPLAY_HINTS.RAISE_HAND),\n\n canUserLowerAllHands: (displayHints) => displayHints.includes(DISPLAY_HINTS.LOWER_ALL_HANDS),\n\n canUserLowerSomeoneElsesHand: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND),\n\n bothLeaveAndEndMeetingAvailable: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) ||\n displayHints.includes(DISPLAY_HINTS.LEAVE_END_MEETING),\n\n canManageBreakout: (displayHints) => displayHints.includes(DISPLAY_HINTS.BREAKOUT_MANAGEMENT),\n canBroadcastMessageToBreakout: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.BROADCAST_MESSAGE_TO_BREAKOUT),\n\n isSuppressBreakoutSupport: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.UCF_SUPPRESS_BREAKOUTS_SUPPORT),\n\n canAdmitLobbyToBreakout: (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_LOBBY_TO_BREAKOUT),\n\n isBreakoutPreassignmentsEnabled: (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_BREAKOUT_PREASSIGNMENTS),\n\n canUserAskForHelp: (displayHints) => !displayHints.includes(DISPLAY_HINTS.DISABLE_ASK_FOR_HELP),\n\n lockMeeting: (actions, request, locusUrl) => {\n if (actions && actions.canLock) {\n return request.lockMeeting({locusUrl, lock: true});\n }\n\n return Promise.reject(new PermissionError('Lock not allowed, due to joined property.'));\n },\n\n unlockMeeting: (actions, request, locusUrl) => {\n if (actions && actions.canUnlock) {\n return request.lockMeeting({locusUrl, lock: false});\n }\n\n return Promise.reject(new PermissionError('Unlock not allowed, due to joined property.'));\n },\n\n handleAudioLogging: (audioTrack?: LocalMicrophoneTrack) => {\n const LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';\n\n if (audioTrack) {\n const settings = audioTrack.underlyingTrack.getSettings();\n const {deviceId} = settings;\n\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));\n }\n },\n\n handleVideoLogging: (videoTrack?: LocalCameraTrack) => {\n const LOG_HEADER = 'MeetingUtil#handleVideoLogging -->';\n\n if (videoTrack) {\n const settings = videoTrack.underlyingTrack.getSettings();\n const {deviceId} = settings;\n\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));\n }\n },\n\n handleDeviceLogging: (devices = []) => {\n const LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';\n\n devices.forEach((device) => {\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${device.deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings', JSON.stringify(device));\n });\n },\n\n endMeetingForAll: (meeting) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n return Promise.reject(new MeetingNotActiveError());\n }\n\n const endOptions = {\n locusUrl: meeting.locusUrl,\n };\n\n return meeting.meetingRequest\n .endMeetingForAll(endOptions)\n .then(() => MeetingUtil.cleanUp(meeting))\n .catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:util#endMeetingForAll An error occured while trying to end meeting for all with an id of ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n },\n\n canEnableClosedCaption: (displayHints) => displayHints.includes(DISPLAY_HINTS.CAPTION_START),\n\n isSaveTranscriptsEnabled: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.SAVE_TRANSCRIPTS_ENABLED),\n\n canStartTranscribing: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START),\n\n canStopTranscribing: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP),\n\n isClosedCaptionActive: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAPTION_STATUS_ACTIVE),\n\n isWebexAssistantActive: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE),\n\n canViewCaptionPanel: (displayHints) => displayHints.includes(DISPLAY_HINTS.ENABLE_CAPTION_PANEL),\n\n isRealTimeTranslationEnabled: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION),\n\n canSelectSpokenLanguages: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR),\n\n waitingForOthersToJoin: (displayHints) => displayHints.includes(DISPLAY_HINTS.WAITING_FOR_OTHERS),\n\n canSendReactions: (originalValue, displayHints) => {\n if (displayHints.includes(DISPLAY_HINTS.REACTIONS_ACTIVE)) {\n return true;\n }\n if (displayHints.includes(DISPLAY_HINTS.REACTIONS_INACTIVE)) {\n return false;\n }\n\n return originalValue;\n },\n canUserRenameSelfAndObserved: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAN_RENAME_SELF_AND_OBSERVED),\n\n canUserRenameOthers: (displayHints) => displayHints.includes(DISPLAY_HINTS.CAN_RENAME_OTHERS),\n\n /**\n * Adds the current locus sequence information to a request body\n * @param {Object} meeting The meeting object\n * @param {Object} requestBody The body of a request to locus\n * @returns {void}\n */\n addSequence: (meeting, requestBody) => {\n const sequence = meeting?.locusInfo?.sequence;\n\n if (!sequence) {\n return;\n }\n\n requestBody.sequence = sequence;\n },\n\n /**\n * Updates the locus info for the meeting with the delta locus\n * returned from requests that include the sequence information\n * Returns the original response object\n * @param {Object} meeting The meeting object\n * @param {Object} response The response of the http request\n * @returns {Object}\n */\n updateLocusWithDelta: (meeting, response) => {\n if (!meeting) {\n return response;\n }\n\n const locus = response?.body?.locus;\n\n if (locus) {\n meeting.locusInfo.onDeltaLocus(locus);\n }\n\n return response;\n },\n\n generateLocusDeltaRequest: (originalMeeting) => {\n const meetingRef = new WeakRef(originalMeeting);\n\n const locusDeltaRequest = (originalOptions) => {\n const meeting = meetingRef.deref();\n\n if (!meeting) {\n return Promise.resolve();\n }\n\n const options = cloneDeep(originalOptions);\n\n if (!options.body) {\n options.body = {};\n }\n\n MeetingUtil.addSequence(meeting, options.body);\n\n return meeting\n .request(options)\n .then((response) => MeetingUtil.updateLocusWithDelta(meeting, response));\n };\n\n return locusDeltaRequest;\n },\n\n selfSupportsFeature: (feature: SELF_POLICY, userPolicies: Record<SELF_POLICY, boolean>) => {\n if (!userPolicies) {\n return true;\n }\n\n return userPolicies[feature];\n },\n};\n\nexport default MeetingUtil;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AAUA;AACA;AACA;AACA;AACA;AACA;AAA0D;AAAA;AAE1D,IAAMA,WAAW,GAAG;EAClBC,cAAc,EAAE,wBAACC,QAAQ,EAAK;IAC5B,IAAMC,MAAW,GAAG,CAAC,CAAC;;IAEtB;IACAA,MAAM,CAACC,KAAK,GAAGF,QAAQ,CAACG,IAAI,CAACD,KAAK;IAClCD,MAAM,CAACG,gBAAgB,GAAGJ,QAAQ,CAACG,IAAI,CAACC,gBAAgB;IACxDH,MAAM,CAACI,QAAQ,GAAGJ,MAAM,CAACC,KAAK,CAACI,GAAG;IAClCL,MAAM,CAACM,OAAO,GAAGN,MAAM,CAACC,KAAK,CAACI,GAAG,CAACE,KAAK,CAAC,GAAG,CAAC,CAACC,GAAG,EAAE;IAClDR,MAAM,CAACS,MAAM,GAAGT,MAAM,CAACC,KAAK,CAACS,IAAI,CAACC,EAAE;;IAEpC;IACAX,MAAM,CAACG,gBAAgB,CAACS,OAAO,CAAC,UAACC,eAAe,EAAK;MACnD,IAAIA,eAAe,CAACC,OAAO,EAAE;QAC3Bd,MAAM,CAACc,OAAO,GAAGD,eAAe,CAACC,OAAO;MAC1C;IACF,CAAC,CAAC;IAEF,OAAOd,MAAM;EACf,CAAC;EAEDe,sBAAsB,EAAE,gCAACC,OAAO,EAAEC,UAAoB,EAAEC,UAAoB,EAAK;IAC/E,IAAMC,KAAK,GAAGH,OAAO,CAACI,cAAc,EAAE;IACtC,IAAI,CAACJ,OAAO,EAAE;MACZ,OAAO,iBAAQK,MAAM,CAAC,IAAIC,kBAAc,CAAC,4BAA4B,CAAC,CAAC;IACzE;IAEA,IAAI,CAACN,OAAO,CAACO,iBAAiB,EAAE;MAC9B,OAAO,iBAAQF,MAAM,CACnB,IAAIC,kBAAc,CAChB,4EAA4E,CAC7E,CACF;IACH;;IAEA;IACAH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QACZ,OAAO,iBAAQgE,OAAO,EAAE;MAC1B;MAEA,IAAMpD,OAAO,GAAG,yBAAU8M,eAAe,CAAC;MAE1C,IAAI,CAAC9M,OAAO,CAAC1B,IAAI,EAAE;QACjB0B,OAAO,CAAC1B,IAAI,GAAG,CAAC,CAAC;MACnB;MAEAL,WAAW,CAACoO,WAAW,CAACjN,OAAO,EAAEY,OAAO,CAAC1B,IAAI,CAAC;MAE9C,OAAOc,OAAO,CACXkK,OAAO,CAACtJ,OAAO,CAAC,CAChBQ,IAAI,CAAC,UAACrC,QAAQ;QAAA,OAAKF,WAAW,CAACsO,oBAAoB,CAACnN,OAAO,EAAEjB,QAAQ,CAAC;MAAA,EAAC;IAC5E,CAAC;IAED,OAAO0O,iBAAiB;EAC1B,CAAC;EAEDG,mBAAmB,EAAE,6BAACC,OAAoB,EAAEC,YAA0C,EAAK;IACzF,IAAI,CAACA,YAAY,EAAE;MACjB,OAAO,IAAI;IACb;IAEA,OAAOA,YAAY,CAACD,OAAO,CAAC;EAC9B;AACF,CAAC;AAAC,eAEahP,WAAW;AAAA"}
|
|
1
|
+
{"version":3,"names":["MeetingUtil","parseLocusJoin","response","parsed","locus","body","mediaConnections","locusUrl","url","locusId","split","pop","selfId","self","id","forEach","mediaConnection","mediaId","remoteUpdateAudioVideo","meeting","audioMuted","videoMuted","webex","getWebexObject","reject","ParameterError","locusMediaRequest","internal","newMetrics","submitClientEvent","name","options","meetingId","send","type","selfUrl","sequence","locusInfo","muteOptions","then","hasOwner","info","owner","isOwnerSelf","isPinOrGuest","err","errorCode","INTENT_TO_JOIN","includes","joinMeeting","meetingRequest","inviteeAddress","meetingJoinUrl","sipUri","meetingNumber","deviceUrl","correlationId","roapMessage","permissionToken","resourceId","moderator","pin","moveToResource","preferTranscoding","isMultistream","asResourceOccupant","breakoutsSupported","locale","deviceCapabilities","liveAnnotationSupported","res","payload","trigger","identifiers","trackingId","headers","trackingid","cleanUp","breakouts","simultaneousInterpretation","stopStatsAnalyzer","statsAnalyzer","stopAnalyzer","resolve","closeRemoteTracks","closePeerConnections","cleanupLocalTracks","unsetRemoteTracks","unsetPeerConnections","reconnectionManager","stopKeepAlive","updateLLMConnection","disconnectPhoneAudio","phoneUrl","meetingState","FULL_STATE","INACTIVE","MeetingNotActiveError","catch","LoggerProxy","logger","error","leaveMeeting","isUserInLeftState","UserNotJoinedError","defaultOptions","leaveOptions","moveMeeting","declineMeeting","reason","parsedLocus","state","_LEFT_","isUserInIdleState","_IDLE_","isUserInJoinedState","_JOINED_","isMediaEstablished","currentMediaStatus","audio","video","share","joinMeetingOptions","requiredCaptcha","CaptchaError","passwordStatus","PASSWORD_STATUS","REQUIRED","PasswordError","setLocus","IntentToJoinError","JoinMeetingError","getTrack","stream","audioTrack","videoTrack","audioTracks","videoTracks","getAudioTracks","getVideoTracks","length","getModeratorFromLocusInfo","getPolicyFromLocusInfo","policy","getUserDisplayHintsFromLocusInfo","userDisplayHints","canInviteNewParticipants","displayHints","DISPLAY_HINTS","ADD_GUEST","canAdmitParticipant","ROSTER_WAITING_TO_JOIN","canUserLock","LOCK_CONTROL_LOCK","LOCK_STATUS_UNLOCKED","canUserUnlock","LOCK_CONTROL_UNLOCK","LOCK_STATUS_LOCKED","canUserRaiseHand","RAISE_HAND","canUserLowerAllHands","LOWER_ALL_HANDS","canUserLowerSomeoneElsesHand","LOWER_SOMEONE_ELSES_HAND","bothLeaveAndEndMeetingAvailable","LEAVE_TRANSFER_HOST_END_MEETING","LEAVE_END_MEETING","canManageBreakout","BREAKOUT_MANAGEMENT","canBroadcastMessageToBreakout","BROADCAST_MESSAGE_TO_BREAKOUT","isSuppressBreakoutSupport","UCF_SUPPRESS_BREAKOUTS_SUPPORT","canAdmitLobbyToBreakout","DISABLE_LOBBY_TO_BREAKOUT","isBreakoutPreassignmentsEnabled","DISABLE_BREAKOUT_PREASSIGNMENTS","canUserAskForHelp","DISABLE_ASK_FOR_HELP","lockMeeting","actions","request","canLock","lock","PermissionError","unlockMeeting","canUnlock","handleAudioLogging","LOG_HEADER","settings","underlyingTrack","getSettings","deviceId","log","handleVideoLogging","handleDeviceLogging","devices","device","endMeetingForAll","endOptions","canEnableClosedCaption","CAPTION_START","isSaveTranscriptsEnabled","SAVE_TRANSCRIPTS_ENABLED","canStartTranscribing","TRANSCRIPTION_CONTROL_START","canStopTranscribing","TRANSCRIPTION_CONTROL_STOP","isClosedCaptionActive","CAPTION_STATUS_ACTIVE","isWebexAssistantActive","WEBEX_ASSISTANT_STATUS_ACTIVE","canViewCaptionPanel","ENABLE_CAPTION_PANEL","isRealTimeTranslationEnabled","DISPLAY_REAL_TIME_TRANSLATION","canSelectSpokenLanguages","DISPLAY_NON_ENGLISH_ASR","waitingForOthersToJoin","WAITING_FOR_OTHERS","canSendReactions","originalValue","REACTIONS_ACTIVE","REACTIONS_INACTIVE","canUserRenameSelfAndObserved","CAN_RENAME_SELF_AND_OBSERVED","canUserRenameOthers","CAN_RENAME_OTHERS","addSequence","requestBody","updateLocusWithDelta","onDeltaLocus","generateLocusDeltaRequest","originalMeeting","meetingRef","WeakRef","locusDeltaRequest","originalOptions","deref","selfSupportsFeature","feature","userPolicies","parseInterpretationInfo","meetingInfo","siInfo","updateMeetingSIEnabled","turnOnSimultaneousInterpretation","currentSIInterpreter","hostSIEnabled","meetingSiteSetting","enableHostInterpreterControlSI","updateHostSIEnabled","renameKey","obj","oldKey","newKey","lanuagesInfo","siLanguages","language","updateInterpretation","Trigger","file","function","EVENT_TRIGGERS","MEETING_INTERPRETATION_UPDATE"],"sources":["util.ts"],"sourcesContent":["import {LocalCameraTrack, LocalMicrophoneTrack} from '@webex/media-helpers';\nimport {cloneDeep} from 'lodash';\nimport {MeetingNotActiveError, UserNotJoinedError} from '../common/errors/webex-errors';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport {\n INTENT_TO_JOIN,\n _LEFT_,\n _IDLE_,\n _JOINED_,\n PASSWORD_STATUS,\n DISPLAY_HINTS,\n FULL_STATE,\n SELF_POLICY,\n EVENT_TRIGGERS,\n} from '../constants';\nimport IntentToJoinError from '../common/errors/intent-to-join';\nimport JoinMeetingError from '../common/errors/join-meeting';\nimport ParameterError from '../common/errors/parameter';\nimport PermissionError from '../common/errors/permission';\nimport PasswordError from '../common/errors/password-error';\nimport CaptchaError from '../common/errors/captcha-error';\nimport Trigger from '../common/events/trigger-proxy';\n\nconst MeetingUtil = {\n parseLocusJoin: (response) => {\n const parsed: any = {};\n\n // First todo: add check for existance\n parsed.locus = response.body.locus;\n parsed.mediaConnections = response.body.mediaConnections;\n parsed.locusUrl = parsed.locus.url;\n parsed.locusId = parsed.locus.url.split('/').pop();\n parsed.selfId = parsed.locus.self.id;\n\n // we need mediaId before making roap calls\n parsed.mediaConnections.forEach((mediaConnection) => {\n if (mediaConnection.mediaId) {\n parsed.mediaId = mediaConnection.mediaId;\n }\n });\n\n return parsed;\n },\n\n remoteUpdateAudioVideo: (meeting, audioMuted?: boolean, videoMuted?: boolean) => {\n const webex = meeting.getWebexObject();\n if (!meeting) {\n return Promise.reject(new ParameterError('You need a meeting object.'));\n }\n\n if (!meeting.locusMediaRequest) {\n return Promise.reject(\n new ParameterError(\n 'You need a meeting with a media connection, call Meeting.addMedia() first.'\n )\n );\n }\n\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.locus.media.request',\n options: {meetingId: meeting.id},\n });\n\n return meeting.locusMediaRequest\n .send({\n type: 'LocalMute',\n selfUrl: meeting.selfUrl,\n mediaId: meeting.mediaId,\n sequence: meeting.locusInfo.sequence,\n muteOptions: {\n audioMuted,\n videoMuted,\n },\n })\n .then((response) => {\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.locus.media.response',\n options: {meetingId: meeting.id},\n });\n\n return response?.body?.locus;\n });\n },\n\n hasOwner: (info) => info && info.owner,\n\n isOwnerSelf: (owner, selfId) => owner === selfId,\n\n isPinOrGuest: (err) => err?.body?.errorCode && INTENT_TO_JOIN.includes(err.body.errorCode),\n\n joinMeeting: (meeting, options) => {\n if (!meeting) {\n return Promise.reject(new ParameterError('You need a meeting object.'));\n }\n const webex = meeting.getWebexObject();\n\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.locus.join.request',\n options: {meetingId: meeting.id},\n });\n\n // eslint-disable-next-line no-warning-comments\n // TODO: check if the meeting is in JOINING state\n // if Joining state termintate the request as user might click multiple times\n return meeting.meetingRequest\n .joinMeeting({\n inviteeAddress: meeting.meetingJoinUrl || meeting.sipUri,\n meetingNumber: meeting.meetingNumber,\n deviceUrl: meeting.deviceUrl,\n locusUrl: meeting.locusUrl,\n correlationId: meeting.correlationId,\n roapMessage: options.roapMessage,\n permissionToken: meeting.permissionToken,\n resourceId: options.resourceId || null,\n moderator: options.moderator,\n pin: options.pin,\n moveToResource: options.moveToResource,\n preferTranscoding: !meeting.isMultistream,\n asResourceOccupant: options.asResourceOccupant,\n breakoutsSupported: options.breakoutsSupported,\n locale: options.locale,\n deviceCapabilities: options.deviceCapabilities,\n liveAnnotationSupported: options.liveAnnotationSupported,\n })\n .then((res) => {\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.locus.join.response',\n payload: {\n trigger: 'loci-update',\n identifiers: {\n trackingId: res.headers.trackingid,\n },\n },\n options: {\n meetingId: meeting.id,\n mediaConnections: res.body.mediaConnections,\n },\n });\n\n return MeetingUtil.parseLocusJoin(res);\n });\n },\n\n cleanUp: (meeting) => {\n meeting.breakouts.cleanUp();\n meeting.simultaneousInterpretation.cleanUp();\n\n // make sure we send last metrics before we close the peerconnection\n const stopStatsAnalyzer = meeting.statsAnalyzer\n ? meeting.statsAnalyzer.stopAnalyzer()\n : Promise.resolve();\n\n return stopStatsAnalyzer\n .then(() => meeting.closeRemoteTracks())\n .then(() => meeting.closePeerConnections())\n .then(() => {\n meeting.cleanupLocalTracks();\n meeting.unsetRemoteTracks();\n meeting.unsetPeerConnections();\n meeting.reconnectionManager.cleanUp();\n })\n .then(() => meeting.stopKeepAlive())\n .then(() => meeting.updateLLMConnection());\n },\n\n disconnectPhoneAudio: (meeting, phoneUrl) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n return Promise.reject(new MeetingNotActiveError());\n }\n\n const options = {\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n correlationId: meeting.correlationId,\n phoneUrl,\n };\n\n return meeting.meetingRequest.disconnectPhoneAudio(options).catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:util#disconnectPhoneAudio --> An error occured while disconnecting phone audio in meeting ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n },\n\n // by default will leave on meeting's resourceId\n // if you explicity want it not to leave on resource id, pass\n // {resourceId: null}\n // TODO: chris, you can modify this however you want\n leaveMeeting: (meeting, options: any = {}) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n // TODO: clean up if the meeting is already inactive\n return Promise.reject(new MeetingNotActiveError());\n }\n\n if (MeetingUtil.isUserInLeftState(meeting.locusInfo)) {\n return Promise.reject(new UserNotJoinedError());\n }\n\n const defaultOptions = {\n locusUrl: meeting.locusUrl,\n selfId: meeting.selfId,\n correlationId: meeting.correlationId,\n resourceId: meeting.resourceId,\n deviceUrl: meeting.deviceUrl,\n };\n\n const leaveOptions = {...defaultOptions, ...options};\n\n return meeting.meetingRequest\n .leaveMeeting(leaveOptions)\n .then(() => {\n if (options.moveMeeting) {\n return Promise.resolve();\n }\n\n return MeetingUtil.cleanUp(meeting);\n })\n .catch((err) => {\n // TODO: If the meeting state comes as LEFT or INACTIVE as response then\n // 1) on leave clean up the meeting or simply do a sync on the meeting\n // 2) If the error says meeting is inactive then destroy the meeting object\n LoggerProxy.logger.error(\n `Meeting:util#leaveMeeting --> An error occured while trying to leave meeting with an id of ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n },\n declineMeeting: (meeting, reason) =>\n meeting.meetingRequest.declineMeeting({\n locusUrl: meeting.locusUrl,\n deviceUrl: meeting.deviceUrl,\n reason,\n }),\n\n isUserInLeftState: (locusInfo) => locusInfo.parsedLocus?.self?.state === _LEFT_,\n\n isUserInIdleState: (locusInfo) => locusInfo.parsedLocus?.self?.state === _IDLE_,\n\n isUserInJoinedState: (locusInfo) => locusInfo.parsedLocus?.self?.state === _JOINED_,\n\n isMediaEstablished: (currentMediaStatus) =>\n currentMediaStatus &&\n (currentMediaStatus.audio || currentMediaStatus.video || currentMediaStatus.share),\n\n joinMeetingOptions: (meeting, options: any = {}) => {\n const webex = meeting.getWebexObject();\n\n meeting.resourceId = meeting.resourceId || options.resourceId;\n\n if (meeting.requiredCaptcha) {\n return Promise.reject(new CaptchaError());\n }\n if (meeting.passwordStatus === PASSWORD_STATUS.REQUIRED) {\n return Promise.reject(new PasswordError());\n }\n\n if (options.pin) {\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.pin.collected',\n options: {\n meetingId: meeting.id,\n },\n });\n }\n\n // normal join meeting, scenario A, D\n return MeetingUtil.joinMeeting(meeting, options)\n .then((response) => {\n meeting.setLocus(response);\n\n return Promise.resolve(response);\n })\n .catch((err) => {\n // joining a claimed PMR that is not my own, scenario B\n if (MeetingUtil.isPinOrGuest(err)) {\n // @ts-ignore\n webex.internal.newMetrics.submitClientEvent({\n name: 'client.pin.prompt',\n options: {\n meetingId: meeting.id,\n },\n });\n\n // request host pin or non host for unclaimed PMR, start of Scenario C\n // see https://sqbu-github.cisco.com/WebExSquared/locus/wiki/Locus-Lobby-and--IVR-Feature\n return Promise.reject(new IntentToJoinError('Error Joining Meeting', err));\n }\n LoggerProxy.logger.error(\n 'Meeting:util#joinMeetingOptions --> Error joining the call, ',\n err\n );\n\n return Promise.reject(new JoinMeetingError(options, 'Error Joining Meeting', err));\n });\n },\n\n getTrack: (stream) => {\n let audioTrack = null;\n let videoTrack = null;\n let audioTracks = null;\n let videoTracks = null;\n\n if (!stream) {\n return {audioTrack: null, videoTrack: null};\n }\n if (stream.getAudioTracks) {\n audioTracks = stream.getAudioTracks();\n }\n if (stream.getVideoTracks) {\n videoTracks = stream.getVideoTracks();\n }\n\n if (audioTracks && audioTracks.length > 0) {\n [audioTrack] = audioTracks;\n }\n\n if (videoTracks && videoTracks.length > 0) {\n [videoTrack] = videoTracks;\n }\n\n return {audioTrack, videoTrack};\n },\n\n getModeratorFromLocusInfo: (locusInfo) =>\n locusInfo &&\n locusInfo.parsedLocus &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info.moderator,\n\n getPolicyFromLocusInfo: (locusInfo) =>\n locusInfo &&\n locusInfo.parsedLocus &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info &&\n locusInfo.parsedLocus.info.policy,\n\n getUserDisplayHintsFromLocusInfo: (locusInfo) =>\n locusInfo?.parsedLocus?.info?.userDisplayHints || [],\n\n canInviteNewParticipants: (displayHints) => displayHints.includes(DISPLAY_HINTS.ADD_GUEST),\n\n canAdmitParticipant: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.ROSTER_WAITING_TO_JOIN),\n\n canUserLock: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_LOCK) &&\n displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_UNLOCKED),\n\n canUserUnlock: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOCK_CONTROL_UNLOCK) &&\n displayHints.includes(DISPLAY_HINTS.LOCK_STATUS_LOCKED),\n\n canUserRaiseHand: (displayHints) => displayHints.includes(DISPLAY_HINTS.RAISE_HAND),\n\n canUserLowerAllHands: (displayHints) => displayHints.includes(DISPLAY_HINTS.LOWER_ALL_HANDS),\n\n canUserLowerSomeoneElsesHand: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LOWER_SOMEONE_ELSES_HAND),\n\n bothLeaveAndEndMeetingAvailable: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.LEAVE_TRANSFER_HOST_END_MEETING) ||\n displayHints.includes(DISPLAY_HINTS.LEAVE_END_MEETING),\n\n canManageBreakout: (displayHints) => displayHints.includes(DISPLAY_HINTS.BREAKOUT_MANAGEMENT),\n canBroadcastMessageToBreakout: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.BROADCAST_MESSAGE_TO_BREAKOUT),\n\n isSuppressBreakoutSupport: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.UCF_SUPPRESS_BREAKOUTS_SUPPORT),\n\n canAdmitLobbyToBreakout: (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_LOBBY_TO_BREAKOUT),\n\n isBreakoutPreassignmentsEnabled: (displayHints) =>\n !displayHints.includes(DISPLAY_HINTS.DISABLE_BREAKOUT_PREASSIGNMENTS),\n\n canUserAskForHelp: (displayHints) => !displayHints.includes(DISPLAY_HINTS.DISABLE_ASK_FOR_HELP),\n\n lockMeeting: (actions, request, locusUrl) => {\n if (actions && actions.canLock) {\n return request.lockMeeting({locusUrl, lock: true});\n }\n\n return Promise.reject(new PermissionError('Lock not allowed, due to joined property.'));\n },\n\n unlockMeeting: (actions, request, locusUrl) => {\n if (actions && actions.canUnlock) {\n return request.lockMeeting({locusUrl, lock: false});\n }\n\n return Promise.reject(new PermissionError('Unlock not allowed, due to joined property.'));\n },\n\n handleAudioLogging: (audioTrack?: LocalMicrophoneTrack) => {\n const LOG_HEADER = 'MeetingUtil#handleAudioLogging -->';\n\n if (audioTrack) {\n const settings = audioTrack.underlyingTrack.getSettings();\n const {deviceId} = settings;\n\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));\n }\n },\n\n handleVideoLogging: (videoTrack?: LocalCameraTrack) => {\n const LOG_HEADER = 'MeetingUtil#handleVideoLogging -->';\n\n if (videoTrack) {\n const settings = videoTrack.underlyingTrack.getSettings();\n const {deviceId} = settings;\n\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings =', JSON.stringify(settings));\n }\n },\n\n handleDeviceLogging: (devices = []) => {\n const LOG_HEADER = 'MeetingUtil#handleDeviceLogging -->';\n\n devices.forEach((device) => {\n LoggerProxy.logger.log(LOG_HEADER, `deviceId = ${device.deviceId}`);\n LoggerProxy.logger.log(LOG_HEADER, 'settings', JSON.stringify(device));\n });\n },\n\n endMeetingForAll: (meeting) => {\n if (meeting.meetingState === FULL_STATE.INACTIVE) {\n return Promise.reject(new MeetingNotActiveError());\n }\n\n const endOptions = {\n locusUrl: meeting.locusUrl,\n };\n\n return meeting.meetingRequest\n .endMeetingForAll(endOptions)\n .then(() => MeetingUtil.cleanUp(meeting))\n .catch((err) => {\n LoggerProxy.logger.error(\n `Meeting:util#endMeetingForAll An error occured while trying to end meeting for all with an id of ${meeting.id}, error: ${err}`\n );\n\n return Promise.reject(err);\n });\n },\n\n canEnableClosedCaption: (displayHints) => displayHints.includes(DISPLAY_HINTS.CAPTION_START),\n\n isSaveTranscriptsEnabled: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.SAVE_TRANSCRIPTS_ENABLED),\n\n canStartTranscribing: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_START),\n\n canStopTranscribing: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.TRANSCRIPTION_CONTROL_STOP),\n\n isClosedCaptionActive: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAPTION_STATUS_ACTIVE),\n\n isWebexAssistantActive: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.WEBEX_ASSISTANT_STATUS_ACTIVE),\n\n canViewCaptionPanel: (displayHints) => displayHints.includes(DISPLAY_HINTS.ENABLE_CAPTION_PANEL),\n\n isRealTimeTranslationEnabled: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.DISPLAY_REAL_TIME_TRANSLATION),\n\n canSelectSpokenLanguages: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.DISPLAY_NON_ENGLISH_ASR),\n\n waitingForOthersToJoin: (displayHints) => displayHints.includes(DISPLAY_HINTS.WAITING_FOR_OTHERS),\n\n canSendReactions: (originalValue, displayHints) => {\n if (displayHints.includes(DISPLAY_HINTS.REACTIONS_ACTIVE)) {\n return true;\n }\n if (displayHints.includes(DISPLAY_HINTS.REACTIONS_INACTIVE)) {\n return false;\n }\n\n return originalValue;\n },\n canUserRenameSelfAndObserved: (displayHints) =>\n displayHints.includes(DISPLAY_HINTS.CAN_RENAME_SELF_AND_OBSERVED),\n\n canUserRenameOthers: (displayHints) => displayHints.includes(DISPLAY_HINTS.CAN_RENAME_OTHERS),\n\n /**\n * Adds the current locus sequence information to a request body\n * @param {Object} meeting The meeting object\n * @param {Object} requestBody The body of a request to locus\n * @returns {void}\n */\n addSequence: (meeting, requestBody) => {\n const sequence = meeting?.locusInfo?.sequence;\n\n if (!sequence) {\n return;\n }\n\n requestBody.sequence = sequence;\n },\n\n /**\n * Updates the locus info for the meeting with the delta locus\n * returned from requests that include the sequence information\n * Returns the original response object\n * @param {Object} meeting The meeting object\n * @param {Object} response The response of the http request\n * @returns {Object}\n */\n updateLocusWithDelta: (meeting, response) => {\n if (!meeting) {\n return response;\n }\n\n const locus = response?.body?.locus;\n\n if (locus) {\n meeting.locusInfo.onDeltaLocus(locus);\n }\n\n return response;\n },\n\n generateLocusDeltaRequest: (originalMeeting) => {\n const meetingRef = new WeakRef(originalMeeting);\n\n const locusDeltaRequest = (originalOptions) => {\n const meeting = meetingRef.deref();\n\n if (!meeting) {\n return Promise.resolve();\n }\n\n const options = cloneDeep(originalOptions);\n\n if (!options.body) {\n options.body = {};\n }\n\n MeetingUtil.addSequence(meeting, options.body);\n\n return meeting\n .request(options)\n .then((response) => MeetingUtil.updateLocusWithDelta(meeting, response));\n };\n\n return locusDeltaRequest;\n },\n\n selfSupportsFeature: (feature: SELF_POLICY, userPolicies: Record<SELF_POLICY, boolean>) => {\n if (!userPolicies) {\n return true;\n }\n\n return userPolicies[feature];\n },\n\n parseInterpretationInfo: (meeting, meetingInfo) => {\n if (!meeting || !meetingInfo) {\n return;\n }\n const siInfo = meetingInfo.simultaneousInterpretation;\n meeting.simultaneousInterpretation.updateMeetingSIEnabled(\n !!meetingInfo.turnOnSimultaneousInterpretation,\n !!siInfo?.currentSIInterpreter\n );\n const hostSIEnabled = !!(\n meetingInfo.turnOnSimultaneousInterpretation &&\n meetingInfo?.meetingSiteSetting?.enableHostInterpreterControlSI\n );\n meeting.simultaneousInterpretation.updateHostSIEnabled(hostSIEnabled);\n\n function renameKey(obj, oldKey, newKey) {\n if (oldKey in obj) {\n obj[newKey] = obj[oldKey];\n delete obj[oldKey];\n }\n }\n if (siInfo) {\n const lanuagesInfo = cloneDeep(siInfo.siLanguages);\n for (const language of lanuagesInfo) {\n renameKey(language, 'languageCode', 'languageName');\n renameKey(language, 'languageGroupId', 'languageCode');\n }\n if (!meeting.simultaneousInterpretation?.siLanguages?.length) {\n meeting.simultaneousInterpretation.updateInterpretation(lanuagesInfo);\n }\n }\n Trigger.trigger(\n this,\n {\n file: 'meeting/util',\n function: 'parseInterpretationInfo',\n },\n EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE\n );\n },\n};\n\nexport default MeetingUtil;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAEA;AACA;AACA;AAWA;AACA;AACA;AACA;AACA;AACA;AACA;AAAqD;AAAA;AAAA;AAAA;AAAA;AAAA;AAErD,IAAMA,WAAW,GAAG;EAClBC,cAAc,EAAE,wBAACC,QAAQ,EAAK;IAC5B,IAAMC,MAAW,GAAG,CAAC,CAAC;;IAEtB;IACAA,MAAM,CAACC,KAAK,GAAGF,QAAQ,CAACG,IAAI,CAACD,KAAK;IAClCD,MAAM,CAACG,gBAAgB,GAAGJ,QAAQ,CAACG,IAAI,CAACC,gBAAgB;IACxDH,MAAM,CAACI,QAAQ,GAAGJ,MAAM,CAACC,KAAK,CAACI,GAAG;IAClCL,MAAM,CAACM,OAAO,GAAGN,MAAM,CAACC,KAAK,CA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,4EAAlC,sBAAoCkL,WAAW,mDAA/C,uBAAiDrH,MAAM,GAAE;QAC5DzH,OAAO,CAAC4D,0BAA0B,CAACoL,oBAAoB,CAACH,YAAY,CAAC;MACvE;IACF;IACAI,qBAAO,CAAC5L,OAAO,CACb,KAAI,EACJ;MACE6L,IAAI,EAAE,cAAc;MACpBC,QAAQ,EAAE;IACZ,CAAC,EACDC,yBAAc,CAACC,6BAA6B,CAC7C;EACH;AACF,CAAC;AAAC,eAEaxQ,WAAW;AAAA"}
|
package/dist/member/util.js
CHANGED
|
@@ -330,12 +330,13 @@ MemberUtil.extractId = function (participant) {
|
|
|
330
330
|
* @returns {Object}
|
|
331
331
|
*/
|
|
332
332
|
MemberUtil.extractMediaStatus = function (participant) {
|
|
333
|
+
var _participant$status, _participant$status2;
|
|
333
334
|
if (!participant) {
|
|
334
335
|
throw new _parameter.default('Media status could not be extracted, participant is undefined.');
|
|
335
336
|
}
|
|
336
337
|
return {
|
|
337
|
-
audio: participant.status.audioStatus,
|
|
338
|
-
video: participant.status.videoStatus
|
|
338
|
+
audio: (_participant$status = participant.status) === null || _participant$status === void 0 ? void 0 : _participant$status.audioStatus,
|
|
339
|
+
video: (_participant$status2 = participant.status) === null || _participant$status2 === void 0 ? void 0 : _participant$status2.videoStatus
|
|
339
340
|
};
|
|
340
341
|
};
|
|
341
342
|
|
package/dist/member/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MemberUtil","getControlsRoles","participant","controls","role","roles","hasRole","controlRole","some","type","hasCohost","ServerRoles","Cohost","hasModerator","Moderator","hasPresenter","Presenter","extractControlRoles","cohost","moderator","presenter","isUser","_USER_","isModerator","isGuest","guest","isDevice","_RESOURCE_ROOM_","isModeratorAssignmentProhibited","moderatorAssignmentNotAllowed","isSame","id","person","isAssociatedSame","associatedUsers","user","isNotAdmitted","status","devices","intent","_WAIT_","_IN_LOBBY_","_IN_MEETING_","isAudioMuted","ParameterError","mutedStatus","isMuted","AUDIO_STATUS","audio","muted","isVideoMuted","VIDEO_STATUS","isHandRaised","hand","raised","isBreakoutsSupported","doesNotSupportBreakouts","isInterpretationSupported","doesNotSupportSiInterpreter","isLiveAnnotationSupported","annotatorAssignmentNotAllowed","accessor","_RECEIVE_ONLY_","_SEND_RECEIVE_","getRecordingMember","record","recording","meta","modifiedBy","isRecording","localRecord","isRemovable","isSelf","isInMeeting","_CALL_","isMutable","extractStatus","length","_NOT_IN_MEETING_","state","_JOINED_","_IDLE_","foundDevice","find","device","_OBSERVE_","_LEFT_","extractId","extractMediaStatus","audioStatus","video","videoStatus","extractName","name"],"sources":["util.ts"],"sourcesContent":["import {\n IExternalRoles,\n ParticipantWithRoles,\n ServerRoles,\n ServerRoleShape,\n IMediaStatus,\n} from './types';\nimport {\n _USER_,\n _RESOURCE_ROOM_,\n _OBSERVE_,\n _WAIT_,\n _LEFT_,\n _JOINED_,\n _IDLE_,\n _IN_LOBBY_,\n _NOT_IN_MEETING_,\n _IN_MEETING_,\n AUDIO_STATUS,\n VIDEO_STATUS,\n _SEND_RECEIVE_,\n _RECEIVE_ONLY_,\n _CALL_,\n} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nconst MemberUtil: any = {};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {[ServerRoleShape]}\n */\nMemberUtil.getControlsRoles = (participant: ParticipantWithRoles): Array<ServerRoleShape> =>\n participant?.controls?.role?.roles;\n\n/**\n * @param {Object} participant the locus participant\n * @param {ServerRoles} controlRole the search role\n * @returns {Boolean}\n */\nMemberUtil.hasRole = (participant: any, controlRole: ServerRoles): boolean =>\n MemberUtil.getControlsRoles(participant)?.some(\n (role) => role.type === controlRole && role.hasRole\n );\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.hasCohost = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Cohost) || false;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.hasModerator = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Moderator) || false;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.hasPresenter = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Presenter) || false;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {IExternalRoles}\n */\nMemberUtil.extractControlRoles = (participant: ParticipantWithRoles): IExternalRoles => {\n const roles = {\n cohost: MemberUtil.hasCohost(participant),\n moderator: MemberUtil.hasModerator(participant),\n presenter: MemberUtil.hasPresenter(participant),\n };\n\n return roles;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isUser = (participant: any) => participant && participant.type === _USER_;\n\nMemberUtil.isModerator = (participant) => participant && participant.moderator;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isGuest = (participant: any) => participant && participant.guest;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isDevice = (participant: any) => participant && participant.type === _RESOURCE_ROOM_;\n\nMemberUtil.isModeratorAssignmentProhibited = (participant) =>\n participant && participant.moderatorAssignmentNotAllowed;\n\n/**\n * checks to see if the participant id is the same as the passed id\n * there are multiple ids that can be used\n * @param {Object} participant the locus participant\n * @param {String} id\n * @returns {Boolean}\n */\nMemberUtil.isSame = (participant: any, id: string) =>\n participant && (participant.id === id || (participant.person && participant.person.id === id));\n\n/**\n * checks to see if the participant id is the same as the passed id for associated devices\n * there are multiple ids that can be used\n * @param {Object} participant the locus participant\n * @param {String} id\n * @returns {Boolean}\n */\nMemberUtil.isAssociatedSame = (participant: any, id: string) =>\n participant &&\n participant.associatedUsers &&\n participant.associatedUsers.some(\n (user) => user.id === id || (user.person && user.person.id === id)\n );\n\n/**\n * @param {Object} participant the locus participant\n * @param {Boolean} isGuest\n * @param {String} status\n * @returns {Boolean}\n */\nMemberUtil.isNotAdmitted = (participant: any, isGuest: boolean, status: string): boolean =>\n participant &&\n participant.guest &&\n ((participant.devices &&\n participant.devices[0] &&\n participant.devices[0].intent &&\n participant.devices[0].intent.type === _WAIT_ &&\n // @ts-ignore\n isGuest &&\n status === _IN_LOBBY_) ||\n // @ts-ignore\n !status === _IN_MEETING_);\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isAudioMuted = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Audio could not be processed, participant is undefined.');\n }\n const mutedStatus = MemberUtil.isMuted(participant.status, AUDIO_STATUS);\n\n if (participant.controls && participant.controls.audio) {\n if (participant.controls.audio.muted) {\n return true;\n }\n if (mutedStatus) {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isVideoMuted = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Video could not be processed, participant is undefined.');\n }\n\n return MemberUtil.isMuted(participant.status, VIDEO_STATUS);\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isHandRaised = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Raise hand could not be processed, participant is undefined.');\n }\n\n return participant.controls?.hand?.raised || false;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isBreakoutsSupported = (participant) => {\n if (!participant) {\n throw new ParameterError('Breakout support could not be processed, participant is undefined.');\n }\n\n return !participant.doesNotSupportBreakouts;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isInterpretationSupported = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'Interpretation support could not be processed, participant is undefined.'\n );\n }\n\n return !participant.doesNotSupportSiInterpreter;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isLiveAnnotationSupported = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'LiveAnnotation support could not be processed, participant is undefined.'\n );\n }\n\n return !participant.annotatorAssignmentNotAllowed;\n};\n\n/**\n * utility method for audio/video muted status\n * @param {String} status\n * @param {String} accessor\n * @returns {Boolean}\n */\nMemberUtil.isMuted = (status: string, accessor: string) => {\n if (status) {\n if (status[accessor] === _RECEIVE_ONLY_) {\n return true;\n }\n if (status[accessor] === _SEND_RECEIVE_) {\n return false;\n }\n }\n\n return null;\n};\n\n/**\n * utility method for getting the recording member for later comparison\n * @param {Object} controls\n * @returns {String|null}\n */\nMemberUtil.getRecordingMember = (controls: any) => {\n if (!controls) {\n return null;\n }\n if (controls.record && controls.record.recording && controls.record.meta) {\n return controls.record.meta.modifiedBy;\n }\n\n return null;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isRecording = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Recording could not be processed, participant is undefined.');\n }\n if (participant.controls && participant.controls.localRecord) {\n return participant.controls.localRecord.recording;\n }\n\n return false;\n};\n\nMemberUtil.isRemovable = (isSelf, isGuest, isInMeeting, type) => {\n if (isGuest || isSelf) {\n return false;\n }\n if (type === _CALL_) {\n return false;\n }\n if (isInMeeting) {\n return true;\n }\n\n return false;\n};\n\nMemberUtil.isMutable = (isSelf, isDevice, isInMeeting, isMuted, type) => {\n if (!isInMeeting) {\n return false;\n }\n if (isMuted) {\n return false;\n }\n if (type === _CALL_) {\n return false;\n }\n if (isSelf || isDevice) {\n return true;\n }\n\n return false;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {String}\n */\nMemberUtil.extractStatus = (participant: any) => {\n if (!(participant && participant.devices && participant.devices.length)) {\n return _NOT_IN_MEETING_;\n }\n if (participant.state === _JOINED_) {\n return _IN_MEETING_;\n }\n if (participant.state === _IDLE_) {\n if (participant.devices && participant.devices.length > 0) {\n const foundDevice = participant.devices.find(\n (device) =>\n device.intent && (device.intent.type === _WAIT_ || device.intent.type === _OBSERVE_)\n );\n\n return foundDevice ? _IN_LOBBY_ : _NOT_IN_MEETING_;\n }\n\n return _NOT_IN_MEETING_;\n }\n if (participant.state === _LEFT_) {\n return _NOT_IN_MEETING_;\n }\n\n return _NOT_IN_MEETING_;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {String}\n */\nMemberUtil.extractId = (participant: any) => {\n if (participant) {\n return participant.id;\n }\n\n return null;\n};\n\n/**\n * extracts the media status from nested participant object\n * @param {Object} participant the locus participant\n * @returns {Object}\n */\nMemberUtil.extractMediaStatus = (participant: any): IMediaStatus => {\n if (!participant) {\n throw new ParameterError('Media status could not be extracted, participant is undefined.');\n }\n\n return {\n audio: participant.status.audioStatus,\n video: participant.status.videoStatus,\n };\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {String}\n */\nMemberUtil.extractName = (participant: any) => {\n if (participant && participant.person) {\n return participant.person.name;\n }\n\n return null;\n};\n\nexport default MemberUtil;\n"],"mappings":";;;;;;;;AAAA;AAOA;AAiBA;AAEA,IAAMA,UAAe,GAAG,CAAC,CAAC;;AAE1B;AACA;AACA;AACA;AACAA,UAAU,CAACC,gBAAgB,GAAG,UAACC,WAAiC;EAAA;EAAA,OAC9DA,WAAW,aAAXA,WAAW,gDAAXA,WAAW,CAAEC,QAAQ,oFAArB,sBAAuBC,IAAI,2DAA3B,uBAA6BC,KAAK;AAAA;;AAEpC;AACA;AACA;AACA;AACA;AACAL,UAAU,CAACM,OAAO,GAAG,UAACJ,WAAgB,EAAEK,WAAwB;EAAA;EAAA,gCAC9DP,UAAU,CAACC,gBAAgB,CAACC,WAAW,CAAC,0DAAxC,sBAA0CM,IAAI,CAC5C,UAACJ,IAAI;IAAA,OAAKA,IAAI,CAACK,IAAI,KAAKF,WAAW,IAAIH,IAAI,CAACE,OAAO;EAAA,EACpD;AAAA;;AAEH;AACA;AACA;AACA;AACAN,UAAU,CAACU,SAAS,GAAG,UAACR,WAAiC;EAAA,OACvDF,UAAU,CAACM,OAAO,CAACJ,WAAW,EAAES,kBAAW,CAACC,MAAM,CAAC,IAAI,KAAK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O,CAAC6C,IAAI,CAC1C,UAACC,MAAM;QAAA,OACLA,MAAM,CAAC7C,MAAM,KAAK6C,MAAM,CAAC7C,MAAM,CAAC9B,IAAI,KAAK+B,iBAAM,IAAI4C,MAAM,CAAC7C,MAAM,CAAC9B,IAAI,KAAK4E,oBAAS,CAAC;MAAA,EACvF;MAED,OAAOH,WAAW,GAAGzC,qBAAU,GAAGqC,2BAAgB;IACpD;IAEA,OAAOA,2BAAgB;EACzB;EACA,IAAI5E,WAAW,CAAC6E,KAAK,KAAKO,iBAAM,EAAE;IAChC,OAAOR,2BAAgB;EACzB;EAEA,OAAOA,2BAAgB;AACzB,CAAC;;AAED;AACA;AACA;AACA;AACA9E,UAAU,CAACuF,SAAS,GAAG,UAACrF,WAAgB,EAAK;EAC3C,IAAIA,WAAW,EAAE;IACf,OAAOA,WAAW,CAAC6B,EAAE;EACvB;EAEA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA/B,UAAU,CAACwF,kBAAkB,GAAG,UAACtF,WAAgB,EAAmB;EAClE,IAAI,CAACA,WAAW,EAAE;IAChB,MAAM,IAAI0C,kBAAc,CAAC,gEAAgE,CAAC;EAC5F;EAEA,OAAO;IACLI,KAAK,EAAE9C,WAAW,CAACmC,MAAM,CAACoD,WAAW;IACrCC,KAAK,EAAExF,WAAW,CAACmC,MAAM,CAACsD;EAC5B,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA3F,UAAU,CAAC4F,WAAW,GAAG,UAAC1F,WAAgB,EAAK;EAC7C,IAAIA,WAAW,IAAIA,WAAW,CAAC8B,MAAM,EAAE;IACrC,OAAO9B,WAAW,CAAC8B,MAAM,CAAC6D,IAAI;EAChC;EAEA,OAAO,IAAI;AACb,CAAC;AAAC,eAEa7F,UAAU;AAAA"}
|
|
1
|
+
{"version":3,"names":["MemberUtil","getControlsRoles","participant","controls","role","roles","hasRole","controlRole","some","type","hasCohost","ServerRoles","Cohost","hasModerator","Moderator","hasPresenter","Presenter","extractControlRoles","cohost","moderator","presenter","isUser","_USER_","isModerator","isGuest","guest","isDevice","_RESOURCE_ROOM_","isModeratorAssignmentProhibited","moderatorAssignmentNotAllowed","isSame","id","person","isAssociatedSame","associatedUsers","user","isNotAdmitted","status","devices","intent","_WAIT_","_IN_LOBBY_","_IN_MEETING_","isAudioMuted","ParameterError","mutedStatus","isMuted","AUDIO_STATUS","audio","muted","isVideoMuted","VIDEO_STATUS","isHandRaised","hand","raised","isBreakoutsSupported","doesNotSupportBreakouts","isInterpretationSupported","doesNotSupportSiInterpreter","isLiveAnnotationSupported","annotatorAssignmentNotAllowed","accessor","_RECEIVE_ONLY_","_SEND_RECEIVE_","getRecordingMember","record","recording","meta","modifiedBy","isRecording","localRecord","isRemovable","isSelf","isInMeeting","_CALL_","isMutable","extractStatus","length","_NOT_IN_MEETING_","state","_JOINED_","_IDLE_","foundDevice","find","device","_OBSERVE_","_LEFT_","extractId","extractMediaStatus","audioStatus","video","videoStatus","extractName","name"],"sources":["util.ts"],"sourcesContent":["import {\n IExternalRoles,\n ParticipantWithRoles,\n ServerRoles,\n ServerRoleShape,\n IMediaStatus,\n} from './types';\nimport {\n _USER_,\n _RESOURCE_ROOM_,\n _OBSERVE_,\n _WAIT_,\n _LEFT_,\n _JOINED_,\n _IDLE_,\n _IN_LOBBY_,\n _NOT_IN_MEETING_,\n _IN_MEETING_,\n AUDIO_STATUS,\n VIDEO_STATUS,\n _SEND_RECEIVE_,\n _RECEIVE_ONLY_,\n _CALL_,\n} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nconst MemberUtil: any = {};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {[ServerRoleShape]}\n */\nMemberUtil.getControlsRoles = (participant: ParticipantWithRoles): Array<ServerRoleShape> =>\n participant?.controls?.role?.roles;\n\n/**\n * @param {Object} participant the locus participant\n * @param {ServerRoles} controlRole the search role\n * @returns {Boolean}\n */\nMemberUtil.hasRole = (participant: any, controlRole: ServerRoles): boolean =>\n MemberUtil.getControlsRoles(participant)?.some(\n (role) => role.type === controlRole && role.hasRole\n );\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.hasCohost = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Cohost) || false;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.hasModerator = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Moderator) || false;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.hasPresenter = (participant: ParticipantWithRoles): boolean =>\n MemberUtil.hasRole(participant, ServerRoles.Presenter) || false;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {IExternalRoles}\n */\nMemberUtil.extractControlRoles = (participant: ParticipantWithRoles): IExternalRoles => {\n const roles = {\n cohost: MemberUtil.hasCohost(participant),\n moderator: MemberUtil.hasModerator(participant),\n presenter: MemberUtil.hasPresenter(participant),\n };\n\n return roles;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isUser = (participant: any) => participant && participant.type === _USER_;\n\nMemberUtil.isModerator = (participant) => participant && participant.moderator;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isGuest = (participant: any) => participant && participant.guest;\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isDevice = (participant: any) => participant && participant.type === _RESOURCE_ROOM_;\n\nMemberUtil.isModeratorAssignmentProhibited = (participant) =>\n participant && participant.moderatorAssignmentNotAllowed;\n\n/**\n * checks to see if the participant id is the same as the passed id\n * there are multiple ids that can be used\n * @param {Object} participant the locus participant\n * @param {String} id\n * @returns {Boolean}\n */\nMemberUtil.isSame = (participant: any, id: string) =>\n participant && (participant.id === id || (participant.person && participant.person.id === id));\n\n/**\n * checks to see if the participant id is the same as the passed id for associated devices\n * there are multiple ids that can be used\n * @param {Object} participant the locus participant\n * @param {String} id\n * @returns {Boolean}\n */\nMemberUtil.isAssociatedSame = (participant: any, id: string) =>\n participant &&\n participant.associatedUsers &&\n participant.associatedUsers.some(\n (user) => user.id === id || (user.person && user.person.id === id)\n );\n\n/**\n * @param {Object} participant the locus participant\n * @param {Boolean} isGuest\n * @param {String} status\n * @returns {Boolean}\n */\nMemberUtil.isNotAdmitted = (participant: any, isGuest: boolean, status: string): boolean =>\n participant &&\n participant.guest &&\n ((participant.devices &&\n participant.devices[0] &&\n participant.devices[0].intent &&\n participant.devices[0].intent.type === _WAIT_ &&\n // @ts-ignore\n isGuest &&\n status === _IN_LOBBY_) ||\n // @ts-ignore\n !status === _IN_MEETING_);\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isAudioMuted = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Audio could not be processed, participant is undefined.');\n }\n const mutedStatus = MemberUtil.isMuted(participant.status, AUDIO_STATUS);\n\n if (participant.controls && participant.controls.audio) {\n if (participant.controls.audio.muted) {\n return true;\n }\n if (mutedStatus) {\n return true;\n }\n }\n\n return false;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isVideoMuted = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Video could not be processed, participant is undefined.');\n }\n\n return MemberUtil.isMuted(participant.status, VIDEO_STATUS);\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isHandRaised = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Raise hand could not be processed, participant is undefined.');\n }\n\n return participant.controls?.hand?.raised || false;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isBreakoutsSupported = (participant) => {\n if (!participant) {\n throw new ParameterError('Breakout support could not be processed, participant is undefined.');\n }\n\n return !participant.doesNotSupportBreakouts;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isInterpretationSupported = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'Interpretation support could not be processed, participant is undefined.'\n );\n }\n\n return !participant.doesNotSupportSiInterpreter;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isLiveAnnotationSupported = (participant) => {\n if (!participant) {\n throw new ParameterError(\n 'LiveAnnotation support could not be processed, participant is undefined.'\n );\n }\n\n return !participant.annotatorAssignmentNotAllowed;\n};\n\n/**\n * utility method for audio/video muted status\n * @param {String} status\n * @param {String} accessor\n * @returns {Boolean}\n */\nMemberUtil.isMuted = (status: string, accessor: string) => {\n if (status) {\n if (status[accessor] === _RECEIVE_ONLY_) {\n return true;\n }\n if (status[accessor] === _SEND_RECEIVE_) {\n return false;\n }\n }\n\n return null;\n};\n\n/**\n * utility method for getting the recording member for later comparison\n * @param {Object} controls\n * @returns {String|null}\n */\nMemberUtil.getRecordingMember = (controls: any) => {\n if (!controls) {\n return null;\n }\n if (controls.record && controls.record.recording && controls.record.meta) {\n return controls.record.meta.modifiedBy;\n }\n\n return null;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {Boolean}\n */\nMemberUtil.isRecording = (participant: any) => {\n if (!participant) {\n throw new ParameterError('Recording could not be processed, participant is undefined.');\n }\n if (participant.controls && participant.controls.localRecord) {\n return participant.controls.localRecord.recording;\n }\n\n return false;\n};\n\nMemberUtil.isRemovable = (isSelf, isGuest, isInMeeting, type) => {\n if (isGuest || isSelf) {\n return false;\n }\n if (type === _CALL_) {\n return false;\n }\n if (isInMeeting) {\n return true;\n }\n\n return false;\n};\n\nMemberUtil.isMutable = (isSelf, isDevice, isInMeeting, isMuted, type) => {\n if (!isInMeeting) {\n return false;\n }\n if (isMuted) {\n return false;\n }\n if (type === _CALL_) {\n return false;\n }\n if (isSelf || isDevice) {\n return true;\n }\n\n return false;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {String}\n */\nMemberUtil.extractStatus = (participant: any) => {\n if (!(participant && participant.devices && participant.devices.length)) {\n return _NOT_IN_MEETING_;\n }\n if (participant.state === _JOINED_) {\n return _IN_MEETING_;\n }\n if (participant.state === _IDLE_) {\n if (participant.devices && participant.devices.length > 0) {\n const foundDevice = participant.devices.find(\n (device) =>\n device.intent && (device.intent.type === _WAIT_ || device.intent.type === _OBSERVE_)\n );\n\n return foundDevice ? _IN_LOBBY_ : _NOT_IN_MEETING_;\n }\n\n return _NOT_IN_MEETING_;\n }\n if (participant.state === _LEFT_) {\n return _NOT_IN_MEETING_;\n }\n\n return _NOT_IN_MEETING_;\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {String}\n */\nMemberUtil.extractId = (participant: any) => {\n if (participant) {\n return participant.id;\n }\n\n return null;\n};\n\n/**\n * extracts the media status from nested participant object\n * @param {Object} participant the locus participant\n * @returns {Object}\n */\nMemberUtil.extractMediaStatus = (participant: any): IMediaStatus => {\n if (!participant) {\n throw new ParameterError('Media status could not be extracted, participant is undefined.');\n }\n\n return {\n audio: participant.status?.audioStatus,\n video: participant.status?.videoStatus,\n };\n};\n\n/**\n * @param {Object} participant the locus participant\n * @returns {String}\n */\nMemberUtil.extractName = (participant: any) => {\n if (participant && participant.person) {\n return participant.person.name;\n }\n\n return null;\n};\n\nexport default MemberUtil;\n"],"mappings":";;;;;;;;AAAA;AAOA;AAiBA;AAEA,IAAMA,UAAe,GAAG,CAAC,CAAC;;AAE1B;AACA;AACA;AACA;AACAA,UAAU,CAACC,gBAAgB,GAAG,UAACC,WAAiC;EAAA;EAAA,OAC9DA,WAAW,aAAXA,WAAW,gDAAXA,WAAW,CAAEC,QAAQ,oFAArB,sBAAuBC,IAAI,2DAA3B,uBAA6BC,KAAK;AAAA;;AAEpC;AACA;AACA;AACA;AACA;AACAL,UAAU,CAACM,OAAO,GAAG,UAACJ,WAAgB,EAAEK,WAAwB;EAAA;EAAA,gCAC9DP,UAAU,CAACC,gBAAgB,CAACC,WAAW,CAAC,0DAAxC,sBAA0CM,IAAI,CAC5C,UAACJ,IAAI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AAIA,WAAW,IAAIA,WAAW,CAAC8B,MAAM,EAAE;IACrC,OAAO9B,WAAW,CAAC8B,MAAM,CAAC6D,IAAI;EAChC;EAEA,OAAO,IAAI;AACb,CAAC;AAAC,eAEa7F,UAAU;AAAA"}
|
|
@@ -73,5 +73,6 @@ declare const MeetingUtil: {
|
|
|
73
73
|
updateLocusWithDelta: (meeting: any, response: any) => any;
|
|
74
74
|
generateLocusDeltaRequest: (originalMeeting: any) => (originalOptions: any) => any;
|
|
75
75
|
selfSupportsFeature: (feature: SELF_POLICY, userPolicies: Record<SELF_POLICY, boolean>) => boolean;
|
|
76
|
+
parseInterpretationInfo: (meeting: any, meetingInfo: any) => void;
|
|
76
77
|
};
|
|
77
78
|
export default MeetingUtil;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webex/plugin-meetings",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.183",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
|
|
6
6
|
"contributors": [
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
"build": "yarn run -T tsc --declaration true --declarationDir ./dist/types"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@webex/plugin-meetings": "3.0.0-beta.
|
|
36
|
-
"@webex/test-helper-chai": "3.0.0-beta.
|
|
37
|
-
"@webex/test-helper-mocha": "3.0.0-beta.
|
|
38
|
-
"@webex/test-helper-mock-webex": "3.0.0-beta.
|
|
39
|
-
"@webex/test-helper-retry": "3.0.0-beta.
|
|
40
|
-
"@webex/test-helper-test-users": "3.0.0-beta.
|
|
35
|
+
"@webex/plugin-meetings": "3.0.0-beta.183",
|
|
36
|
+
"@webex/test-helper-chai": "3.0.0-beta.183",
|
|
37
|
+
"@webex/test-helper-mocha": "3.0.0-beta.183",
|
|
38
|
+
"@webex/test-helper-mock-webex": "3.0.0-beta.183",
|
|
39
|
+
"@webex/test-helper-retry": "3.0.0-beta.183",
|
|
40
|
+
"@webex/test-helper-test-users": "3.0.0-beta.183",
|
|
41
41
|
"chai": "^4.3.4",
|
|
42
42
|
"chai-as-promised": "^7.1.1",
|
|
43
43
|
"jsdom-global": "3.0.2",
|
|
@@ -46,19 +46,19 @@
|
|
|
46
46
|
"typescript": "^4.7.4"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@webex/common": "3.0.0-beta.
|
|
49
|
+
"@webex/common": "3.0.0-beta.183",
|
|
50
50
|
"@webex/internal-media-core": "1.39.1",
|
|
51
|
-
"@webex/internal-plugin-conversation": "3.0.0-beta.
|
|
52
|
-
"@webex/internal-plugin-device": "3.0.0-beta.
|
|
53
|
-
"@webex/internal-plugin-llm": "3.0.0-beta.
|
|
54
|
-
"@webex/internal-plugin-mercury": "3.0.0-beta.
|
|
55
|
-
"@webex/internal-plugin-metrics": "3.0.0-beta.
|
|
56
|
-
"@webex/internal-plugin-support": "3.0.0-beta.
|
|
57
|
-
"@webex/internal-plugin-user": "3.0.0-beta.
|
|
58
|
-
"@webex/media-helpers": "3.0.0-beta.
|
|
59
|
-
"@webex/plugin-people": "3.0.0-beta.
|
|
60
|
-
"@webex/plugin-rooms": "3.0.0-beta.
|
|
61
|
-
"@webex/webex-core": "3.0.0-beta.
|
|
51
|
+
"@webex/internal-plugin-conversation": "3.0.0-beta.183",
|
|
52
|
+
"@webex/internal-plugin-device": "3.0.0-beta.183",
|
|
53
|
+
"@webex/internal-plugin-llm": "3.0.0-beta.183",
|
|
54
|
+
"@webex/internal-plugin-mercury": "3.0.0-beta.183",
|
|
55
|
+
"@webex/internal-plugin-metrics": "3.0.0-beta.183",
|
|
56
|
+
"@webex/internal-plugin-support": "3.0.0-beta.183",
|
|
57
|
+
"@webex/internal-plugin-user": "3.0.0-beta.183",
|
|
58
|
+
"@webex/media-helpers": "3.0.0-beta.183",
|
|
59
|
+
"@webex/plugin-people": "3.0.0-beta.183",
|
|
60
|
+
"@webex/plugin-rooms": "3.0.0-beta.183",
|
|
61
|
+
"@webex/webex-core": "3.0.0-beta.183",
|
|
62
62
|
"ampersand-collection": "^2.0.2",
|
|
63
63
|
"bowser": "^2.11.0",
|
|
64
64
|
"btoa": "^1.2.1",
|
|
@@ -28,7 +28,9 @@ const SimultaneousInterpretation = WebexPlugin.extend({
|
|
|
28
28
|
selfParticipantId: 'string', // appears the self participant id
|
|
29
29
|
canManageInterpreters: 'boolean', // appears the ability to manage interpreters
|
|
30
30
|
supportLanguages: 'array', // appears the support languages
|
|
31
|
-
|
|
31
|
+
meetingSIEnabled: 'boolean', // appears the meeting support SI feature
|
|
32
|
+
hostSIEnabled: 'boolean', // appears the meeting host/interpreter feature of SI enabled
|
|
33
|
+
selfIsInterpreter: 'boolean', // current user is interpreter or not
|
|
32
34
|
},
|
|
33
35
|
derived: {
|
|
34
36
|
shouldQuerySupportLanguages: {
|
|
@@ -95,6 +97,18 @@ const SimultaneousInterpretation = WebexPlugin.extend({
|
|
|
95
97
|
updateHostSIEnabled(hostSIEnabled) {
|
|
96
98
|
this.set('hostSIEnabled', hostSIEnabled);
|
|
97
99
|
},
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Update whether the meeting support SI feature or not from meeting info
|
|
103
|
+
* @param {boolean} meetingSIEnabled
|
|
104
|
+
* @param {boolean} selfIsInterpreter
|
|
105
|
+
* @returns {void}
|
|
106
|
+
*/
|
|
107
|
+
updateMeetingSIEnabled(meetingSIEnabled: boolean, selfIsInterpreter): void {
|
|
108
|
+
this.set('meetingSIEnabled', meetingSIEnabled);
|
|
109
|
+
this.set('selfIsInterpreter', selfIsInterpreter);
|
|
110
|
+
},
|
|
111
|
+
|
|
98
112
|
/**
|
|
99
113
|
* Update the interpretation languages channels which user can choose to subscribe
|
|
100
114
|
* @param {Object} interpretation
|
package/src/meeting/index.ts
CHANGED
|
@@ -3201,9 +3201,7 @@ export default class Meeting extends StatelessWebexPlugin {
|
|
|
3201
3201
|
// Need to populate environment when sending CA event
|
|
3202
3202
|
this.environment = locusMeetingObject?.info.channel || webexMeetingInfo?.channel;
|
|
3203
3203
|
}
|
|
3204
|
-
|
|
3205
|
-
!!webexMeetingInfo?.meetingSiteSetting?.enableHostInterpreterControlSI
|
|
3206
|
-
);
|
|
3204
|
+
MeetingUtil.parseInterpretationInfo(this, webexMeetingInfo);
|
|
3207
3205
|
}
|
|
3208
3206
|
|
|
3209
3207
|
/**
|
package/src/meeting/util.ts
CHANGED
|
@@ -11,6 +11,7 @@ import {
|
|
|
11
11
|
DISPLAY_HINTS,
|
|
12
12
|
FULL_STATE,
|
|
13
13
|
SELF_POLICY,
|
|
14
|
+
EVENT_TRIGGERS,
|
|
14
15
|
} from '../constants';
|
|
15
16
|
import IntentToJoinError from '../common/errors/intent-to-join';
|
|
16
17
|
import JoinMeetingError from '../common/errors/join-meeting';
|
|
@@ -18,6 +19,7 @@ import ParameterError from '../common/errors/parameter';
|
|
|
18
19
|
import PermissionError from '../common/errors/permission';
|
|
19
20
|
import PasswordError from '../common/errors/password-error';
|
|
20
21
|
import CaptchaError from '../common/errors/captcha-error';
|
|
22
|
+
import Trigger from '../common/events/trigger-proxy';
|
|
21
23
|
|
|
22
24
|
const MeetingUtil = {
|
|
23
25
|
parseLocusJoin: (response) => {
|
|
@@ -566,6 +568,47 @@ const MeetingUtil = {
|
|
|
566
568
|
|
|
567
569
|
return userPolicies[feature];
|
|
568
570
|
},
|
|
571
|
+
|
|
572
|
+
parseInterpretationInfo: (meeting, meetingInfo) => {
|
|
573
|
+
if (!meeting || !meetingInfo) {
|
|
574
|
+
return;
|
|
575
|
+
}
|
|
576
|
+
const siInfo = meetingInfo.simultaneousInterpretation;
|
|
577
|
+
meeting.simultaneousInterpretation.updateMeetingSIEnabled(
|
|
578
|
+
!!meetingInfo.turnOnSimultaneousInterpretation,
|
|
579
|
+
!!siInfo?.currentSIInterpreter
|
|
580
|
+
);
|
|
581
|
+
const hostSIEnabled = !!(
|
|
582
|
+
meetingInfo.turnOnSimultaneousInterpretation &&
|
|
583
|
+
meetingInfo?.meetingSiteSetting?.enableHostInterpreterControlSI
|
|
584
|
+
);
|
|
585
|
+
meeting.simultaneousInterpretation.updateHostSIEnabled(hostSIEnabled);
|
|
586
|
+
|
|
587
|
+
function renameKey(obj, oldKey, newKey) {
|
|
588
|
+
if (oldKey in obj) {
|
|
589
|
+
obj[newKey] = obj[oldKey];
|
|
590
|
+
delete obj[oldKey];
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
if (siInfo) {
|
|
594
|
+
const lanuagesInfo = cloneDeep(siInfo.siLanguages);
|
|
595
|
+
for (const language of lanuagesInfo) {
|
|
596
|
+
renameKey(language, 'languageCode', 'languageName');
|
|
597
|
+
renameKey(language, 'languageGroupId', 'languageCode');
|
|
598
|
+
}
|
|
599
|
+
if (!meeting.simultaneousInterpretation?.siLanguages?.length) {
|
|
600
|
+
meeting.simultaneousInterpretation.updateInterpretation(lanuagesInfo);
|
|
601
|
+
}
|
|
602
|
+
}
|
|
603
|
+
Trigger.trigger(
|
|
604
|
+
this,
|
|
605
|
+
{
|
|
606
|
+
file: 'meeting/util',
|
|
607
|
+
function: 'parseInterpretationInfo',
|
|
608
|
+
},
|
|
609
|
+
EVENT_TRIGGERS.MEETING_INTERPRETATION_UPDATE
|
|
610
|
+
);
|
|
611
|
+
},
|
|
569
612
|
};
|
|
570
613
|
|
|
571
614
|
export default MeetingUtil;
|
package/src/member/util.ts
CHANGED
|
@@ -364,8 +364,8 @@ MemberUtil.extractMediaStatus = (participant: any): IMediaStatus => {
|
|
|
364
364
|
}
|
|
365
365
|
|
|
366
366
|
return {
|
|
367
|
-
audio: participant.status
|
|
368
|
-
video: participant.status
|
|
367
|
+
audio: participant.status?.audioStatus,
|
|
368
|
+
video: participant.status?.videoStatus,
|
|
369
369
|
};
|
|
370
370
|
};
|
|
371
371
|
|
|
@@ -83,6 +83,25 @@ describe('plugin-meetings', () => {
|
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
+
describe('#updateMeetingSIEnabled', () => {
|
|
87
|
+
it('update meeting SI feature is on or off, and self is scheduled interpreter or not', () => {
|
|
88
|
+
interpretation.updateMeetingSIEnabled(true, false);
|
|
89
|
+
|
|
90
|
+
assert.equal(interpretation.meetingSIEnabled, true);
|
|
91
|
+
assert.equal(interpretation.selfIsInterpreter, false);
|
|
92
|
+
|
|
93
|
+
interpretation.updateMeetingSIEnabled(true, true);
|
|
94
|
+
|
|
95
|
+
assert.equal(interpretation.meetingSIEnabled, true);
|
|
96
|
+
assert.equal(interpretation.selfIsInterpreter, true);
|
|
97
|
+
|
|
98
|
+
interpretation.updateMeetingSIEnabled(false, false);
|
|
99
|
+
|
|
100
|
+
assert.equal(interpretation.meetingSIEnabled, false);
|
|
101
|
+
assert.equal(interpretation.selfIsInterpreter, false);
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
|
|
86
105
|
describe('#updateInterpretation', () => {
|
|
87
106
|
const checkSILanguage = (siLanguage, expectResult) => {
|
|
88
107
|
return siLanguage?.languageCode === expectResult.languageCode && siLanguage?.languageName === expectResult.languageName
|