@webex/plugin-meetings 3.7.0-next.59 → 3.7.0-next.60
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 +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/locus-info/selfUtils.js +5 -0
- package/dist/locus-info/selfUtils.js.map +1 -1
- package/dist/meeting/muteState.js +1 -6
- package/dist/meeting/muteState.js.map +1 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/locus-info/selfUtils.ts +5 -0
- package/src/meeting/muteState.ts +1 -6
- package/test/unit/spec/locus-info/selfUtils.js +10 -0
- package/test/unit/spec/meeting/muteState.js +0 -24
package/dist/breakouts/index.js
CHANGED
|
@@ -1046,7 +1046,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
|
|
|
1046
1046
|
this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
|
|
1047
1047
|
}
|
|
1048
1048
|
},
|
|
1049
|
-
version: "3.7.0-next.
|
|
1049
|
+
version: "3.7.0-next.60"
|
|
1050
1050
|
});
|
|
1051
1051
|
var _default = exports.default = Breakouts;
|
|
1052
1052
|
//# sourceMappingURL=index.js.map
|
|
@@ -373,7 +373,7 @@ var SimultaneousInterpretation = _webexCore.WebexPlugin.extend({
|
|
|
373
373
|
throw error;
|
|
374
374
|
});
|
|
375
375
|
},
|
|
376
|
-
version: "3.7.0-next.
|
|
376
|
+
version: "3.7.0-next.60"
|
|
377
377
|
});
|
|
378
378
|
var _default = exports.default = SimultaneousInterpretation;
|
|
379
379
|
//# sourceMappingURL=index.js.map
|
|
@@ -18,7 +18,7 @@ var SILanguage = _webexCore.WebexPlugin.extend({
|
|
|
18
18
|
languageCode: 'number',
|
|
19
19
|
languageName: 'string'
|
|
20
20
|
},
|
|
21
|
-
version: "3.7.0-next.
|
|
21
|
+
version: "3.7.0-next.60"
|
|
22
22
|
});
|
|
23
23
|
var _default = exports.default = SILanguage;
|
|
24
24
|
//# sourceMappingURL=siLanguage.js.map
|
|
@@ -378,6 +378,11 @@ SelfUtils.mutedByOthersChanged = function (oldSelf, changedSelf) {
|
|
|
378
378
|
// we don't want to be sending the 'meeting:self:unmutedByOthers' notification on meeting join
|
|
379
379
|
return false;
|
|
380
380
|
}
|
|
381
|
+
|
|
382
|
+
// there is no need to trigger user update if no one muted user
|
|
383
|
+
if (changedSelf.selfIdentity === changedSelf.modifiedBy) {
|
|
384
|
+
return false;
|
|
385
|
+
}
|
|
381
386
|
return changedSelf.remoteMuted !== null && (oldSelf.remoteMuted !== changedSelf.remoteMuted || changedSelf.remoteMuted && oldSelf.unmuteAllowed !== changedSelf.unmuteAllowed);
|
|
382
387
|
};
|
|
383
388
|
SelfUtils.localAudioUnmuteRequestedByServer = function () {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_lodash","require","_constants","_parameter","_interopRequireDefault","SelfUtils","PSTN_DEVICE_TYPE","parse","self","deviceId","_joinedWith$intent","joinedWith","devices","find","device","url","pstnDevices","filter","deviceType","remoteVideoMuted","getRemoteVideoMuted","remoteMuted","getRemoteMuted","unmuteAllowed","getUnmuteAllowed","localAudioUnmuteRequested","getLocalAudioUnmuteRequested","localAudioUnmuteRequestedTimeStamp","getLocalAudioUnmuteRequestedTimeStamp","localAudioUnmuteRequired","getLocalAudioUnmuteRequired","lastModified","getLastModified","modifiedBy","getModifiedBy","guest","moderator","mediaStatus","getStatus","status","state","currentMediaStatus","getMediaStatus","mediaSessions","creator","isCreator","selfId","id","selfIdentity","getSelfIdentity","selfUrl","removed","roles","getRoles","isUserUnadmitted","_IDLE_","intent","type","_WAIT_","layout","getLayout","canNotViewTheParticipantList","isSharingBlocked","breakoutSessions","getBreakoutSessions","breakout","getBreakout","interpretation","getInterpretation","brb","getBrb","_self$controls","_self$controls$breako","controls","sessions","_self$controls2","_self$controls3","_self$controls4","_self$controls5","_isArray","default","layouts","undefined","_self$controls6","_self$controls6$role","role","reduce","hasRole","push","getSelves","oldSelf","newSelf","previous","current","updates","isUserAdmitted","isVideoMutedByOthersChanged","videoMutedByOthersChanged","isMutedByOthersChanged","mutedByOthersChanged","localAudioUnmuteRequestedByServer","localAudioUnmuteRequiredByServer","moderatorChanged","isRolesChanged","isMediaInactiveOrReleased","wasMediaInactiveOrReleased","isUserObserving","isDeviceObserving","layoutChanged","isMediaInactive","audioStateChange","audio","videoStateChange","video","shareStateChange","share","canNotViewTheParticipantListChanged","isSharingBlockedChanged","breakoutsChanged","interpretationChanged","brbChanged","isJoined","_JOINED_","isEqual","previousMediaStatus","MEDIA_STATE","inactive","direction","meta","person","muted","_self$controls7","_self$controls7$audio","requestedToUnmute","_self$controls8","_self$controls8$audio","Date","lastModifiedRequestedToUnmute","disallowUnmute","_self$controls9","_self$controls9$audio","audioStatus","videoStatus","slides","videoSlidesStatus","arguments","length","changedSelf","_LEFT_","reason","MEETING_END_REASON","INACTIVE","MEDIA_RELEASED","isLocusUserUnadmitted","check","_check$joinedWith","_check$joinedWith$int","isLocusUserAdmitted","_check$joinedWith2","_check$joinedWith2$in","ParameterError","_oldSelf$joinedWith","_oldSelf$joinedWith$i","_changedSelf$joinedWi","_changedSelf$joinedWi2","_MOVE_MEDIA_","_OBSERVE_","getSipUrl","partner","sipUri","_CALL_","sipUrl","media","mediaType","AUDIO","mediaContent","MediaContent","main","VIDEO","getReplacedBreakoutMoveId","joinedDevice","replaces","_joinedDevice$replace","breakoutMoveId","_default","exports"],"sources":["selfUtils.ts"],"sourcesContent":["/* eslint-disable default-param-last */\n\nimport {isEqual} from 'lodash';\nimport {\n _IDLE_,\n _JOINED_,\n _CALL_,\n _WAIT_,\n _MOVE_MEDIA_,\n _OBSERVE_,\n _LEFT_,\n MEETING_END_REASON,\n MEDIA_STATE,\n AUDIO,\n VIDEO,\n MediaContent,\n} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nconst SelfUtils: any = {};\nconst PSTN_DEVICE_TYPE = 'PROVISIONAL';\n\n/**\n * parses the relevant values for self: muted, guest, moderator, mediaStatus, state, joinedWith, pstnDevices, creator, id\n * @param {Object} self\n * @param {String} deviceId\n * @returns {undefined}\n */\nSelfUtils.parse = (self: any, deviceId: string) => {\n if (self) {\n const joinedWith = self.devices.find((device) => deviceId === device.url);\n const pstnDevices = self.devices.filter((device) => PSTN_DEVICE_TYPE === device.deviceType);\n\n return {\n remoteVideoMuted: SelfUtils.getRemoteVideoMuted(self),\n remoteMuted: SelfUtils.getRemoteMuted(self),\n unmuteAllowed: SelfUtils.getUnmuteAllowed(self),\n localAudioUnmuteRequested: SelfUtils.getLocalAudioUnmuteRequested(self),\n localAudioUnmuteRequestedTimeStamp: SelfUtils.getLocalAudioUnmuteRequestedTimeStamp(self),\n localAudioUnmuteRequired: SelfUtils.getLocalAudioUnmuteRequired(self),\n lastModified: SelfUtils.getLastModified(self),\n modifiedBy: SelfUtils.getModifiedBy(self),\n guest: self.guest,\n moderator: self.moderator,\n // cumulative media stats\n mediaStatus: SelfUtils.getStatus(self.status),\n // TODO: what should be the status if user has refreshed the page,\n // check the joinedWith parameter and communicate to the user\n state: self.state,\n // TODO: give a proper name . With same device as login or different login`\n // Some times we might have joined with both mobile and web\n joinedWith,\n pstnDevices,\n // current media stats is for the current device who has joined\n currentMediaStatus: SelfUtils.getMediaStatus(joinedWith?.mediaSessions),\n creator: self.isCreator, // check if its used,\n selfId: self.id,\n selfIdentity: SelfUtils.getSelfIdentity(self),\n selfUrl: self.url,\n removed: self.removed,\n roles: SelfUtils.getRoles(self),\n isUserUnadmitted: self.state === _IDLE_ && joinedWith?.intent?.type === _WAIT_,\n layout: SelfUtils.getLayout(self),\n canNotViewTheParticipantList: SelfUtils.canNotViewTheParticipantList(self),\n isSharingBlocked: SelfUtils.isSharingBlocked(self),\n breakoutSessions: SelfUtils.getBreakoutSessions(self),\n breakout: SelfUtils.getBreakout(self),\n interpretation: SelfUtils.getInterpretation(self),\n brb: SelfUtils.getBrb(self),\n };\n }\n\n return null;\n};\n\nSelfUtils.getBreakoutSessions = (self) => self?.controls?.breakout?.sessions;\nSelfUtils.getBreakout = (self) => self?.controls?.breakout;\nSelfUtils.getInterpretation = (self) => self?.controls?.interpretation;\nSelfUtils.getBrb = (self) => self?.controls?.brb;\n\nSelfUtils.getLayout = (self) =>\n Array.isArray(self?.controls?.layouts) ? self.controls.layouts[0].type : undefined;\n\nSelfUtils.getRoles = (self) =>\n (self?.controls?.role?.roles || []).reduce((roles, role) => {\n if (role.hasRole) {\n roles.push(role.type);\n }\n\n return roles;\n }, []);\n\nSelfUtils.canNotViewTheParticipantList = (self) => !!self?.canNotViewTheParticipantList;\n\nSelfUtils.isSharingBlocked = (self) => !!self?.isSharingBlocked;\n\nSelfUtils.getSelves = (oldSelf, newSelf, deviceId) => {\n const previous = oldSelf && SelfUtils.parse(oldSelf, deviceId);\n const current = newSelf && SelfUtils.parse(newSelf, deviceId);\n const updates: any = {};\n\n updates.isUserUnadmitted = SelfUtils.isUserUnadmitted(previous, current);\n updates.isUserAdmitted = SelfUtils.isUserAdmitted(previous, current);\n updates.isVideoMutedByOthersChanged = SelfUtils.videoMutedByOthersChanged(previous, current);\n updates.isMutedByOthersChanged = SelfUtils.mutedByOthersChanged(previous, current);\n updates.localAudioUnmuteRequestedByServer = SelfUtils.localAudioUnmuteRequestedByServer(\n previous,\n current\n );\n updates.localAudioUnmuteRequiredByServer = SelfUtils.localAudioUnmuteRequiredByServer(\n previous,\n current\n );\n updates.moderatorChanged = SelfUtils.moderatorChanged(previous, current);\n updates.isRolesChanged = SelfUtils.isRolesChanged(previous, current);\n updates.isMediaInactiveOrReleased = SelfUtils.wasMediaInactiveOrReleased(previous, current);\n updates.isUserObserving = SelfUtils.isDeviceObserving(previous, current);\n updates.layoutChanged = SelfUtils.layoutChanged(previous, current);\n\n updates.isMediaInactive = SelfUtils.isMediaInactive(previous, current);\n updates.audioStateChange =\n previous?.currentMediaStatus.audio !== current.currentMediaStatus.audio;\n updates.videoStateChange =\n previous?.currentMediaStatus.video !== current.currentMediaStatus.video;\n updates.shareStateChange =\n previous?.currentMediaStatus.share !== current.currentMediaStatus.share;\n\n updates.canNotViewTheParticipantListChanged =\n previous?.canNotViewTheParticipantList !== current.canNotViewTheParticipantList;\n updates.isSharingBlockedChanged = previous?.isSharingBlocked !== current.isSharingBlocked;\n updates.breakoutsChanged = SelfUtils.breakoutsChanged(previous, current);\n updates.interpretationChanged = SelfUtils.interpretationChanged(previous, current);\n updates.brbChanged = SelfUtils.brbChanged(previous, current);\n\n return {\n previous,\n current,\n updates,\n };\n};\n\n/**\n * Checks if user has joined the meeting\n * @param {Object} self\n * @returns {boolean} isJoined\n */\nSelfUtils.isJoined = (self: any) => self?.state === _JOINED_;\n\n/**\n * Validate if the Meeting Layout Controls Layout has changed.\n *\n * @param {Self} previous - Previous self state\n * @param {Self} current - Current self state [per event]\n * @returns {boolean} - If the Meeting Layout Controls Layout has changed.\n */\nSelfUtils.layoutChanged = (previous: any, current: any) =>\n current?.layout && previous?.layout !== current?.layout;\n\nSelfUtils.breakoutsChanged = (previous, current) =>\n !isEqual(previous?.breakoutSessions, current?.breakoutSessions) && !!current?.breakout;\n\nSelfUtils.interpretationChanged = (previous, current) =>\n !isEqual(previous?.interpretation, current?.interpretation) && !!current?.interpretation;\n\nSelfUtils.brbChanged = (previous, current) =>\n !isEqual(previous?.brb, current?.brb) && current?.brb !== undefined;\n\nSelfUtils.isMediaInactive = (previous, current) => {\n if (\n previous &&\n previous.joinedWith &&\n previous.joinedWith.mediaSessions &&\n current &&\n current.joinedWith &&\n current.joinedWith.mediaSessions\n ) {\n const previousMediaStatus = SelfUtils.getMediaStatus(previous.joinedWith.mediaSessions);\n const currentMediaStatus = SelfUtils.getMediaStatus(current.joinedWith.mediaSessions);\n\n if (\n previousMediaStatus.audio &&\n currentMediaStatus.audio &&\n previousMediaStatus.audio.state !== MEDIA_STATE.inactive &&\n currentMediaStatus.audio.state === MEDIA_STATE.inactive &&\n currentMediaStatus.audio.direction !== MEDIA_STATE.inactive\n ) {\n return true;\n }\n\n if (\n previousMediaStatus.video &&\n currentMediaStatus.video &&\n previousMediaStatus.video.state !== MEDIA_STATE.inactive &&\n currentMediaStatus.video.state === MEDIA_STATE.inactive &&\n currentMediaStatus.video.direction !== MEDIA_STATE.inactive\n ) {\n return true;\n }\n\n if (\n previousMediaStatus.share &&\n currentMediaStatus.share &&\n previousMediaStatus.share.state !== MEDIA_STATE.inactive &&\n currentMediaStatus.share.state === MEDIA_STATE.inactive &&\n currentMediaStatus.share.direction !== MEDIA_STATE.inactive\n ) {\n return true;\n }\n\n return false;\n }\n\n return false;\n};\n\nSelfUtils.getLastModified = (self) => {\n if (\n !self ||\n !self.controls ||\n !self.controls.audio ||\n !self.controls.audio.meta ||\n !self.controls.audio.meta.lastModified\n ) {\n return null;\n }\n\n return self.controls.audio.meta.lastModified;\n};\n\nSelfUtils.getModifiedBy = (self) => {\n if (\n !self ||\n !self.controls ||\n !self.controls.audio ||\n !self.controls.audio.meta ||\n !self.controls.audio.meta.modifiedBy\n ) {\n return null;\n }\n\n return self.controls.audio.meta.modifiedBy;\n};\n\n/**\n * get the id from the self object\n * @param {Object} self\n * @returns {String}\n */\nSelfUtils.getSelfIdentity = (self: any) => {\n if (!self && !self.person) {\n return null;\n }\n\n return self.person.id;\n};\n\n/**\n * get the \"remote video mute\" property from the self object\n * @param {Object} self\n * @returns {Boolean}\n */\nSelfUtils.getRemoteVideoMuted = (self: any) => {\n if (!self || !self.controls || !self.controls.video) {\n return null;\n }\n\n return self.controls.video.muted;\n};\n\n/**\n * get the \"remote mute\" property from the self object\n * @param {Object} self\n * @returns {Boolean}\n */\nSelfUtils.getRemoteMuted = (self: any) => {\n if (!self || !self.controls || !self.controls.audio) {\n return null;\n }\n\n return self.controls.audio.muted;\n};\n\nSelfUtils.getLocalAudioUnmuteRequested = (self) => !!self?.controls?.audio?.requestedToUnmute;\n\n// requestedToUnmute timestamp\nSelfUtils.getLocalAudioUnmuteRequestedTimeStamp = (self) =>\n Date.parse(self?.controls?.audio?.lastModifiedRequestedToUnmute) || 0;\n\nSelfUtils.getUnmuteAllowed = (self) => {\n if (!self || !self.controls || !self.controls.audio) {\n return null;\n }\n\n return !self.controls.audio.disallowUnmute;\n};\n\nSelfUtils.getLocalAudioUnmuteRequired = (self) => !!self?.controls?.audio?.localAudioUnmuteRequired;\n\nSelfUtils.getStatus = (status) => ({\n audio: status.audioStatus,\n video: status.videoStatus,\n slides: status.videoSlidesStatus,\n});\n\n/**\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n */\nSelfUtils.wasMediaInactiveOrReleased = (oldSelf: any = {}, changedSelf: any) =>\n oldSelf.joinedWith &&\n oldSelf.joinedWith.state === _JOINED_ &&\n changedSelf.joinedWith &&\n changedSelf.joinedWith.state === _LEFT_ &&\n (changedSelf.joinedWith.reason === MEETING_END_REASON.INACTIVE ||\n changedSelf.joinedWith.reason === MEETING_END_REASON.MEDIA_RELEASED);\n\n/**\n * @param {Object} check\n * @returns {Boolean}\n */\nSelfUtils.isLocusUserUnadmitted = (check: any) =>\n check && check.joinedWith?.intent?.type === _WAIT_ && check.state === _IDLE_;\n\n/**\n * @param {Object} check\n * @returns {Boolean}\n */\nSelfUtils.isLocusUserAdmitted = (check: any) =>\n check && check.joinedWith?.intent?.type !== _WAIT_ && check.state === _JOINED_;\n\n/**\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n * @throws {Error} when self is undefined\n */\nSelfUtils.isUserUnadmitted = (oldSelf: object, changedSelf: object) => {\n if (!changedSelf) {\n throw new ParameterError(\n 'changedSelf must be defined to determine if self is unadmitted as guest.'\n );\n }\n\n if (SelfUtils.isLocusUserUnadmitted(oldSelf)) {\n return false;\n }\n\n return SelfUtils.isLocusUserUnadmitted(changedSelf);\n};\n\nSelfUtils.moderatorChanged = (oldSelf, changedSelf) => {\n if (!oldSelf) {\n return true;\n }\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if self transitioned moderator status.'\n );\n }\n\n return oldSelf.moderator !== changedSelf.moderator;\n};\n\n/**\n * determine whether the roles of self is changed or not\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n */\nSelfUtils.isRolesChanged = (oldSelf, changedSelf) => {\n if (!changedSelf) {\n // no new self means no change\n return false;\n }\n\n return !isEqual(oldSelf?.roles, changedSelf?.roles);\n};\n/**\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n * @throws {Error} if changed self was undefined\n */\nSelfUtils.isDeviceObserving = (oldSelf: any, changedSelf: any) =>\n oldSelf &&\n oldSelf.joinedWith?.intent?.type === _MOVE_MEDIA_ &&\n changedSelf &&\n changedSelf.joinedWith?.intent?.type === _OBSERVE_;\n\n/**\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n * @throws {Error} if changed self was undefined\n */\nSelfUtils.isUserAdmitted = (oldSelf: object, changedSelf: object) => {\n if (!oldSelf) {\n // if there was no previous locus, it couldn't have been admitted yet\n return false;\n }\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if self transitioned to admitted as guest.'\n );\n }\n\n return SelfUtils.isLocusUserUnadmitted(oldSelf) && SelfUtils.isLocusUserAdmitted(changedSelf);\n};\n\nSelfUtils.videoMutedByOthersChanged = (oldSelf, changedSelf) => {\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if self was video muted by others.'\n );\n }\n\n if (!oldSelf || oldSelf.remoteVideoMuted === null) {\n if (changedSelf.remoteVideoMuted) {\n return true; // this happens when host disables \"Allow start video\"\n }\n\n // we don't want to be sending the 'meeting:self:videoUnmutedByOthers' notification on meeting join\n return false;\n }\n\n return oldSelf.remoteVideoMuted !== changedSelf.remoteVideoMuted;\n};\n\nSelfUtils.mutedByOthersChanged = (oldSelf, changedSelf) => {\n if (!changedSelf) {\n throw new ParameterError('New self must be defined to determine if self was muted by others.');\n }\n\n if (!oldSelf || oldSelf.remoteMuted === null) {\n if (changedSelf.remoteMuted) {\n return true; // this happens when mute on-entry is enabled\n }\n\n // we don't want to be sending the 'meeting:self:unmutedByOthers' notification on meeting join\n return false;\n }\n\n return (\n changedSelf.remoteMuted !== null &&\n (oldSelf.remoteMuted !== changedSelf.remoteMuted ||\n (changedSelf.remoteMuted && oldSelf.unmuteAllowed !== changedSelf.unmuteAllowed))\n );\n};\n\nSelfUtils.localAudioUnmuteRequestedByServer = (oldSelf: any = {}, changedSelf: any) => {\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if self received request to unmute.'\n );\n }\n\n return (\n changedSelf.localAudioUnmuteRequested &&\n changedSelf.localAudioUnmuteRequestedTimeStamp > oldSelf.localAudioUnmuteRequestedTimeStamp\n );\n};\n\nSelfUtils.localAudioUnmuteRequiredByServer = (oldSelf: any = {}, changedSelf: any) => {\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if localAudioUnmuteRequired changed.'\n );\n }\n\n return (\n !changedSelf.remoteMuted &&\n changedSelf.localAudioUnmuteRequired &&\n oldSelf.localAudioUnmuteRequired !== changedSelf.localAudioUnmuteRequired\n );\n};\n\n/**\n * extract the sipUrl from the partner\n * @param {Object} partner\n * @param {Object} info\n * @returns {Object}\n */\n\nSelfUtils.getSipUrl = (partner: any, type, sipUri) => {\n // For webex meeting the sipUrl gets updated in info parser\n if (partner && type === _CALL_) {\n return {sipUri: partner.person.sipUrl || partner.person.id};\n }\n\n return {sipUri};\n};\n\nSelfUtils.getMediaStatus = (mediaSessions = []) => {\n const mediaStatus = {\n audio: {},\n video: {},\n share: {},\n };\n\n mediaStatus.audio = mediaSessions.find(\n (media) => media.mediaType === AUDIO && media.mediaContent === MediaContent.main\n );\n mediaStatus.video = mediaSessions.find(\n (media) => media.mediaType === VIDEO && media.mediaContent === MediaContent.main\n );\n mediaStatus.share = mediaSessions.find(\n (media) => media.mediaType === VIDEO && media.mediaContent === MediaContent.slides\n );\n\n return mediaStatus;\n};\n\nSelfUtils.getReplacedBreakoutMoveId = (self: any, deviceId: string) => {\n if (self && Array.isArray(self.devices)) {\n const joinedDevice = self.devices.find((device) => deviceId === device.url);\n if (Array.isArray(joinedDevice?.replaces)) {\n return joinedDevice.replaces[0]?.breakoutMoveId;\n }\n }\n\n return null;\n};\nexport default SelfUtils;\n"],"mappings":";;;;;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAcA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAjBA;;AAmBA,IAAMI,SAAc,GAAG,CAAC,CAAC;AACzB,IAAMC,gBAAgB,GAAG,aAAa;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACAD,SAAS,CAACE,KAAK,GAAG,UAACC,IAAS,EAAEC,QAAgB,EAAK;EACjD,IAAID,IAAI,EAAE;IAAA,IAAAE,kBAAA;IACR,IAAMC,UAAU,GAAGH,IAAI,CAACI,OAAO,CAACC,IAAI,CAAC,UAACC,MAAM;MAAA,OAAKL,QAAQ,KAAKK,MAAM,CAACC,GAAG;IAAA,EAAC;IACzE,IAAMC,WAAW,GAAGR,IAAI,CAACI,OAAO,CAACK,MAAM,CAAC,UAACH,MAAM;MAAA,OAAKR,gBAAgB,KAAKQ,MAAM,CAACI,UAAU;IAAA,EAAC;IAE3F,OAAO;MACLC,gBAAgB,EAAEd,SAAS,CAACe,mBAAmB,CAACZ,IAAI,CAAC;MACrDa,WAAW,EAAEhB,SAAS,CAACiB,cAAc,CAACd,IAAI,CAAC;MAC3Ce,aAAa,EAAElB,SAAS,CAACmB,gBAAgB,CAAChB,IAAI,CAAC;MAC/CiB,yBAAyB,EAAEpB,SAAS,CAACqB,4BAA4B,CAAClB,IAAI,CAAC;MACvEmB,kCAAkC,EAAEtB,SAAS,CAACuB,qCAAqC,CAACpB,IAAI,CAAC;MACzFqB,wBAAwB,EAAExB,SAAS,CAACyB,2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":3,"names":["_lodash","require","_constants","_parameter","_interopRequireDefault","SelfUtils","PSTN_DEVICE_TYPE","parse","self","deviceId","_joinedWith$intent","joinedWith","devices","find","device","url","pstnDevices","filter","deviceType","remoteVideoMuted","getRemoteVideoMuted","remoteMuted","getRemoteMuted","unmuteAllowed","getUnmuteAllowed","localAudioUnmuteRequested","getLocalAudioUnmuteRequested","localAudioUnmuteRequestedTimeStamp","getLocalAudioUnmuteRequestedTimeStamp","localAudioUnmuteRequired","getLocalAudioUnmuteRequired","lastModified","getLastModified","modifiedBy","getModifiedBy","guest","moderator","mediaStatus","getStatus","status","state","currentMediaStatus","getMediaStatus","mediaSessions","creator","isCreator","selfId","id","selfIdentity","getSelfIdentity","selfUrl","removed","roles","getRoles","isUserUnadmitted","_IDLE_","intent","type","_WAIT_","layout","getLayout","canNotViewTheParticipantList","isSharingBlocked","breakoutSessions","getBreakoutSessions","breakout","getBreakout","interpretation","getInterpretation","brb","getBrb","_self$controls","_self$controls$breako","controls","sessions","_self$controls2","_self$controls3","_self$controls4","_self$controls5","_isArray","default","layouts","undefined","_self$controls6","_self$controls6$role","role","reduce","hasRole","push","getSelves","oldSelf","newSelf","previous","current","updates","isUserAdmitted","isVideoMutedByOthersChanged","videoMutedByOthersChanged","isMutedByOthersChanged","mutedByOthersChanged","localAudioUnmuteRequestedByServer","localAudioUnmuteRequiredByServer","moderatorChanged","isRolesChanged","isMediaInactiveOrReleased","wasMediaInactiveOrReleased","isUserObserving","isDeviceObserving","layoutChanged","isMediaInactive","audioStateChange","audio","videoStateChange","video","shareStateChange","share","canNotViewTheParticipantListChanged","isSharingBlockedChanged","breakoutsChanged","interpretationChanged","brbChanged","isJoined","_JOINED_","isEqual","previousMediaStatus","MEDIA_STATE","inactive","direction","meta","person","muted","_self$controls7","_self$controls7$audio","requestedToUnmute","_self$controls8","_self$controls8$audio","Date","lastModifiedRequestedToUnmute","disallowUnmute","_self$controls9","_self$controls9$audio","audioStatus","videoStatus","slides","videoSlidesStatus","arguments","length","changedSelf","_LEFT_","reason","MEETING_END_REASON","INACTIVE","MEDIA_RELEASED","isLocusUserUnadmitted","check","_check$joinedWith","_check$joinedWith$int","isLocusUserAdmitted","_check$joinedWith2","_check$joinedWith2$in","ParameterError","_oldSelf$joinedWith","_oldSelf$joinedWith$i","_changedSelf$joinedWi","_changedSelf$joinedWi2","_MOVE_MEDIA_","_OBSERVE_","getSipUrl","partner","sipUri","_CALL_","sipUrl","media","mediaType","AUDIO","mediaContent","MediaContent","main","VIDEO","getReplacedBreakoutMoveId","joinedDevice","replaces","_joinedDevice$replace","breakoutMoveId","_default","exports"],"sources":["selfUtils.ts"],"sourcesContent":["/* eslint-disable default-param-last */\n\nimport {isEqual} from 'lodash';\nimport {\n _IDLE_,\n _JOINED_,\n _CALL_,\n _WAIT_,\n _MOVE_MEDIA_,\n _OBSERVE_,\n _LEFT_,\n MEETING_END_REASON,\n MEDIA_STATE,\n AUDIO,\n VIDEO,\n MediaContent,\n} from '../constants';\nimport ParameterError from '../common/errors/parameter';\n\nconst SelfUtils: any = {};\nconst PSTN_DEVICE_TYPE = 'PROVISIONAL';\n\n/**\n * parses the relevant values for self: muted, guest, moderator, mediaStatus, state, joinedWith, pstnDevices, creator, id\n * @param {Object} self\n * @param {String} deviceId\n * @returns {undefined}\n */\nSelfUtils.parse = (self: any, deviceId: string) => {\n if (self) {\n const joinedWith = self.devices.find((device) => deviceId === device.url);\n const pstnDevices = self.devices.filter((device) => PSTN_DEVICE_TYPE === device.deviceType);\n\n return {\n remoteVideoMuted: SelfUtils.getRemoteVideoMuted(self),\n remoteMuted: SelfUtils.getRemoteMuted(self),\n unmuteAllowed: SelfUtils.getUnmuteAllowed(self),\n localAudioUnmuteRequested: SelfUtils.getLocalAudioUnmuteRequested(self),\n localAudioUnmuteRequestedTimeStamp: SelfUtils.getLocalAudioUnmuteRequestedTimeStamp(self),\n localAudioUnmuteRequired: SelfUtils.getLocalAudioUnmuteRequired(self),\n lastModified: SelfUtils.getLastModified(self),\n modifiedBy: SelfUtils.getModifiedBy(self),\n guest: self.guest,\n moderator: self.moderator,\n // cumulative media stats\n mediaStatus: SelfUtils.getStatus(self.status),\n // TODO: what should be the status if user has refreshed the page,\n // check the joinedWith parameter and communicate to the user\n state: self.state,\n // TODO: give a proper name . With same device as login or different login`\n // Some times we might have joined with both mobile and web\n joinedWith,\n pstnDevices,\n // current media stats is for the current device who has joined\n currentMediaStatus: SelfUtils.getMediaStatus(joinedWith?.mediaSessions),\n creator: self.isCreator, // check if its used,\n selfId: self.id,\n selfIdentity: SelfUtils.getSelfIdentity(self),\n selfUrl: self.url,\n removed: self.removed,\n roles: SelfUtils.getRoles(self),\n isUserUnadmitted: self.state === _IDLE_ && joinedWith?.intent?.type === _WAIT_,\n layout: SelfUtils.getLayout(self),\n canNotViewTheParticipantList: SelfUtils.canNotViewTheParticipantList(self),\n isSharingBlocked: SelfUtils.isSharingBlocked(self),\n breakoutSessions: SelfUtils.getBreakoutSessions(self),\n breakout: SelfUtils.getBreakout(self),\n interpretation: SelfUtils.getInterpretation(self),\n brb: SelfUtils.getBrb(self),\n };\n }\n\n return null;\n};\n\nSelfUtils.getBreakoutSessions = (self) => self?.controls?.breakout?.sessions;\nSelfUtils.getBreakout = (self) => self?.controls?.breakout;\nSelfUtils.getInterpretation = (self) => self?.controls?.interpretation;\nSelfUtils.getBrb = (self) => self?.controls?.brb;\n\nSelfUtils.getLayout = (self) =>\n Array.isArray(self?.controls?.layouts) ? self.controls.layouts[0].type : undefined;\n\nSelfUtils.getRoles = (self) =>\n (self?.controls?.role?.roles || []).reduce((roles, role) => {\n if (role.hasRole) {\n roles.push(role.type);\n }\n\n return roles;\n }, []);\n\nSelfUtils.canNotViewTheParticipantList = (self) => !!self?.canNotViewTheParticipantList;\n\nSelfUtils.isSharingBlocked = (self) => !!self?.isSharingBlocked;\n\nSelfUtils.getSelves = (oldSelf, newSelf, deviceId) => {\n const previous = oldSelf && SelfUtils.parse(oldSelf, deviceId);\n const current = newSelf && SelfUtils.parse(newSelf, deviceId);\n const updates: any = {};\n\n updates.isUserUnadmitted = SelfUtils.isUserUnadmitted(previous, current);\n updates.isUserAdmitted = SelfUtils.isUserAdmitted(previous, current);\n updates.isVideoMutedByOthersChanged = SelfUtils.videoMutedByOthersChanged(previous, current);\n updates.isMutedByOthersChanged = SelfUtils.mutedByOthersChanged(previous, current);\n updates.localAudioUnmuteRequestedByServer = SelfUtils.localAudioUnmuteRequestedByServer(\n previous,\n current\n );\n updates.localAudioUnmuteRequiredByServer = SelfUtils.localAudioUnmuteRequiredByServer(\n previous,\n current\n );\n updates.moderatorChanged = SelfUtils.moderatorChanged(previous, current);\n updates.isRolesChanged = SelfUtils.isRolesChanged(previous, current);\n updates.isMediaInactiveOrReleased = SelfUtils.wasMediaInactiveOrReleased(previous, current);\n updates.isUserObserving = SelfUtils.isDeviceObserving(previous, current);\n updates.layoutChanged = SelfUtils.layoutChanged(previous, current);\n\n updates.isMediaInactive = SelfUtils.isMediaInactive(previous, current);\n updates.audioStateChange =\n previous?.currentMediaStatus.audio !== current.currentMediaStatus.audio;\n updates.videoStateChange =\n previous?.currentMediaStatus.video !== current.currentMediaStatus.video;\n updates.shareStateChange =\n previous?.currentMediaStatus.share !== current.currentMediaStatus.share;\n\n updates.canNotViewTheParticipantListChanged =\n previous?.canNotViewTheParticipantList !== current.canNotViewTheParticipantList;\n updates.isSharingBlockedChanged = previous?.isSharingBlocked !== current.isSharingBlocked;\n updates.breakoutsChanged = SelfUtils.breakoutsChanged(previous, current);\n updates.interpretationChanged = SelfUtils.interpretationChanged(previous, current);\n updates.brbChanged = SelfUtils.brbChanged(previous, current);\n\n return {\n previous,\n current,\n updates,\n };\n};\n\n/**\n * Checks if user has joined the meeting\n * @param {Object} self\n * @returns {boolean} isJoined\n */\nSelfUtils.isJoined = (self: any) => self?.state === _JOINED_;\n\n/**\n * Validate if the Meeting Layout Controls Layout has changed.\n *\n * @param {Self} previous - Previous self state\n * @param {Self} current - Current self state [per event]\n * @returns {boolean} - If the Meeting Layout Controls Layout has changed.\n */\nSelfUtils.layoutChanged = (previous: any, current: any) =>\n current?.layout && previous?.layout !== current?.layout;\n\nSelfUtils.breakoutsChanged = (previous, current) =>\n !isEqual(previous?.breakoutSessions, current?.breakoutSessions) && !!current?.breakout;\n\nSelfUtils.interpretationChanged = (previous, current) =>\n !isEqual(previous?.interpretation, current?.interpretation) && !!current?.interpretation;\n\nSelfUtils.brbChanged = (previous, current) =>\n !isEqual(previous?.brb, current?.brb) && current?.brb !== undefined;\n\nSelfUtils.isMediaInactive = (previous, current) => {\n if (\n previous &&\n previous.joinedWith &&\n previous.joinedWith.mediaSessions &&\n current &&\n current.joinedWith &&\n current.joinedWith.mediaSessions\n ) {\n const previousMediaStatus = SelfUtils.getMediaStatus(previous.joinedWith.mediaSessions);\n const currentMediaStatus = SelfUtils.getMediaStatus(current.joinedWith.mediaSessions);\n\n if (\n previousMediaStatus.audio &&\n currentMediaStatus.audio &&\n previousMediaStatus.audio.state !== MEDIA_STATE.inactive &&\n currentMediaStatus.audio.state === MEDIA_STATE.inactive &&\n currentMediaStatus.audio.direction !== MEDIA_STATE.inactive\n ) {\n return true;\n }\n\n if (\n previousMediaStatus.video &&\n currentMediaStatus.video &&\n previousMediaStatus.video.state !== MEDIA_STATE.inactive &&\n currentMediaStatus.video.state === MEDIA_STATE.inactive &&\n currentMediaStatus.video.direction !== MEDIA_STATE.inactive\n ) {\n return true;\n }\n\n if (\n previousMediaStatus.share &&\n currentMediaStatus.share &&\n previousMediaStatus.share.state !== MEDIA_STATE.inactive &&\n currentMediaStatus.share.state === MEDIA_STATE.inactive &&\n currentMediaStatus.share.direction !== MEDIA_STATE.inactive\n ) {\n return true;\n }\n\n return false;\n }\n\n return false;\n};\n\nSelfUtils.getLastModified = (self) => {\n if (\n !self ||\n !self.controls ||\n !self.controls.audio ||\n !self.controls.audio.meta ||\n !self.controls.audio.meta.lastModified\n ) {\n return null;\n }\n\n return self.controls.audio.meta.lastModified;\n};\n\nSelfUtils.getModifiedBy = (self) => {\n if (\n !self ||\n !self.controls ||\n !self.controls.audio ||\n !self.controls.audio.meta ||\n !self.controls.audio.meta.modifiedBy\n ) {\n return null;\n }\n\n return self.controls.audio.meta.modifiedBy;\n};\n\n/**\n * get the id from the self object\n * @param {Object} self\n * @returns {String}\n */\nSelfUtils.getSelfIdentity = (self: any) => {\n if (!self && !self.person) {\n return null;\n }\n\n return self.person.id;\n};\n\n/**\n * get the \"remote video mute\" property from the self object\n * @param {Object} self\n * @returns {Boolean}\n */\nSelfUtils.getRemoteVideoMuted = (self: any) => {\n if (!self || !self.controls || !self.controls.video) {\n return null;\n }\n\n return self.controls.video.muted;\n};\n\n/**\n * get the \"remote mute\" property from the self object\n * @param {Object} self\n * @returns {Boolean}\n */\nSelfUtils.getRemoteMuted = (self: any) => {\n if (!self || !self.controls || !self.controls.audio) {\n return null;\n }\n\n return self.controls.audio.muted;\n};\n\nSelfUtils.getLocalAudioUnmuteRequested = (self) => !!self?.controls?.audio?.requestedToUnmute;\n\n// requestedToUnmute timestamp\nSelfUtils.getLocalAudioUnmuteRequestedTimeStamp = (self) =>\n Date.parse(self?.controls?.audio?.lastModifiedRequestedToUnmute) || 0;\n\nSelfUtils.getUnmuteAllowed = (self) => {\n if (!self || !self.controls || !self.controls.audio) {\n return null;\n }\n\n return !self.controls.audio.disallowUnmute;\n};\n\nSelfUtils.getLocalAudioUnmuteRequired = (self) => !!self?.controls?.audio?.localAudioUnmuteRequired;\n\nSelfUtils.getStatus = (status) => ({\n audio: status.audioStatus,\n video: status.videoStatus,\n slides: status.videoSlidesStatus,\n});\n\n/**\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n */\nSelfUtils.wasMediaInactiveOrReleased = (oldSelf: any = {}, changedSelf: any) =>\n oldSelf.joinedWith &&\n oldSelf.joinedWith.state === _JOINED_ &&\n changedSelf.joinedWith &&\n changedSelf.joinedWith.state === _LEFT_ &&\n (changedSelf.joinedWith.reason === MEETING_END_REASON.INACTIVE ||\n changedSelf.joinedWith.reason === MEETING_END_REASON.MEDIA_RELEASED);\n\n/**\n * @param {Object} check\n * @returns {Boolean}\n */\nSelfUtils.isLocusUserUnadmitted = (check: any) =>\n check && check.joinedWith?.intent?.type === _WAIT_ && check.state === _IDLE_;\n\n/**\n * @param {Object} check\n * @returns {Boolean}\n */\nSelfUtils.isLocusUserAdmitted = (check: any) =>\n check && check.joinedWith?.intent?.type !== _WAIT_ && check.state === _JOINED_;\n\n/**\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n * @throws {Error} when self is undefined\n */\nSelfUtils.isUserUnadmitted = (oldSelf: object, changedSelf: object) => {\n if (!changedSelf) {\n throw new ParameterError(\n 'changedSelf must be defined to determine if self is unadmitted as guest.'\n );\n }\n\n if (SelfUtils.isLocusUserUnadmitted(oldSelf)) {\n return false;\n }\n\n return SelfUtils.isLocusUserUnadmitted(changedSelf);\n};\n\nSelfUtils.moderatorChanged = (oldSelf, changedSelf) => {\n if (!oldSelf) {\n return true;\n }\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if self transitioned moderator status.'\n );\n }\n\n return oldSelf.moderator !== changedSelf.moderator;\n};\n\n/**\n * determine whether the roles of self is changed or not\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n */\nSelfUtils.isRolesChanged = (oldSelf, changedSelf) => {\n if (!changedSelf) {\n // no new self means no change\n return false;\n }\n\n return !isEqual(oldSelf?.roles, changedSelf?.roles);\n};\n/**\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n * @throws {Error} if changed self was undefined\n */\nSelfUtils.isDeviceObserving = (oldSelf: any, changedSelf: any) =>\n oldSelf &&\n oldSelf.joinedWith?.intent?.type === _MOVE_MEDIA_ &&\n changedSelf &&\n changedSelf.joinedWith?.intent?.type === _OBSERVE_;\n\n/**\n * @param {Object} oldSelf\n * @param {Object} changedSelf\n * @returns {Boolean}\n * @throws {Error} if changed self was undefined\n */\nSelfUtils.isUserAdmitted = (oldSelf: object, changedSelf: object) => {\n if (!oldSelf) {\n // if there was no previous locus, it couldn't have been admitted yet\n return false;\n }\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if self transitioned to admitted as guest.'\n );\n }\n\n return SelfUtils.isLocusUserUnadmitted(oldSelf) && SelfUtils.isLocusUserAdmitted(changedSelf);\n};\n\nSelfUtils.videoMutedByOthersChanged = (oldSelf, changedSelf) => {\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if self was video muted by others.'\n );\n }\n\n if (!oldSelf || oldSelf.remoteVideoMuted === null) {\n if (changedSelf.remoteVideoMuted) {\n return true; // this happens when host disables \"Allow start video\"\n }\n\n // we don't want to be sending the 'meeting:self:videoUnmutedByOthers' notification on meeting join\n return false;\n }\n\n return oldSelf.remoteVideoMuted !== changedSelf.remoteVideoMuted;\n};\n\nSelfUtils.mutedByOthersChanged = (oldSelf, changedSelf) => {\n if (!changedSelf) {\n throw new ParameterError('New self must be defined to determine if self was muted by others.');\n }\n\n if (!oldSelf || oldSelf.remoteMuted === null) {\n if (changedSelf.remoteMuted) {\n return true; // this happens when mute on-entry is enabled\n }\n\n // we don't want to be sending the 'meeting:self:unmutedByOthers' notification on meeting join\n return false;\n }\n\n // there is no need to trigger user update if no one muted user\n if (changedSelf.selfIdentity === changedSelf.modifiedBy) {\n return false;\n }\n\n return (\n changedSelf.remoteMuted !== null &&\n (oldSelf.remoteMuted !== changedSelf.remoteMuted ||\n (changedSelf.remoteMuted && oldSelf.unmuteAllowed !== changedSelf.unmuteAllowed))\n );\n};\n\nSelfUtils.localAudioUnmuteRequestedByServer = (oldSelf: any = {}, changedSelf: any) => {\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if self received request to unmute.'\n );\n }\n\n return (\n changedSelf.localAudioUnmuteRequested &&\n changedSelf.localAudioUnmuteRequestedTimeStamp > oldSelf.localAudioUnmuteRequestedTimeStamp\n );\n};\n\nSelfUtils.localAudioUnmuteRequiredByServer = (oldSelf: any = {}, changedSelf: any) => {\n if (!changedSelf) {\n throw new ParameterError(\n 'New self must be defined to determine if localAudioUnmuteRequired changed.'\n );\n }\n\n return (\n !changedSelf.remoteMuted &&\n changedSelf.localAudioUnmuteRequired &&\n oldSelf.localAudioUnmuteRequired !== changedSelf.localAudioUnmuteRequired\n );\n};\n\n/**\n * extract the sipUrl from the partner\n * @param {Object} partner\n * @param {Object} info\n * @returns {Object}\n */\n\nSelfUtils.getSipUrl = (partner: any, type, sipUri) => {\n // For webex meeting the sipUrl gets updated in info parser\n if (partner && type === _CALL_) {\n return {sipUri: partner.person.sipUrl || partner.person.id};\n }\n\n return {sipUri};\n};\n\nSelfUtils.getMediaStatus = (mediaSessions = []) => {\n const mediaStatus = {\n audio: {},\n video: {},\n share: {},\n };\n\n mediaStatus.audio = mediaSessions.find(\n (media) => media.mediaType === AUDIO && media.mediaContent === MediaContent.main\n );\n mediaStatus.video = mediaSessions.find(\n (media) => media.mediaType === VIDEO && media.mediaContent === MediaContent.main\n );\n mediaStatus.share = mediaSessions.find(\n (media) => media.mediaType === VIDEO && media.mediaContent === MediaContent.slides\n );\n\n return mediaStatus;\n};\n\nSelfUtils.getReplacedBreakoutMoveId = (self: any, deviceId: string) => {\n if (self && Array.isArray(self.devices)) {\n const joinedDevice = self.devices.find((device) => deviceId === device.url);\n if (Array.isArray(joinedDevice?.replaces)) {\n return joinedDevice.replaces[0]?.breakoutMoveId;\n }\n }\n\n return null;\n};\nexport default SelfUtils;\n"],"mappings":";;;;;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAcA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AAjBA;;AAmBA,IAAMI,SAAc,GAAG,CAAC,CAAC;AACzB,IAAMC,gBAAgB,GAAG,aAAa;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACAD,SAAS,CAACE,KAAK,GAAG,U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AK;IAAA,OAAKA,KAAK,CAACC,SAAS,KAAKK,gBAAK,IAAIN,KAAK,CAACG,YAAY,KAAKC,uBAAY,CAACjC,MAAM;EAAA,CACpF,CAAC;EAED,OAAO1G,WAAW;AACpB,CAAC;AAEDhC,SAAS,CAAC8K,yBAAyB,GAAG,UAAC3K,IAAS,EAAEC,QAAgB,EAAK;EACrE,IAAID,IAAI,IAAI,IAAAuE,QAAA,CAAAC,OAAA,EAAcxE,IAAI,CAACI,OAAO,CAAC,EAAE;IACvC,IAAMwK,YAAY,GAAG5K,IAAI,CAACI,OAAO,CAACC,IAAI,CAAC,UAACC,MAAM;MAAA,OAAKL,QAAQ,KAAKK,MAAM,CAACC,GAAG;IAAA,EAAC;IAC3E,IAAI,IAAAgE,QAAA,CAAAC,OAAA,EAAcoG,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAEC,QAAQ,CAAC,EAAE;MAAA,IAAAC,qBAAA;MACzC,QAAAA,qBAAA,GAAOF,YAAY,CAACC,QAAQ,CAAC,CAAC,CAAC,cAAAC,qBAAA,uBAAxBA,qBAAA,CAA0BC,cAAc;IACjD;EACF;EAEA,OAAO,IAAI;AACb,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAzG,OAAA,GACa3E,SAAS"}
|
|
@@ -342,12 +342,7 @@ var MuteState = exports.MuteState = /*#__PURE__*/function () {
|
|
|
342
342
|
}
|
|
343
343
|
if (muted !== undefined) {
|
|
344
344
|
this.state.server.remoteMute = muted;
|
|
345
|
-
|
|
346
|
-
// We never want to unmute the local stream from a server remote mute update.
|
|
347
|
-
// Moderated unmute is handled by a different function.
|
|
348
|
-
if (muted) {
|
|
349
|
-
this.muteLocalStream(meeting, muted, 'remotelyMuted');
|
|
350
|
-
}
|
|
345
|
+
this.muteLocalStream(meeting, muted, 'remotelyMuted');
|
|
351
346
|
}
|
|
352
347
|
}
|
|
353
348
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_loggerProxy","_interopRequireDefault","require","_parameter","_util","_constants","createMuteState","exports","type","meeting","enabled","LoggerProxy","logger","info","concat","id","muteState","MuteState","_meeting$remoteVideoM","_meeting$unmuteVideoA","_classCallCheck2","default","_defineProperty2","AUDIO","VIDEO","ParameterError","ignoreMuteStateChange","state","client","localMute","server","remoteMute","remoteMuted","remoteVideoMuted","unmuteAllowed","unmuteVideoAllowed","syncToServerInProgress","_createClass2","key","value","init","_meeting$mediaPropert","_meeting$mediaPropert2","applyUnmuteAllowedToStream","muteLocalStream","initialMute","mediaProperties","audioStream","muted","videoStream","undefined","applyClientStateToServer","handleLocalStreamChange","enable","mute","reason","_meeting$mediaPropert3","setServerMuted","_meeting$mediaPropert4","handleLocalStreamMuteStateChange","newMuteState","userMuteState","systemMuteState","_meeting$mediaPropert5","_meeting$mediaPropert6","_meeting$mediaPropert7","userMuted","systemMuted","_meeting$mediaPropert8","_meeting$mediaPropert9","_meeting$mediaPropert10","applyClientStateLocally","getClientLocalMuteState","_this","localMuteState","localMuteRequiresSync","remoteMuteRequiresSync","localMuteSyncPromise","sendLocalMuteRequestToServer","_promise","resolve","then","sendRemoteMuteRequestToServer","catch","e","warn","_this2","audioMuted","videoMuted","MeetingUtil","remoteUpdateAudioVideo","locus","locusInfo","handleLocusDelta","remoteUpdateError","reject","_this3","members","muteMember","selfId","_meeting$mediaPropert11","setUnmuteAllowed","_meeting$mediaPropert12","handleServerRemoteMuteUpdate","handleServerLocalUnmuteRequired","_meeting$mediaPropert13","_meeting$mediaPropert14","isMuted","isRemotelyMuted","isUnmuteAllowed","isLocallyMuted"],"sources":["muteState.ts"],"sourcesContent":["import {ServerMuteReason} from '@webex/media-helpers';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\nimport MeetingUtil from './util';\nimport {AUDIO, VIDEO} from '../constants';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const createMuteState = (type, meeting, enabled: boolean) => {\n // todo: remove the meeting argument (SPARK-399695)\n\n LoggerProxy.logger.info(\n `Meeting:muteState#createMuteState --> ${type}: creating MuteState for meeting id ${meeting?.id}`\n );\n\n const muteState = new MuteState(type, meeting, enabled);\n\n return muteState;\n};\n\n/** The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches\n the last requested state by the client.\n\n More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#\n\n This class is exported only for unit tests. It should never be instantiated directly with new MuteState(), instead createMuteState() should be called\n*/\nexport class MuteState {\n state: {\n client: {\n enabled: boolean; // indicates if audio/video is enabled at all or not\n localMute: boolean;\n };\n server: {localMute: boolean; remoteMute: boolean; unmuteAllowed: boolean};\n syncToServerInProgress: boolean;\n };\n\n type: any;\n ignoreMuteStateChange: boolean;\n\n /**\n * Constructor\n *\n * @param {String} type - audio or video\n * @param {Object} meeting - the meeting object (used for reading current remote mute status)\n * @param {boolean} enabled - whether the client audio/video is enabled at all\n */\n constructor(type: string, meeting: any, enabled: boolean) {\n if (type !== AUDIO && type !== VIDEO) {\n throw new ParameterError('Mute state is designed for handling audio or video only');\n }\n this.type = type;\n this.ignoreMuteStateChange = false;\n this.state = {\n client: {\n enabled,\n localMute: true,\n },\n server: {\n localMute: true,\n // because remoteVideoMuted and unmuteVideoAllowed are updated seperately, they might be undefined\n remoteMute: type === AUDIO ? meeting.remoteMuted : meeting.remoteVideoMuted ?? false,\n unmuteAllowed: type === AUDIO ? meeting.unmuteAllowed : meeting.unmuteVideoAllowed ?? true,\n },\n syncToServerInProgress: false,\n };\n }\n\n /**\n * Starts the mute state machine. Needs to be called after a new MuteState instance is created.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public init(meeting: any) {\n this.applyUnmuteAllowedToStream(meeting);\n\n // if we are remotely muted, we need to apply that to the local stream now (mute on-entry)\n if (this.state.server.remoteMute) {\n this.muteLocalStream(meeting, this.state.server.remoteMute, 'remotelyMuted');\n }\n\n const initialMute =\n this.type === AUDIO\n ? meeting.mediaProperties.audioStream?.muted\n : meeting.mediaProperties.videoStream?.muted;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#init --> ${this.type}: local stream initial mute state: ${initialMute}`\n );\n\n if (initialMute !== undefined) {\n this.state.client.localMute = initialMute;\n } else {\n // there is no stream, so it's like we are locally muted\n // (this is important especially for transcoded meetings, in which the SDP m-line direction always stays \"sendrecv\")\n this.state.client.localMute = true;\n }\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * This method needs to be called whenever the local audio/video stream has changed.\n * It reapplies the remote mute state onto the new stream and also reads the current\n * local mute state from the stream and updates the internal state machine and sends\n * any required requests to the server.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public handleLocalStreamChange(meeting: any) {\n return this.init(meeting);\n }\n\n /**\n * Enables/disables audio/video\n *\n * @param {Object} meeting - the meeting object\n * @param {boolean} enable\n * @returns {void}\n */\n public enable(meeting: any, enable: boolean) {\n this.state.client.enabled = enable;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Mutes/unmutes local stream\n *\n * @param {Object} meeting - the meeting object\n * @param {Boolean} mute - true to mute the stream, false to unmute it\n * @param {ServerMuteReason} reason - reason for muting/unmuting\n * @returns {void}\n */\n private muteLocalStream(meeting: any, mute: boolean, reason: ServerMuteReason) {\n this.ignoreMuteStateChange = true;\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioStream?.setServerMuted(mute, reason);\n } else {\n meeting.mediaProperties.videoStream?.setServerMuted(mute, reason);\n }\n this.ignoreMuteStateChange = false;\n }\n\n /**\n * This method should be called when the local stream mute state is changed\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [mute] true for muting, false for unmuting request\n * @returns {void}\n */\n public handleLocalStreamMuteStateChange(meeting?: any) {\n if (this.ignoreMuteStateChange) {\n return;\n }\n\n // either user or system may have triggered a mute state change, but localMute should reflect both\n let newMuteState: boolean;\n let userMuteState: boolean;\n let systemMuteState: boolean;\n if (this.type === AUDIO) {\n newMuteState = meeting.mediaProperties.audioStream?.muted;\n userMuteState = meeting.mediaProperties.audioStream?.userMuted;\n systemMuteState = meeting.mediaProperties.audioStream?.systemMuted;\n } else {\n newMuteState = meeting.mediaProperties.videoStream?.muted;\n userMuteState = meeting.mediaProperties.videoStream?.userMuted;\n systemMuteState = meeting.mediaProperties.videoStream?.systemMuted;\n }\n\n LoggerProxy.logger.info(\n `Meeting:muteState#handleLocalStreamMuteStateChange --> ${this.type}: local stream new mute state: ${newMuteState} (user mute: ${userMuteState}, system mute: ${systemMuteState})`\n );\n\n this.state.client.localMute = newMuteState;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Applies the current mute state to the local stream (by enabling or disabling it accordingly)\n *\n * @public\n * @param {Object} [meeting] the meeting object\n * @param {ServerMuteReason} reason - reason why we're applying our client state to the local stream\n * @memberof MuteState\n * @returns {void}\n */\n public applyClientStateLocally(meeting?: any, reason?: ServerMuteReason) {\n this.muteLocalStream(meeting, this.state.client.localMute, reason);\n }\n\n /** Returns true if client is locally muted - it takes into account not just the client local mute state,\n * but also whether audio/video is enabled at all\n *\n * @returns {boolean}\n */\n private getClientLocalMuteState() {\n return this.state.client.enabled ? this.state.client.localMute : true;\n }\n\n /**\n * Updates the server local and remote mute values so that they match the current client desired state.\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n private applyClientStateToServer(meeting?: any) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`\n );\n\n return;\n }\n\n const localMuteState = this.getClientLocalMuteState();\n const localMuteRequiresSync = localMuteState !== this.state.server.localMute;\n const remoteMuteRequiresSync = !localMuteState && this.state.server.remoteMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: localMuteRequiresSync: ${localMuteRequiresSync} (${localMuteState} ?= ${this.state.server.localMute})`\n );\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: remoteMuteRequiresSync: ${remoteMuteRequiresSync}`\n );\n\n if (!localMuteRequiresSync && !remoteMuteRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: client state already matching server state, nothing to do`\n );\n\n return;\n }\n\n this.state.syncToServerInProgress = true;\n\n // first sync local mute with server\n const localMuteSyncPromise = localMuteRequiresSync\n ? this.sendLocalMuteRequestToServer(meeting)\n : Promise.resolve();\n\n localMuteSyncPromise\n .then(() =>\n // then follow it up with remote mute sync\n remoteMuteRequiresSync ? this.sendRemoteMuteRequestToServer(meeting) : Promise.resolve()\n )\n .then(() => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(meeting);\n })\n .catch((e) => {\n this.state.syncToServerInProgress = false;\n\n LoggerProxy.logger.warn(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: error: ${e}`\n );\n\n // failed to apply client state to server, so revert stream mute state to server state\n this.muteLocalStream(\n meeting,\n this.state.server.localMute || this.state.server.remoteMute,\n 'clientRequestFailed'\n );\n });\n }\n\n /**\n * Sets the local mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendLocalMuteRequestToServer(meeting?: any) {\n const audioMuted = this.type === AUDIO ? this.getClientLocalMuteState() : undefined;\n const videoMuted = this.type === VIDEO ? this.getClientLocalMuteState() : undefined;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: sending local mute (audio=${audioMuted}, video=${videoMuted}) to server`\n );\n\n return MeetingUtil.remoteUpdateAudioVideo(meeting, audioMuted, videoMuted)\n .then((locus) => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: local mute (audio=${audioMuted}, video=${videoMuted}) applied to server`\n );\n\n this.state.server.localMute = this.type === AUDIO ? audioMuted : videoMuted;\n\n if (locus) {\n meeting.locusInfo.handleLocusDelta(locus, meeting);\n }\n\n return locus;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: failed to apply local mute (audio=${audioMuted}, video=${videoMuted}) to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /**\n * Sets the remote mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendRemoteMuteRequestToServer(meeting?: any) {\n const remoteMute = this.getClientLocalMuteState();\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: sending remote mute:${remoteMute} to server`\n );\n\n return meeting.members\n .muteMember(meeting.members.selfId, remoteMute, this.type === AUDIO)\n .then(() => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: remote mute:${remoteMute} applied to server`\n );\n\n this.state.server.remoteMute = remoteMute;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: failed to apply remote mute ${remoteMute} to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /** Applies the current value for unmute allowed to the underlying stream\n *\n * @param {Meeting} meeting\n * @returns {void}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n private applyUnmuteAllowedToStream(meeting: any) {\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioStream?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n } else {\n meeting.mediaProperties.videoStream?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n }\n }\n\n /**\n * This method should be called whenever the server remote mute state is changed\n *\n * @public\n * @memberof MuteState\n * @param {Meeting} meeting\n * @param {Boolean} [muted] true if user is remotely muted, false otherwise\n * @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when \"hard mute\" feature is used)\n * @returns {undefined}\n */\n public handleServerRemoteMuteUpdate(meeting: any, muted?: boolean, unmuteAllowed?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`\n );\n if (unmuteAllowed !== undefined) {\n this.state.server.unmuteAllowed = unmuteAllowed;\n this.applyUnmuteAllowedToStream(meeting);\n }\n if (muted !== undefined) {\n this.state.server.remoteMute = muted;\n\n // We never want to unmute the local stream from a server remote mute update.\n // Moderated unmute is handled by a different function.\n if (muted) {\n this.muteLocalStream(meeting, muted, 'remotelyMuted');\n }\n }\n }\n\n /**\n * This method should be called whenever we receive from the server a requirement to locally unmute\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [unmuteAllowed] whether the user is allowed to unmute self\n * @returns {undefined}\n */\n public handleServerLocalUnmuteRequired(meeting: any, unmuteAllowed: boolean) {\n if (!this.state.client.enabled) {\n LoggerProxy.logger.warn(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received while ${this.type} is disabled -> local unmute will not result in ${this.type} being sent`\n );\n } else {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute (unmuteAllowed=${unmuteAllowed})`\n );\n }\n\n // todo: I'm seeing \"you can now unmute yourself \" popup when this happens - but same thing happens on web.w.c so we can ignore for now\n this.state.server.remoteMute = false;\n this.state.server.unmuteAllowed = unmuteAllowed;\n\n this.applyUnmuteAllowedToStream(meeting);\n\n // change user mute state to false, but keep localMute true if overall mute state is still true\n this.muteLocalStream(meeting, false, 'localUnmuteRequired');\n if (this.type === AUDIO) {\n this.state.client.localMute = meeting.mediaProperties.audioStream?.muted;\n } else {\n this.state.client.localMute = meeting.mediaProperties.videoStream?.muted;\n }\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Returns true if the user is locally or remotely muted.\n * It only checks the mute status, ignoring the fact whether audio/video is enabled.\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isMuted() {\n return (\n this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute\n );\n }\n\n /**\n * Returns true if the user is remotely muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isRemotelyMuted() {\n return this.state.server.remoteMute;\n }\n\n /**\n * Returns true if unmute is allowed\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isUnmuteAllowed() {\n return this.state.server.unmuteAllowed;\n }\n\n /**\n * Returns true if the user is locally muted or audio/video is disabled\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isLocallyMuted() {\n return this.getClientLocalMuteState();\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAEA;AACO,IAAMI,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,SAAlBA,eAAeA,CAAIE,IAAI,EAAEC,OAAO,EAAEC,OAAgB,EAAK;EAClE;;EAEAC,oBAAW,CAACC,MAAM,CAACC,IAAI,0CAAAC,MAAA,CACoBN,IAAI,0CAAAM,MAAA,CAAuCL,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEM,EAAE,CACjG,CAAC;EAED,IAAMC,SAAS,GAAG,IAAIC,SAAS,CAACT,IAAI,EAAEC,OAAO,EAAEC,OAAO,CAAC;EAEvD,OAAOM,SAAS;AAClB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AANA,IAOaC,SAAS,GAAAV,OAAA,CAAAU,SAAA;EAapB;AACF;AACA;AACA;AACA;AACA;AACA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F;AACA;AACA;AACA;AACA;AACA;EANE;IAAAI,GAAA;IAAAC,KAAA,EAOA,SAAAuE,eAAA,EAAwB;MACtB,OAAO,IAAI,CAACtC,uBAAuB,CAAC,CAAC;IACvC;EAAC;EAAA,OAAAvD,SAAA;AAAA"}
|
|
1
|
+
{"version":3,"names":["_loggerProxy","_interopRequireDefault","require","_parameter","_util","_constants","createMuteState","exports","type","meeting","enabled","LoggerProxy","logger","info","concat","id","muteState","MuteState","_meeting$remoteVideoM","_meeting$unmuteVideoA","_classCallCheck2","default","_defineProperty2","AUDIO","VIDEO","ParameterError","ignoreMuteStateChange","state","client","localMute","server","remoteMute","remoteMuted","remoteVideoMuted","unmuteAllowed","unmuteVideoAllowed","syncToServerInProgress","_createClass2","key","value","init","_meeting$mediaPropert","_meeting$mediaPropert2","applyUnmuteAllowedToStream","muteLocalStream","initialMute","mediaProperties","audioStream","muted","videoStream","undefined","applyClientStateToServer","handleLocalStreamChange","enable","mute","reason","_meeting$mediaPropert3","setServerMuted","_meeting$mediaPropert4","handleLocalStreamMuteStateChange","newMuteState","userMuteState","systemMuteState","_meeting$mediaPropert5","_meeting$mediaPropert6","_meeting$mediaPropert7","userMuted","systemMuted","_meeting$mediaPropert8","_meeting$mediaPropert9","_meeting$mediaPropert10","applyClientStateLocally","getClientLocalMuteState","_this","localMuteState","localMuteRequiresSync","remoteMuteRequiresSync","localMuteSyncPromise","sendLocalMuteRequestToServer","_promise","resolve","then","sendRemoteMuteRequestToServer","catch","e","warn","_this2","audioMuted","videoMuted","MeetingUtil","remoteUpdateAudioVideo","locus","locusInfo","handleLocusDelta","remoteUpdateError","reject","_this3","members","muteMember","selfId","_meeting$mediaPropert11","setUnmuteAllowed","_meeting$mediaPropert12","handleServerRemoteMuteUpdate","handleServerLocalUnmuteRequired","_meeting$mediaPropert13","_meeting$mediaPropert14","isMuted","isRemotelyMuted","isUnmuteAllowed","isLocallyMuted"],"sources":["muteState.ts"],"sourcesContent":["import {ServerMuteReason} from '@webex/media-helpers';\nimport LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\nimport MeetingUtil from './util';\nimport {AUDIO, VIDEO} from '../constants';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const createMuteState = (type, meeting, enabled: boolean) => {\n // todo: remove the meeting argument (SPARK-399695)\n\n LoggerProxy.logger.info(\n `Meeting:muteState#createMuteState --> ${type}: creating MuteState for meeting id ${meeting?.id}`\n );\n\n const muteState = new MuteState(type, meeting, enabled);\n\n return muteState;\n};\n\n/** The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches\n the last requested state by the client.\n\n More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#\n\n This class is exported only for unit tests. It should never be instantiated directly with new MuteState(), instead createMuteState() should be called\n*/\nexport class MuteState {\n state: {\n client: {\n enabled: boolean; // indicates if audio/video is enabled at all or not\n localMute: boolean;\n };\n server: {localMute: boolean; remoteMute: boolean; unmuteAllowed: boolean};\n syncToServerInProgress: boolean;\n };\n\n type: any;\n ignoreMuteStateChange: boolean;\n\n /**\n * Constructor\n *\n * @param {String} type - audio or video\n * @param {Object} meeting - the meeting object (used for reading current remote mute status)\n * @param {boolean} enabled - whether the client audio/video is enabled at all\n */\n constructor(type: string, meeting: any, enabled: boolean) {\n if (type !== AUDIO && type !== VIDEO) {\n throw new ParameterError('Mute state is designed for handling audio or video only');\n }\n this.type = type;\n this.ignoreMuteStateChange = false;\n this.state = {\n client: {\n enabled,\n localMute: true,\n },\n server: {\n localMute: true,\n // because remoteVideoMuted and unmuteVideoAllowed are updated seperately, they might be undefined\n remoteMute: type === AUDIO ? meeting.remoteMuted : meeting.remoteVideoMuted ?? false,\n unmuteAllowed: type === AUDIO ? meeting.unmuteAllowed : meeting.unmuteVideoAllowed ?? true,\n },\n syncToServerInProgress: false,\n };\n }\n\n /**\n * Starts the mute state machine. Needs to be called after a new MuteState instance is created.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public init(meeting: any) {\n this.applyUnmuteAllowedToStream(meeting);\n\n // if we are remotely muted, we need to apply that to the local stream now (mute on-entry)\n if (this.state.server.remoteMute) {\n this.muteLocalStream(meeting, this.state.server.remoteMute, 'remotelyMuted');\n }\n\n const initialMute =\n this.type === AUDIO\n ? meeting.mediaProperties.audioStream?.muted\n : meeting.mediaProperties.videoStream?.muted;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#init --> ${this.type}: local stream initial mute state: ${initialMute}`\n );\n\n if (initialMute !== undefined) {\n this.state.client.localMute = initialMute;\n } else {\n // there is no stream, so it's like we are locally muted\n // (this is important especially for transcoded meetings, in which the SDP m-line direction always stays \"sendrecv\")\n this.state.client.localMute = true;\n }\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * This method needs to be called whenever the local audio/video stream has changed.\n * It reapplies the remote mute state onto the new stream and also reads the current\n * local mute state from the stream and updates the internal state machine and sends\n * any required requests to the server.\n *\n * @param {Object} meeting - the meeting object\n * @returns {void}\n */\n public handleLocalStreamChange(meeting: any) {\n return this.init(meeting);\n }\n\n /**\n * Enables/disables audio/video\n *\n * @param {Object} meeting - the meeting object\n * @param {boolean} enable\n * @returns {void}\n */\n public enable(meeting: any, enable: boolean) {\n this.state.client.enabled = enable;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Mutes/unmutes local stream\n *\n * @param {Object} meeting - the meeting object\n * @param {Boolean} mute - true to mute the stream, false to unmute it\n * @param {ServerMuteReason} reason - reason for muting/unmuting\n * @returns {void}\n */\n private muteLocalStream(meeting: any, mute: boolean, reason: ServerMuteReason) {\n this.ignoreMuteStateChange = true;\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioStream?.setServerMuted(mute, reason);\n } else {\n meeting.mediaProperties.videoStream?.setServerMuted(mute, reason);\n }\n this.ignoreMuteStateChange = false;\n }\n\n /**\n * This method should be called when the local stream mute state is changed\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [mute] true for muting, false for unmuting request\n * @returns {void}\n */\n public handleLocalStreamMuteStateChange(meeting?: any) {\n if (this.ignoreMuteStateChange) {\n return;\n }\n\n // either user or system may have triggered a mute state change, but localMute should reflect both\n let newMuteState: boolean;\n let userMuteState: boolean;\n let systemMuteState: boolean;\n if (this.type === AUDIO) {\n newMuteState = meeting.mediaProperties.audioStream?.muted;\n userMuteState = meeting.mediaProperties.audioStream?.userMuted;\n systemMuteState = meeting.mediaProperties.audioStream?.systemMuted;\n } else {\n newMuteState = meeting.mediaProperties.videoStream?.muted;\n userMuteState = meeting.mediaProperties.videoStream?.userMuted;\n systemMuteState = meeting.mediaProperties.videoStream?.systemMuted;\n }\n\n LoggerProxy.logger.info(\n `Meeting:muteState#handleLocalStreamMuteStateChange --> ${this.type}: local stream new mute state: ${newMuteState} (user mute: ${userMuteState}, system mute: ${systemMuteState})`\n );\n\n this.state.client.localMute = newMuteState;\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Applies the current mute state to the local stream (by enabling or disabling it accordingly)\n *\n * @public\n * @param {Object} [meeting] the meeting object\n * @param {ServerMuteReason} reason - reason why we're applying our client state to the local stream\n * @memberof MuteState\n * @returns {void}\n */\n public applyClientStateLocally(meeting?: any, reason?: ServerMuteReason) {\n this.muteLocalStream(meeting, this.state.client.localMute, reason);\n }\n\n /** Returns true if client is locally muted - it takes into account not just the client local mute state,\n * but also whether audio/video is enabled at all\n *\n * @returns {boolean}\n */\n private getClientLocalMuteState() {\n return this.state.client.enabled ? this.state.client.localMute : true;\n }\n\n /**\n * Updates the server local and remote mute values so that they match the current client desired state.\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n private applyClientStateToServer(meeting?: any) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`\n );\n\n return;\n }\n\n const localMuteState = this.getClientLocalMuteState();\n const localMuteRequiresSync = localMuteState !== this.state.server.localMute;\n const remoteMuteRequiresSync = !localMuteState && this.state.server.remoteMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: localMuteRequiresSync: ${localMuteRequiresSync} (${localMuteState} ?= ${this.state.server.localMute})`\n );\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: remoteMuteRequiresSync: ${remoteMuteRequiresSync}`\n );\n\n if (!localMuteRequiresSync && !remoteMuteRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: client state already matching server state, nothing to do`\n );\n\n return;\n }\n\n this.state.syncToServerInProgress = true;\n\n // first sync local mute with server\n const localMuteSyncPromise = localMuteRequiresSync\n ? this.sendLocalMuteRequestToServer(meeting)\n : Promise.resolve();\n\n localMuteSyncPromise\n .then(() =>\n // then follow it up with remote mute sync\n remoteMuteRequiresSync ? this.sendRemoteMuteRequestToServer(meeting) : Promise.resolve()\n )\n .then(() => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(meeting);\n })\n .catch((e) => {\n this.state.syncToServerInProgress = false;\n\n LoggerProxy.logger.warn(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: error: ${e}`\n );\n\n // failed to apply client state to server, so revert stream mute state to server state\n this.muteLocalStream(\n meeting,\n this.state.server.localMute || this.state.server.remoteMute,\n 'clientRequestFailed'\n );\n });\n }\n\n /**\n * Sets the local mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendLocalMuteRequestToServer(meeting?: any) {\n const audioMuted = this.type === AUDIO ? this.getClientLocalMuteState() : undefined;\n const videoMuted = this.type === VIDEO ? this.getClientLocalMuteState() : undefined;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: sending local mute (audio=${audioMuted}, video=${videoMuted}) to server`\n );\n\n return MeetingUtil.remoteUpdateAudioVideo(meeting, audioMuted, videoMuted)\n .then((locus) => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: local mute (audio=${audioMuted}, video=${videoMuted}) applied to server`\n );\n\n this.state.server.localMute = this.type === AUDIO ? audioMuted : videoMuted;\n\n if (locus) {\n meeting.locusInfo.handleLocusDelta(locus, meeting);\n }\n\n return locus;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: failed to apply local mute (audio=${audioMuted}, video=${videoMuted}) to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /**\n * Sets the remote mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendRemoteMuteRequestToServer(meeting?: any) {\n const remoteMute = this.getClientLocalMuteState();\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: sending remote mute:${remoteMute} to server`\n );\n\n return meeting.members\n .muteMember(meeting.members.selfId, remoteMute, this.type === AUDIO)\n .then(() => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: remote mute:${remoteMute} applied to server`\n );\n\n this.state.server.remoteMute = remoteMute;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: failed to apply remote mute ${remoteMute} to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /** Applies the current value for unmute allowed to the underlying stream\n *\n * @param {Meeting} meeting\n * @returns {void}\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n private applyUnmuteAllowedToStream(meeting: any) {\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioStream?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n } else {\n meeting.mediaProperties.videoStream?.setUnmuteAllowed(this.state.server.unmuteAllowed);\n }\n }\n\n /**\n * This method should be called whenever the server remote mute state is changed\n *\n * @public\n * @memberof MuteState\n * @param {Meeting} meeting\n * @param {Boolean} [muted] true if user is remotely muted, false otherwise\n * @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when \"hard mute\" feature is used)\n * @returns {undefined}\n */\n public handleServerRemoteMuteUpdate(meeting: any, muted?: boolean, unmuteAllowed?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`\n );\n if (unmuteAllowed !== undefined) {\n this.state.server.unmuteAllowed = unmuteAllowed;\n this.applyUnmuteAllowedToStream(meeting);\n }\n if (muted !== undefined) {\n this.state.server.remoteMute = muted;\n this.muteLocalStream(meeting, muted, 'remotelyMuted');\n }\n }\n\n /**\n * This method should be called whenever we receive from the server a requirement to locally unmute\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [unmuteAllowed] whether the user is allowed to unmute self\n * @returns {undefined}\n */\n public handleServerLocalUnmuteRequired(meeting: any, unmuteAllowed: boolean) {\n if (!this.state.client.enabled) {\n LoggerProxy.logger.warn(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received while ${this.type} is disabled -> local unmute will not result in ${this.type} being sent`\n );\n } else {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute (unmuteAllowed=${unmuteAllowed})`\n );\n }\n\n // todo: I'm seeing \"you can now unmute yourself \" popup when this happens - but same thing happens on web.w.c so we can ignore for now\n this.state.server.remoteMute = false;\n this.state.server.unmuteAllowed = unmuteAllowed;\n\n this.applyUnmuteAllowedToStream(meeting);\n\n // change user mute state to false, but keep localMute true if overall mute state is still true\n this.muteLocalStream(meeting, false, 'localUnmuteRequired');\n if (this.type === AUDIO) {\n this.state.client.localMute = meeting.mediaProperties.audioStream?.muted;\n } else {\n this.state.client.localMute = meeting.mediaProperties.videoStream?.muted;\n }\n\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Returns true if the user is locally or remotely muted.\n * It only checks the mute status, ignoring the fact whether audio/video is enabled.\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isMuted() {\n return (\n this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute\n );\n }\n\n /**\n * Returns true if the user is remotely muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isRemotelyMuted() {\n return this.state.server.remoteMute;\n }\n\n /**\n * Returns true if unmute is allowed\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isUnmuteAllowed() {\n return this.state.server.unmuteAllowed;\n }\n\n /**\n * Returns true if the user is locally muted or audio/video is disabled\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isLocallyMuted() {\n return this.getClientLocalMuteState();\n }\n}\n"],"mappings":";;;;;;;;;;;;AACA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,KAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AAEA;AACO,IAAMI,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,SAAlBA,eAAeA,CAAIE,IAAI,EAAEC,OAAO,EAAEC,OAAgB,EAAK;EAClE;;EAEAC,oBAAW,CAACC,MAAM,CAACC,IAAI,0CAAAC,MAAA,CACoBN,IAAI,0CAAAM,MAAA,CAAuCL,OAAO,aAAPA,OAAO,uBAAPA,OAAO,CAAEM,EAAE,CACjG,CAAC;EAED,IAAMC,SAAS,GAAG,IAAIC,SAAS,CAACT,IAAI,EAAEC,OAAO,EAAEC,OAAO,CAAC;EA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A,EAOA,SAAAsE,gBAAA,EAAyB;MACvB,OAAO,IAAI,CAAClF,KAAK,CAACG,MAAM,CAACI,aAAa;IACxC;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAAI,GAAA;IAAAC,KAAA,EAOA,SAAAuE,eAAA,EAAwB;MACtB,OAAO,IAAI,CAACtC,uBAAuB,CAAC,CAAC;IACvC;EAAC;EAAA,OAAAvD,SAAA;AAAA"}
|
package/dist/webinar/index.js
CHANGED
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@webex/eslint-config-legacy": "0.0.0",
|
|
44
44
|
"@webex/jest-config-legacy": "0.0.0",
|
|
45
45
|
"@webex/legacy-tools": "0.0.0",
|
|
46
|
-
"@webex/plugin-meetings": "3.7.0-next.
|
|
46
|
+
"@webex/plugin-meetings": "3.7.0-next.60",
|
|
47
47
|
"@webex/plugin-rooms": "3.7.0-next.22",
|
|
48
48
|
"@webex/test-helper-chai": "3.7.0-next.16",
|
|
49
49
|
"@webex/test-helper-mocha": "3.7.0-next.16",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@webex/internal-plugin-metrics": "3.7.0-next.16",
|
|
72
72
|
"@webex/internal-plugin-support": "3.7.0-next.23",
|
|
73
73
|
"@webex/internal-plugin-user": "3.7.0-next.16",
|
|
74
|
-
"@webex/internal-plugin-voicea": "3.7.0-next.
|
|
74
|
+
"@webex/internal-plugin-voicea": "3.7.0-next.60",
|
|
75
75
|
"@webex/media-helpers": "3.7.0-next.22",
|
|
76
76
|
"@webex/plugin-people": "3.7.0-next.20",
|
|
77
77
|
"@webex/plugin-rooms": "3.7.0-next.22",
|
|
@@ -92,5 +92,5 @@
|
|
|
92
92
|
"//": [
|
|
93
93
|
"TODO: upgrade jwt-decode when moving to node 18"
|
|
94
94
|
],
|
|
95
|
-
"version": "3.7.0-next.
|
|
95
|
+
"version": "3.7.0-next.60"
|
|
96
96
|
}
|
|
@@ -441,6 +441,11 @@ SelfUtils.mutedByOthersChanged = (oldSelf, changedSelf) => {
|
|
|
441
441
|
return false;
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
+
// there is no need to trigger user update if no one muted user
|
|
445
|
+
if (changedSelf.selfIdentity === changedSelf.modifiedBy) {
|
|
446
|
+
return false;
|
|
447
|
+
}
|
|
448
|
+
|
|
444
449
|
return (
|
|
445
450
|
changedSelf.remoteMuted !== null &&
|
|
446
451
|
(oldSelf.remoteMuted !== changedSelf.remoteMuted ||
|
package/src/meeting/muteState.ts
CHANGED
|
@@ -379,12 +379,7 @@ export class MuteState {
|
|
|
379
379
|
}
|
|
380
380
|
if (muted !== undefined) {
|
|
381
381
|
this.state.server.remoteMute = muted;
|
|
382
|
-
|
|
383
|
-
// We never want to unmute the local stream from a server remote mute update.
|
|
384
|
-
// Moderated unmute is handled by a different function.
|
|
385
|
-
if (muted) {
|
|
386
|
-
this.muteLocalStream(meeting, muted, 'remotelyMuted');
|
|
387
|
-
}
|
|
382
|
+
this.muteLocalStream(meeting, muted, 'remotelyMuted');
|
|
388
383
|
}
|
|
389
384
|
}
|
|
390
385
|
|
|
@@ -450,6 +450,16 @@ describe('plugin-meetings', () => {
|
|
|
450
450
|
assert.equal(SelfUtils.mutedByOthersChanged(null, {remoteMuted: true}), true);
|
|
451
451
|
});
|
|
452
452
|
|
|
453
|
+
it('should return false when selfIdentity and modifiedBy are the same', function () {
|
|
454
|
+
assert.equal(
|
|
455
|
+
SelfUtils.mutedByOthersChanged(
|
|
456
|
+
{remoteMuted: false},
|
|
457
|
+
{remoteMuted: true, selfIdentity: 'user1', modifiedBy: 'user1'}
|
|
458
|
+
),
|
|
459
|
+
false
|
|
460
|
+
);
|
|
461
|
+
});
|
|
462
|
+
|
|
453
463
|
it('should return true when remoteMuted values are different', function () {
|
|
454
464
|
assert.equal(
|
|
455
465
|
SelfUtils.mutedByOthersChanged(
|
|
@@ -113,30 +113,6 @@ describe('plugin-meetings', () => {
|
|
|
113
113
|
assert.isTrue(audio.isRemotelyMuted());
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
it('does not locally unmute on a server unmute', async () => {
|
|
117
|
-
const setServerMutedSpy = meeting.mediaProperties.audioStream.setServerMuted;
|
|
118
|
-
|
|
119
|
-
// simulate remote mute
|
|
120
|
-
audio.handleServerRemoteMuteUpdate(meeting, true, true);
|
|
121
|
-
|
|
122
|
-
assert.isTrue(audio.isRemotelyMuted());
|
|
123
|
-
assert.isTrue(audio.isLocallyMuted());
|
|
124
|
-
|
|
125
|
-
// mutes local
|
|
126
|
-
assert.calledOnceWithExactly(setServerMutedSpy, true, 'remotelyMuted');
|
|
127
|
-
|
|
128
|
-
setServerMutedSpy.resetHistory();
|
|
129
|
-
|
|
130
|
-
// simulate remote unmute
|
|
131
|
-
audio.handleServerRemoteMuteUpdate(meeting, false, true);
|
|
132
|
-
|
|
133
|
-
assert.isFalse(audio.isRemotelyMuted());
|
|
134
|
-
assert.isTrue(audio.isLocallyMuted());
|
|
135
|
-
|
|
136
|
-
// does not unmute local
|
|
137
|
-
assert.notCalled(setServerMutedSpy);
|
|
138
|
-
});
|
|
139
|
-
|
|
140
116
|
it('does local audio unmute if localAudioUnmuteRequired is received', async () => {
|
|
141
117
|
// first we need to have the local stream user muted
|
|
142
118
|
meeting.mediaProperties.audioStream.userMuted = true;
|