@webex/plugin-meetings 3.0.0-beta.105 → 3.0.0-beta.106

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.
@@ -169,7 +169,7 @@ var Breakout = _webexCore.WebexPlugin.extend({
169
169
  sessionId: this.sessionId
170
170
  });
171
171
  },
172
- version: "3.0.0-beta.105"
172
+ version: "3.0.0-beta.106"
173
173
  });
174
174
  var _default = Breakout;
175
175
  exports.default = _default;
@@ -912,7 +912,7 @@ var Breakouts = _webexCore.WebexPlugin.extend({
912
912
  this.trigger(_constants.BREAKOUTS.EVENTS.ASK_RETURN_TO_MAIN);
913
913
  }
914
914
  },
915
- version: "3.0.0-beta.105"
915
+ version: "3.0.0-beta.106"
916
916
  });
917
917
  var _default = Breakouts;
918
918
  exports.default = _default;
@@ -55,6 +55,7 @@ var Member = /*#__PURE__*/function () {
55
55
  (0, _defineProperty2.default)(this, "participant", void 0);
56
56
  (0, _defineProperty2.default)(this, "status", void 0);
57
57
  (0, _defineProperty2.default)(this, "supportsBreakouts", void 0);
58
+ (0, _defineProperty2.default)(this, "supportLiveAnnotation", void 0);
58
59
  (0, _defineProperty2.default)(this, "type", void 0);
59
60
  (0, _defineProperty2.default)(this, "namespace", _constants.MEETINGS);
60
61
  /**
@@ -109,6 +110,13 @@ var Member = /*#__PURE__*/function () {
109
110
  * @memberof Member
110
111
  */
111
112
  this.supportsBreakouts = null;
113
+ /**
114
+ * @instance
115
+ * @type {Boolean}
116
+ * @public
117
+ * @memberof Member
118
+ */
119
+ this.supportLiveAnnotation = null;
112
120
  /**
113
121
  * @instance
114
122
  * @type {Boolean}
@@ -262,6 +270,7 @@ var Member = /*#__PURE__*/function () {
262
270
  this.isVideoMuted = _util.default.isVideoMuted(participant);
263
271
  this.isHandRaised = _util.default.isHandRaised(participant);
264
272
  this.supportsBreakouts = _util.default.isBreakoutsSupported(participant);
273
+ this.supportLiveAnnotation = _util.default.isLiveAnnotationSupported(participant);
265
274
  this.isGuest = _util.default.isGuest(participant);
266
275
  this.isUser = _util.default.isUser(participant);
267
276
  this.isDevice = _util.default.isDevice(participant);
@@ -1 +1 @@
1
- {"version":3,"names":["Member","participant","options","MEETINGS","id","name","isAudioMuted","isVideoMuted","isHandRaised","supportsBreakouts","isSelf","isHost","isGuest","isInLobby","isInMeeting","isNotAdmitted","isContentSharing","status","isDevice","isUser","associatedUser","isRecording","isMutable","isRemovable","type","isModerator","isModeratorAssignmentProhibited","roles","processParticipant","processParticipantOptions","processMember","MemberUtil","extractId","extractName","isBreakoutsSupported","processStatus","processRoles","processIsSelf","selfId","processIsHost","hostId","processIsContentSharing","contentSharingId","processType","processIsRecording","recordingId","extractStatus","_IN_LOBBY_","_IN_MEETING_","_NOT_IN_MEETING_","flag","sharingId","isSame","isAssociatedSame","extractControlRoles"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nimport {MEETINGS, _IN_LOBBY_, _NOT_IN_MEETING_, _IN_MEETING_} from '../constants';\nimport {IExternalRoles, ParticipantWithRoles} from './types';\n\nimport MemberUtil from './util';\n\n/**\n * @class Member\n */\nexport default class Member {\n associatedUser: any;\n id: any;\n isAudioMuted: any;\n isContentSharing: any;\n isDevice: any;\n isGuest: any;\n isHandRaised: any;\n isHost: any;\n isInLobby: any;\n isInMeeting: any;\n isModerator: any;\n isModeratorAssignmentProhibited: any;\n isMutable: any;\n isNotAdmitted: any;\n isRecording: any;\n isRemovable: any;\n isSelf: any;\n isUser: any;\n isVideoMuted: any;\n roles: IExternalRoles;\n name: any;\n participant: any;\n status: any;\n supportsBreakouts: boolean;\n type: any;\n namespace = MEETINGS;\n\n /**\n * @param {Object} participant - the locus participant\n * @param {Object} [options] - constructor params\n * @param {String} options.selfId\n * @param {String} options.hostId\n * @param {String} options.contentSharingId\n * @param {String} options.type\n * @returns {Member}\n * @memberof Member\n */\n constructor(\n participant: object,\n options:\n | {\n selfId: string;\n hostId: string;\n contentSharingId: string;\n type: string;\n }\n | any = {}\n ) {\n /**\n * The server participant object\n * @instance\n * @type {Object}\n * @private\n * @memberof Member\n */\n this.participant = null;\n /**\n * The member id\n * @instance\n * @type {String}\n * @public\n * @memberof Member\n */\n this.id = null;\n /**\n * The member name\n * @instance\n * @type {String}\n * @public\n * @memberof Member\n */\n this.name = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isAudioMuted = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isVideoMuted = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isHandRaised = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.supportsBreakouts = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isSelf = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isHost = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isGuest = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isInLobby = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isInMeeting = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isNotAdmitted = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isContentSharing = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.status = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isDevice = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isUser = null;\n /**\n * Is this member associated to another user by way of pairing (typical of devices)\n * @instance\n * @type {String}\n * @public\n * @memberof Member\n */\n this.associatedUser = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isRecording = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isMutable = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isRemovable = null;\n /**\n * @instance\n * @type {String}\n * @private\n * @memberof Member\n */\n this.type = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isModerator = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isModeratorAssignmentProhibited = null;\n\n /**\n * @instance\n * @type {IExternalRoles}\n * @public\n * @memberof Member\n */\n this.roles = null;\n // TODO: more participant types\n // such as native client, web client, is a device, what type of phone, etc\n this.processParticipant(participant);\n this.processParticipantOptions(participant, options);\n this.processMember();\n }\n\n /**\n * set all the participant values extracted directly from locus participant\n * @param {Object} participant the locus participant object\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processParticipant(participant: object) {\n this.participant = participant;\n if (participant) {\n this.id = MemberUtil.extractId(participant);\n this.name = MemberUtil.extractName(participant);\n this.isAudioMuted = MemberUtil.isAudioMuted(participant);\n this.isVideoMuted = MemberUtil.isVideoMuted(participant);\n this.isHandRaised = MemberUtil.isHandRaised(participant);\n this.supportsBreakouts = MemberUtil.isBreakoutsSupported(participant);\n this.isGuest = MemberUtil.isGuest(participant);\n this.isUser = MemberUtil.isUser(participant);\n this.isDevice = MemberUtil.isDevice(participant);\n this.isModerator = MemberUtil.isModerator(participant);\n this.isModeratorAssignmentProhibited =\n MemberUtil.isModeratorAssignmentProhibited(participant);\n this.processStatus(participant);\n this.processRoles(participant as ParticipantWithRoles);\n // must be done last\n this.isNotAdmitted = MemberUtil.isNotAdmitted(participant, this.isGuest, this.status);\n }\n }\n\n /**\n * Use the members options and participant values to set on the member\n * @param {Object} participant the locus participant object\n * @param {Object} options the passed in options, what was set on members\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processParticipantOptions(participant: object, options: any) {\n if (participant && options) {\n this.processIsSelf(participant, options.selfId);\n this.processIsHost(participant, options.hostId);\n this.processIsContentSharing(participant, options.contentSharingId);\n this.processType(options.type);\n this.processIsRecording(participant, options.recordingId);\n }\n }\n\n /**\n * processes what already exists on the member to determine other info about the member\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processMember() {\n // must occur after self, guest, meeting, and type properties are calculated\n this.isRemovable = MemberUtil.isRemovable(\n this.isSelf,\n this.isGuest,\n this.isInMeeting,\n this.type\n );\n // must occur after self, device, meeting, mute status, and type properties are calculated\n this.isMutable = MemberUtil.isMutable(\n this.isSelf,\n this.isDevice,\n this.isInMeeting,\n this.isAudioMuted,\n this.type\n );\n }\n\n /**\n * set the status on member object\n * @param {Object} participant the locus participant object\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processStatus(participant: object) {\n this.status = MemberUtil.extractStatus(participant);\n switch (this.status) {\n case _IN_LOBBY_:\n this.isInLobby = true;\n this.isInMeeting = false;\n break;\n case _IN_MEETING_:\n this.isInLobby = false;\n this.isInMeeting = true;\n break;\n case _NOT_IN_MEETING_:\n this.isInLobby = false;\n this.isInMeeting = false;\n break;\n default:\n this.isInLobby = false;\n this.isInMeeting = false;\n }\n }\n\n /**\n * set the isContentSharing on member\n * @param {Boolean} flag\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public setIsContentSharing(flag: boolean) {\n this.isContentSharing = flag;\n }\n\n /**\n * set the isHost on member\n * @param {Boolean} flag\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public setIsHost(flag: boolean) {\n this.isHost = flag;\n }\n\n /**\n * set the isSelf on member\n * @param {Boolean} flag\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public setIsSelf(flag: boolean) {\n this.isSelf = flag;\n }\n\n /**\n * determine if this member is content sharing\n * @param {Object} participant\n * @param {String} sharingId\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public processIsContentSharing(participant: object, sharingId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isContentSharing = MemberUtil.isSame(participant, sharingId);\n } else if (MemberUtil.isDevice(participant)) {\n this.isContentSharing = MemberUtil.isAssociatedSame(participant, sharingId);\n }\n }\n\n /**\n * Determine if this member is recording\n * @param {Object} participant\n * @param {String} recordingId\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public processIsRecording(participant: object, recordingId: string) {\n this.isRecording = MemberUtil.isSame(participant, recordingId);\n }\n\n /**\n * determine if this member is the self\n * @param {Object} participant\n * @param {String} selfId\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processIsSelf(participant: object, selfId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isSelf = MemberUtil.isSame(participant, selfId);\n } else if (MemberUtil.isDevice(participant)) {\n this.isSelf = MemberUtil.isAssociatedSame(participant, selfId);\n this.associatedUser = selfId;\n }\n }\n\n /**\n * determine if this member is the host\n * @param {Object} participant\n * @param {String} hostId\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processIsHost(participant: object, hostId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isHost = MemberUtil.isSame(participant, hostId);\n } else if (MemberUtil.isDevice(participant)) {\n this.isHost = MemberUtil.isAssociatedSame(participant, hostId);\n }\n }\n\n /**\n * process the roles that have been applied to this member\n * @param {Object} participant\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processRoles(participant: ParticipantWithRoles) {\n this.roles = MemberUtil.extractControlRoles(participant);\n }\n\n /**\n * set the type for the member, could be MEETING or CALL\n * @param {String} type\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processType(type: string) {\n this.type = type;\n }\n}\n"],"mappings":";;;;;;;;;;;AAGA;AAGA;AANA;AACA;AACA;AAMA;AACA;AACA;AAFA,IAGqBA,MAAM;EA4BzB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,gBACEC,WAAmB,EASnB;IAAA,IARAC,OAOO,uEAAG,CAAC,CAAC;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA,iDArBFC,mBAAQ;IAuBlB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACF,WAAW,GAAG,IAAI;IACvB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACG,EAAE,GAAG,IAAI;IACd;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,IAAI,GAAG,IAAI;IAChB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,YAAY,GAAG,IAAI;IACxB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,YAAY,GAAG,IAAI;IACxB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,YAAY,GAAG,IAAI;IACxB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,iBAAiB,GAAG,IAAI;IAC7B;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,OAAO,GAAG,IAAI;IACnB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,SAAS,GAAG,IAAI;IACrB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,WAAW,GAAG,IAAI;IACvB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,aAAa,GAAG,IAAI;IACzB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,gBAAgB,GAAG,IAAI;IAC5B;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,QAAQ,GAAG,IAAI;IACpB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB;AACJ;AACA;A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B,WAAW,CAAC,EAAE;QAClC,IAAI,CAACU,MAAM,GAAGoB,aAAU,CAACqB,MAAM,CAACnD,WAAW,EAAEuC,MAAM,CAAC;MACtD,CAAC,MAAM,IAAIT,aAAU,CAACb,QAAQ,CAACjB,WAAW,CAAC,EAAE;QAC3C,IAAI,CAACU,MAAM,GAAGoB,aAAU,CAACsB,gBAAgB,CAACpD,WAAW,EAAEuC,MAAM,CAAC;MAChE;IACF;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,sBAAqBvC,WAAiC,EAAE;MACtD,IAAI,CAAC0B,KAAK,GAAGI,aAAU,CAACuB,mBAAmB,CAACrD,WAAW,CAAC;IAC1D;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,qBAAoBuB,IAAY,EAAE;MAChC,IAAI,CAACA,IAAI,GAAGA,IAAI;IAClB;EAAC;EAAA;AAAA;AAAA"}
1
+ {"version":3,"names":["Member","participant","options","MEETINGS","id","name","isAudioMuted","isVideoMuted","isHandRaised","supportsBreakouts","supportLiveAnnotation","isSelf","isHost","isGuest","isInLobby","isInMeeting","isNotAdmitted","isContentSharing","status","isDevice","isUser","associatedUser","isRecording","isMutable","isRemovable","type","isModerator","isModeratorAssignmentProhibited","roles","processParticipant","processParticipantOptions","processMember","MemberUtil","extractId","extractName","isBreakoutsSupported","isLiveAnnotationSupported","processStatus","processRoles","processIsSelf","selfId","processIsHost","hostId","processIsContentSharing","contentSharingId","processType","processIsRecording","recordingId","extractStatus","_IN_LOBBY_","_IN_MEETING_","_NOT_IN_MEETING_","flag","sharingId","isSame","isAssociatedSame","extractControlRoles"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.\n */\nimport {MEETINGS, _IN_LOBBY_, _NOT_IN_MEETING_, _IN_MEETING_} from '../constants';\nimport {IExternalRoles, ParticipantWithRoles} from './types';\n\nimport MemberUtil from './util';\n\n/**\n * @class Member\n */\nexport default class Member {\n associatedUser: any;\n id: any;\n isAudioMuted: any;\n isContentSharing: any;\n isDevice: any;\n isGuest: any;\n isHandRaised: any;\n isHost: any;\n isInLobby: any;\n isInMeeting: any;\n isModerator: any;\n isModeratorAssignmentProhibited: any;\n isMutable: any;\n isNotAdmitted: any;\n isRecording: any;\n isRemovable: any;\n isSelf: any;\n isUser: any;\n isVideoMuted: any;\n roles: IExternalRoles;\n name: any;\n participant: any;\n status: any;\n supportsBreakouts: boolean;\n supportLiveAnnotation: boolean;\n type: any;\n namespace = MEETINGS;\n\n /**\n * @param {Object} participant - the locus participant\n * @param {Object} [options] - constructor params\n * @param {String} options.selfId\n * @param {String} options.hostId\n * @param {String} options.contentSharingId\n * @param {String} options.type\n * @returns {Member}\n * @memberof Member\n */\n constructor(\n participant: object,\n options:\n | {\n selfId: string;\n hostId: string;\n contentSharingId: string;\n type: string;\n }\n | any = {}\n ) {\n /**\n * The server participant object\n * @instance\n * @type {Object}\n * @private\n * @memberof Member\n */\n this.participant = null;\n /**\n * The member id\n * @instance\n * @type {String}\n * @public\n * @memberof Member\n */\n this.id = null;\n /**\n * The member name\n * @instance\n * @type {String}\n * @public\n * @memberof Member\n */\n this.name = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isAudioMuted = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isVideoMuted = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isHandRaised = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.supportsBreakouts = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.supportLiveAnnotation = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isSelf = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isHost = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isGuest = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isInLobby = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isInMeeting = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isNotAdmitted = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isContentSharing = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.status = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isDevice = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isUser = null;\n /**\n * Is this member associated to another user by way of pairing (typical of devices)\n * @instance\n * @type {String}\n * @public\n * @memberof Member\n */\n this.associatedUser = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isRecording = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isMutable = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isRemovable = null;\n /**\n * @instance\n * @type {String}\n * @private\n * @memberof Member\n */\n this.type = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isModerator = null;\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isModeratorAssignmentProhibited = null;\n\n /**\n * @instance\n * @type {IExternalRoles}\n * @public\n * @memberof Member\n */\n this.roles = null;\n // TODO: more participant types\n // such as native client, web client, is a device, what type of phone, etc\n this.processParticipant(participant);\n this.processParticipantOptions(participant, options);\n this.processMember();\n }\n\n /**\n * set all the participant values extracted directly from locus participant\n * @param {Object} participant the locus participant object\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processParticipant(participant: object) {\n this.participant = participant;\n if (participant) {\n this.id = MemberUtil.extractId(participant);\n this.name = MemberUtil.extractName(participant);\n this.isAudioMuted = MemberUtil.isAudioMuted(participant);\n this.isVideoMuted = MemberUtil.isVideoMuted(participant);\n this.isHandRaised = MemberUtil.isHandRaised(participant);\n this.supportsBreakouts = MemberUtil.isBreakoutsSupported(participant);\n this.supportLiveAnnotation = MemberUtil.isLiveAnnotationSupported(participant);\n this.isGuest = MemberUtil.isGuest(participant);\n this.isUser = MemberUtil.isUser(participant);\n this.isDevice = MemberUtil.isDevice(participant);\n this.isModerator = MemberUtil.isModerator(participant);\n this.isModeratorAssignmentProhibited =\n MemberUtil.isModeratorAssignmentProhibited(participant);\n this.processStatus(participant);\n this.processRoles(participant as ParticipantWithRoles);\n // must be done last\n this.isNotAdmitted = MemberUtil.isNotAdmitted(participant, this.isGuest, this.status);\n }\n }\n\n /**\n * Use the members options and participant values to set on the member\n * @param {Object} participant the locus participant object\n * @param {Object} options the passed in options, what was set on members\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processParticipantOptions(participant: object, options: any) {\n if (participant && options) {\n this.processIsSelf(participant, options.selfId);\n this.processIsHost(participant, options.hostId);\n this.processIsContentSharing(participant, options.contentSharingId);\n this.processType(options.type);\n this.processIsRecording(participant, options.recordingId);\n }\n }\n\n /**\n * processes what already exists on the member to determine other info about the member\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processMember() {\n // must occur after self, guest, meeting, and type properties are calculated\n this.isRemovable = MemberUtil.isRemovable(\n this.isSelf,\n this.isGuest,\n this.isInMeeting,\n this.type\n );\n // must occur after self, device, meeting, mute status, and type properties are calculated\n this.isMutable = MemberUtil.isMutable(\n this.isSelf,\n this.isDevice,\n this.isInMeeting,\n this.isAudioMuted,\n this.type\n );\n }\n\n /**\n * set the status on member object\n * @param {Object} participant the locus participant object\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processStatus(participant: object) {\n this.status = MemberUtil.extractStatus(participant);\n switch (this.status) {\n case _IN_LOBBY_:\n this.isInLobby = true;\n this.isInMeeting = false;\n break;\n case _IN_MEETING_:\n this.isInLobby = false;\n this.isInMeeting = true;\n break;\n case _NOT_IN_MEETING_:\n this.isInLobby = false;\n this.isInMeeting = false;\n break;\n default:\n this.isInLobby = false;\n this.isInMeeting = false;\n }\n }\n\n /**\n * set the isContentSharing on member\n * @param {Boolean} flag\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public setIsContentSharing(flag: boolean) {\n this.isContentSharing = flag;\n }\n\n /**\n * set the isHost on member\n * @param {Boolean} flag\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public setIsHost(flag: boolean) {\n this.isHost = flag;\n }\n\n /**\n * set the isSelf on member\n * @param {Boolean} flag\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public setIsSelf(flag: boolean) {\n this.isSelf = flag;\n }\n\n /**\n * determine if this member is content sharing\n * @param {Object} participant\n * @param {String} sharingId\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public processIsContentSharing(participant: object, sharingId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isContentSharing = MemberUtil.isSame(participant, sharingId);\n } else if (MemberUtil.isDevice(participant)) {\n this.isContentSharing = MemberUtil.isAssociatedSame(participant, sharingId);\n }\n }\n\n /**\n * Determine if this member is recording\n * @param {Object} participant\n * @param {String} recordingId\n * @returns {undefined}\n * @public\n * @memberof Member\n */\n public processIsRecording(participant: object, recordingId: string) {\n this.isRecording = MemberUtil.isSame(participant, recordingId);\n }\n\n /**\n * determine if this member is the self\n * @param {Object} participant\n * @param {String} selfId\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processIsSelf(participant: object, selfId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isSelf = MemberUtil.isSame(participant, selfId);\n } else if (MemberUtil.isDevice(participant)) {\n this.isSelf = MemberUtil.isAssociatedSame(participant, selfId);\n this.associatedUser = selfId;\n }\n }\n\n /**\n * determine if this member is the host\n * @param {Object} participant\n * @param {String} hostId\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processIsHost(participant: object, hostId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isHost = MemberUtil.isSame(participant, hostId);\n } else if (MemberUtil.isDevice(participant)) {\n this.isHost = MemberUtil.isAssociatedSame(participant, hostId);\n }\n }\n\n /**\n * process the roles that have been applied to this member\n * @param {Object} participant\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processRoles(participant: ParticipantWithRoles) {\n this.roles = MemberUtil.extractControlRoles(participant);\n }\n\n /**\n * set the type for the member, could be MEETING or CALL\n * @param {String} type\n * @returns {undefined}\n * @private\n * @memberof Member\n */\n private processType(type: string) {\n this.type = type;\n }\n}\n"],"mappings":";;;;;;;;;;;AAGA;AAGA;AANA;AACA;AACA;AAMA;AACA;AACA;AAFA,IAGqBA,MAAM;EA6BzB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,gBACEC,WAAmB,EASnB;IAAA,IARAC,OAOO,uEAAG,CAAC,CAAC;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA,iDArBFC,mBAAQ;IAuBlB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACF,WAAW,GAAG,IAAI;IACvB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACG,EAAE,GAAG,IAAI;IACd;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,IAAI,GAAG,IAAI;IAChB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,YAAY,GAAG,IAAI;IACxB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,YAAY,GAAG,IAAI;IACxB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,YAAY,GAAG,IAAI;IACxB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,iBAAiB,GAAG,IAAI;IAC7B;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,qBAAqB,GAAG,IAAI;IACjC;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,OAAO,GAAG,IAAI;IACnB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,SAAS,GAAG,IAAI;IACrB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,WAAW,GAAG,IAAI;IACvB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,aAAa,GAAG,IAAI;IACzB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,gBAAgB,GAAG,IAAI;IAC5B;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,QAAQ,GAAG,IAAI;IACpB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,MAAM,GAAG,IAAI;IAClB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,cAAc,GAAG,IAAI;IAC1B;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,WAAW,GAAG,IAAI;IACvB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,SAAS,GAAG,IAAI;IACrB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,WAAW,GAAG,IAAI;IACvB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,IAAI,GAAG,IAAI;IAChB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,WAAW,GAAG,IAAI;IACvB;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,+BAA+B,GAAG,IAAI;;IAE3C;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,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ACvD,WAAW,CAAC;IAC1D;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,qBAAoBwB,IAAY,EAAE;MAChC,IAAI,CAACA,IAAI,GAAGA,IAAI;IAClB;EAAC;EAAA;AAAA;AAAA"}
@@ -191,6 +191,17 @@ MemberUtil.isBreakoutsSupported = function (participant) {
191
191
  return !participant.doesNotSupportBreakouts;
192
192
  };
193
193
 
194
+ /**
195
+ * @param {Object} participant the locus participant
196
+ * @returns {Boolean}
197
+ */
198
+ MemberUtil.isLiveAnnotationSupported = function (participant) {
199
+ if (!participant) {
200
+ throw new _parameter.default('LiveAnnotation support could not be processed, participant is undefined.');
201
+ }
202
+ return !participant.annotatorAssignmentNotAllowed;
203
+ };
204
+
194
205
  /**
195
206
  * utility method for audio/video muted status
196
207
  * @param {String} status
@@ -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","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","extractName","name"],"sources":["util.ts"],"sourcesContent":["import {IExternalRoles, ParticipantWithRoles, ServerRoles, ServerRoleShape} 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 * 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 * @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;AACA;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,CAAC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AAW,GAAGrC,qBAAU,GAAGiC,2BAAgB;IACpD;IAEA,OAAOA,2BAAgB;EACzB;EACA,IAAIxE,WAAW,CAACyE,KAAK,KAAKO,iBAAM,EAAE;IAChC,OAAOR,2BAAgB;EACzB;EAEA,OAAOA,2BAAgB;AACzB,CAAC;;AAED;AACA;AACA;AACA;AACA1E,UAAU,CAACmF,SAAS,GAAG,UAACjF,WAAgB,EAAK;EAC3C,IAAIA,WAAW,EAAE;IACf,OAAOA,WAAW,CAAC6B,EAAE;EACvB;EAEA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA/B,UAAU,CAACoF,WAAW,GAAG,UAAClF,WAAgB,EAAK;EAC7C,IAAIA,WAAW,IAAIA,WAAW,CAAC8B,MAAM,EAAE;IACrC,OAAO9B,WAAW,CAAC8B,MAAM,CAACqD,IAAI;EAChC;EAEA,OAAO,IAAI;AACb,CAAC;AAAC,eAEarF,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","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","extractName","name"],"sources":["util.ts"],"sourcesContent":["import {IExternalRoles, ParticipantWithRoles, ServerRoles, ServerRoleShape} 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.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 * @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;AACA;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,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AAI1E,WAAW,CAAC2E,KAAK,KAAKC,mBAAQ,EAAE;IAClC,OAAOpC,uBAAY;EACrB;EACA,IAAIxC,WAAW,CAAC2E,KAAK,KAAKE,iBAAM,EAAE;IAChC,IAAI7E,WAAW,CAACoC,OAAO,IAAIpC,WAAW,CAACoC,OAAO,CAACqC,MAAM,GAAG,CAAC,EAAE;MACzD,IAAMK,WAAW,GAAG9E,WAAW,CAACoC,OAAO,CAAC2C,IAAI,CAC1C,UAACC,MAAM;QAAA,OACLA,MAAM,CAAC3C,MAAM,KAAK2C,MAAM,CAAC3C,MAAM,CAAC9B,IAAI,KAAK+B,iBAAM,IAAI0C,MAAM,CAAC3C,MAAM,CAAC9B,IAAI,KAAK0E,oBAAS,CAAC;MAAA,EACvF;MAED,OAAOH,WAAW,GAAGvC,qBAAU,GAAGmC,2BAAgB;IACpD;IAEA,OAAOA,2BAAgB;EACzB;EACA,IAAI1E,WAAW,CAAC2E,KAAK,KAAKO,iBAAM,EAAE;IAChC,OAAOR,2BAAgB;EACzB;EAEA,OAAOA,2BAAgB;AACzB,CAAC;;AAED;AACA;AACA;AACA;AACA5E,UAAU,CAACqF,SAAS,GAAG,UAACnF,WAAgB,EAAK;EAC3C,IAAIA,WAAW,EAAE;IACf,OAAOA,WAAW,CAAC6B,EAAE;EACvB;EAEA,OAAO,IAAI;AACb,CAAC;;AAED;AACA;AACA;AACA;AACA/B,UAAU,CAACsF,WAAW,GAAG,UAACpF,WAAgB,EAAK;EAC7C,IAAIA,WAAW,IAAIA,WAAW,CAAC8B,MAAM,EAAE;IACrC,OAAO9B,WAAW,CAAC8B,MAAM,CAACuD,IAAI;EAChC;EAEA,OAAO,IAAI;AACb,CAAC;AAAC,eAEavF,UAAU;AAAA"}
@@ -27,6 +27,7 @@ export default class Member {
27
27
  participant: any;
28
28
  status: any;
29
29
  supportsBreakouts: boolean;
30
+ supportLiveAnnotation: boolean;
30
31
  type: any;
31
32
  namespace: string;
32
33
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "3.0.0-beta.105",
3
+ "version": "3.0.0-beta.106",
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.105",
36
- "@webex/test-helper-chai": "3.0.0-beta.105",
37
- "@webex/test-helper-mocha": "3.0.0-beta.105",
38
- "@webex/test-helper-mock-webex": "3.0.0-beta.105",
39
- "@webex/test-helper-retry": "3.0.0-beta.105",
40
- "@webex/test-helper-test-users": "3.0.0-beta.105",
35
+ "@webex/plugin-meetings": "3.0.0-beta.106",
36
+ "@webex/test-helper-chai": "3.0.0-beta.106",
37
+ "@webex/test-helper-mocha": "3.0.0-beta.106",
38
+ "@webex/test-helper-mock-webex": "3.0.0-beta.106",
39
+ "@webex/test-helper-retry": "3.0.0-beta.106",
40
+ "@webex/test-helper-test-users": "3.0.0-beta.106",
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.105",
49
+ "@webex/common": "3.0.0-beta.106",
50
50
  "@webex/internal-media-core": "1.38.0",
51
- "@webex/internal-plugin-conversation": "3.0.0-beta.105",
52
- "@webex/internal-plugin-device": "3.0.0-beta.105",
53
- "@webex/internal-plugin-llm": "3.0.0-beta.105",
54
- "@webex/internal-plugin-mercury": "3.0.0-beta.105",
55
- "@webex/internal-plugin-metrics": "3.0.0-beta.105",
56
- "@webex/internal-plugin-support": "3.0.0-beta.105",
57
- "@webex/internal-plugin-user": "3.0.0-beta.105",
58
- "@webex/media-helpers": "3.0.0-beta.105",
59
- "@webex/plugin-people": "3.0.0-beta.105",
60
- "@webex/plugin-rooms": "3.0.0-beta.105",
61
- "@webex/webex-core": "3.0.0-beta.105",
51
+ "@webex/internal-plugin-conversation": "3.0.0-beta.106",
52
+ "@webex/internal-plugin-device": "3.0.0-beta.106",
53
+ "@webex/internal-plugin-llm": "3.0.0-beta.106",
54
+ "@webex/internal-plugin-mercury": "3.0.0-beta.106",
55
+ "@webex/internal-plugin-metrics": "3.0.0-beta.106",
56
+ "@webex/internal-plugin-support": "3.0.0-beta.106",
57
+ "@webex/internal-plugin-user": "3.0.0-beta.106",
58
+ "@webex/media-helpers": "3.0.0-beta.106",
59
+ "@webex/plugin-people": "3.0.0-beta.106",
60
+ "@webex/plugin-rooms": "3.0.0-beta.106",
61
+ "@webex/webex-core": "3.0.0-beta.106",
62
62
  "ampersand-collection": "^2.0.2",
63
63
  "bowser": "^2.11.0",
64
64
  "btoa": "^1.2.1",
@@ -34,6 +34,7 @@ export default class Member {
34
34
  participant: any;
35
35
  status: any;
36
36
  supportsBreakouts: boolean;
37
+ supportLiveAnnotation: boolean;
37
38
  type: any;
38
39
  namespace = MEETINGS;
39
40
 
@@ -110,6 +111,13 @@ export default class Member {
110
111
  * @memberof Member
111
112
  */
112
113
  this.supportsBreakouts = null;
114
+ /**
115
+ * @instance
116
+ * @type {Boolean}
117
+ * @public
118
+ * @memberof Member
119
+ */
120
+ this.supportLiveAnnotation = null;
113
121
  /**
114
122
  * @instance
115
123
  * @type {Boolean}
@@ -261,6 +269,7 @@ export default class Member {
261
269
  this.isVideoMuted = MemberUtil.isVideoMuted(participant);
262
270
  this.isHandRaised = MemberUtil.isHandRaised(participant);
263
271
  this.supportsBreakouts = MemberUtil.isBreakoutsSupported(participant);
272
+ this.supportLiveAnnotation = MemberUtil.isLiveAnnotationSupported(participant);
264
273
  this.isGuest = MemberUtil.isGuest(participant);
265
274
  this.isUser = MemberUtil.isUser(participant);
266
275
  this.isDevice = MemberUtil.isDevice(participant);
@@ -196,6 +196,20 @@ MemberUtil.isBreakoutsSupported = (participant) => {
196
196
  return !participant.doesNotSupportBreakouts;
197
197
  };
198
198
 
199
+ /**
200
+ * @param {Object} participant the locus participant
201
+ * @returns {Boolean}
202
+ */
203
+ MemberUtil.isLiveAnnotationSupported = (participant) => {
204
+ if (!participant) {
205
+ throw new ParameterError(
206
+ 'LiveAnnotation support could not be processed, participant is undefined.'
207
+ );
208
+ }
209
+
210
+ return !participant.annotatorAssignmentNotAllowed;
211
+ };
212
+
199
213
  /**
200
214
  * utility method for audio/video muted status
201
215
  * @param {String} status
@@ -240,6 +240,7 @@ export default {
240
240
  },
241
241
  },
242
242
  doesNotSupportBreakouts: true,
243
+ annotatorAssignmentNotAllowed: true,
243
244
  identityTrustLevel: 'INTERNAL',
244
245
  id: 'e0d54e94-226c-3290-b75a-83cc1dbf',
245
246
  guest: false,
@@ -9,21 +9,21 @@ describe('plugin-meetings', () => {
9
9
  MemberUtil.isHandRaised();
10
10
  }, 'Raise hand could not be processed, participant is undefined.');
11
11
  });
12
-
12
+
13
13
  it('returns false when controls is not there', () => {
14
14
  const participant = {};
15
-
15
+
16
16
  assert.isFalse(MemberUtil.isHandRaised(participant));
17
17
  });
18
-
18
+
19
19
  it('returns false when hand is not there in controls', () => {
20
20
  const participant = {
21
21
  controls: {},
22
22
  };
23
-
23
+
24
24
  assert.isFalse(MemberUtil.isHandRaised(participant));
25
25
  });
26
-
26
+
27
27
  it('returns true when hand raised is true', () => {
28
28
  const participant = {
29
29
  controls: {
@@ -32,10 +32,10 @@ describe('plugin-meetings', () => {
32
32
  },
33
33
  },
34
34
  };
35
-
35
+
36
36
  assert.isTrue(MemberUtil.isHandRaised(participant));
37
37
  });
38
-
38
+
39
39
  it('returns false when hand raised is false', () => {
40
40
  const participant = {
41
41
  controls: {
@@ -44,7 +44,7 @@ describe('plugin-meetings', () => {
44
44
  },
45
45
  },
46
46
  };
47
-
47
+
48
48
  assert.isFalse(MemberUtil.isHandRaised(participant));
49
49
  });
50
50
  });
@@ -95,7 +95,7 @@ describe('plugin-meetings', () => {
95
95
  }
96
96
  }
97
97
  }
98
-
98
+
99
99
  assert.isTrue(MemberUtil.hasRole(participant, ServerRoles.Presenter));
100
100
  });
101
101
 
@@ -109,7 +109,7 @@ describe('plugin-meetings', () => {
109
109
  }
110
110
  }
111
111
  }
112
-
112
+
113
113
  assert.isFalse(MemberUtil.hasRole(participant, ServerRoles.Presenter));
114
114
  });
115
115
 
@@ -123,7 +123,7 @@ describe('plugin-meetings', () => {
123
123
  }
124
124
  }
125
125
  }
126
-
126
+
127
127
  assert.isFalse(MemberUtil.hasRole(participant, ServerRoles.Presenter));
128
128
  });
129
129
  })
@@ -139,7 +139,7 @@ describe('plugin-meetings', () => {
139
139
  }
140
140
  }
141
141
  }
142
-
142
+
143
143
  assert.isTrue(MemberUtil.hasRole(participant, ServerRoles.Moderator));
144
144
  });
145
145
 
@@ -153,7 +153,7 @@ describe('plugin-meetings', () => {
153
153
  }
154
154
  }
155
155
  }
156
-
156
+
157
157
  assert.isFalse(MemberUtil.hasRole(participant, ServerRoles.Moderator));
158
158
  });
159
159
 
@@ -167,7 +167,7 @@ describe('plugin-meetings', () => {
167
167
  }
168
168
  }
169
169
  }
170
-
170
+
171
171
  assert.isFalse(MemberUtil.hasRole(participant, ServerRoles.Moderator));
172
172
  });
173
173
  })
@@ -183,7 +183,7 @@ describe('plugin-meetings', () => {
183
183
  }
184
184
  }
185
185
  }
186
-
186
+
187
187
  assert.isTrue(MemberUtil.hasRole(participant, ServerRoles.Cohost));
188
188
  });
189
189
 
@@ -197,7 +197,7 @@ describe('plugin-meetings', () => {
197
197
  }
198
198
  }
199
199
  }
200
-
200
+
201
201
  assert.isFalse(MemberUtil.hasRole(participant, ServerRoles.Cohost));
202
202
  });
203
203
 
@@ -211,7 +211,7 @@ describe('plugin-meetings', () => {
211
211
  }
212
212
  }
213
213
  }
214
-
214
+
215
215
  assert.isFalse(MemberUtil.hasRole(participant, ServerRoles.Cohost));
216
216
  });
217
217
  })
@@ -229,7 +229,7 @@ describe('plugin-meetings', () => {
229
229
  }
230
230
  }
231
231
  }
232
-
232
+
233
233
  assert.isTrue(MemberUtil.hasPresenter(participant, ServerRoles.Presenter));
234
234
  });
235
235
 
@@ -243,7 +243,7 @@ describe('plugin-meetings', () => {
243
243
  }
244
244
  }
245
245
  }
246
-
246
+
247
247
  assert.isFalse(MemberUtil.hasPresenter(participant));
248
248
  });
249
249
 
@@ -257,7 +257,7 @@ describe('plugin-meetings', () => {
257
257
  }
258
258
  }
259
259
  }
260
-
260
+
261
261
  assert.isFalse(MemberUtil.hasPresenter(participant));
262
262
  });
263
263
  })
@@ -273,7 +273,7 @@ describe('plugin-meetings', () => {
273
273
  }
274
274
  }
275
275
  }
276
-
276
+
277
277
  assert.isTrue(MemberUtil.hasModerator(participant));
278
278
  });
279
279
 
@@ -287,7 +287,7 @@ describe('plugin-meetings', () => {
287
287
  }
288
288
  }
289
289
  }
290
-
290
+
291
291
  assert.isFalse(MemberUtil.hasModerator(participant));
292
292
  });
293
293
 
@@ -301,7 +301,7 @@ describe('plugin-meetings', () => {
301
301
  }
302
302
  }
303
303
  }
304
-
304
+
305
305
  assert.isFalse(MemberUtil.hasModerator(participant));
306
306
  });
307
307
  })
@@ -317,7 +317,7 @@ describe('plugin-meetings', () => {
317
317
  }
318
318
  }
319
319
  }
320
-
320
+
321
321
  assert.isTrue(MemberUtil.hasCohost(participant));
322
322
  });
323
323
 
@@ -331,7 +331,7 @@ describe('plugin-meetings', () => {
331
331
  }
332
332
  }
333
333
  }
334
-
334
+
335
335
  assert.isFalse(MemberUtil.hasCohost(participant));
336
336
  });
337
337
 
@@ -345,7 +345,7 @@ describe('plugin-meetings', () => {
345
345
  }
346
346
  }
347
347
  }
348
-
348
+
349
349
  assert.isFalse(MemberUtil.hasCohost(participant));
350
350
  });
351
351
  })
@@ -374,4 +374,28 @@ describe('plugin-meetings', () => {
374
374
  assert.isFalse(MemberUtil.isBreakoutsSupported(participant));
375
375
  });
376
376
  });
377
+
378
+ describe('MemberUtil.isLiveAnnotationSupported', () => {
379
+ it('throws error when there is no participant', () => {
380
+ assert.throws(() => {
381
+ MemberUtil.isLiveAnnotationSupported();
382
+ }, 'LiveAnnotation support could not be processed, participant is undefined.');
383
+ });
384
+
385
+ it('returns true when hand live annotation are supported', () => {
386
+ const participant = {
387
+ annotatorAssignmentNotAllowed: false
388
+ };
389
+
390
+ assert.isTrue(MemberUtil.isLiveAnnotationSupported(participant));
391
+ });
392
+
393
+ it('returns false when hand live annotation are not supported', () => {
394
+ const participant = {
395
+ annotatorAssignmentNotAllowed: true
396
+ };
397
+
398
+ assert.isFalse(MemberUtil.isLiveAnnotationSupported(participant));
399
+ });
400
+ });
377
401
  });