@webex/plugin-meetings 3.8.1-next.8 → 3.8.1-web-workers-keepalive.1

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.
@@ -1 +1 @@
1
- {"version":3,"names":["_constants","require","_util","_interopRequireDefault","Member","exports","default","participant","options","arguments","length","undefined","_classCallCheck2","_defineProperty2","MEETINGS","canReclaimHost","id","name","isAudioMuted","isVideoMuted","isHandRaised","supportsBreakouts","supportLiveAnnotation","isSelf","isHost","isGuest","isInLobby","isInMeeting","isNotAdmitted","isContentSharing","status","isDevice","isUser","associatedUser","associatedUsers","_set","isRecording","isMutable","isRemovable","isBrb","type","isModerator","isModeratorAssignmentProhibited","isPresenterAssignmentProhibited","isPairedWithSelf","roles","pairedWith","participantUrl","memberId","mediaStatus","audio","video","processParticipant","processParticipantOptions","processMember","_createClass2","key","value","processPairedDevice","MemberUtil","extractId","extractName","isBreakoutsSupported","supportsInterpretation","isInterpretationSupported","isLiveAnnotationSupported","processStatus","processRoles","extractPairedWithParticipantUrl","processIsSelf","selfId","processIsHost","hostId","processIsContentSharing","contentSharingId","processType","processIsRecording","recordingId","extractMediaStatus","extractStatus","_IN_LOBBY_","_IN_MEETING_","_NOT_IN_MEETING_","setIsContentSharing","flag","setIsHost","setIsSelf","sharingId","isSame","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_, _OBSERVE_} from '../constants';\nimport {IExternalRoles, IMediaStatus, Participant, ParticipantUrl} from './types';\n\nimport MemberUtil from './util';\n\nexport type MemberId = string;\n/**\n * @class Member\n */\nexport default class Member {\n associatedUser: MemberId | null; // deprecated, use associatedUsers instead\n associatedUsers: Set<MemberId>; // users associated with this device, empty if this member is not a device\n canReclaimHost: boolean;\n id: MemberId;\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 isPresenterAssignmentProhibited: any;\n isMutable: any;\n isNotAdmitted: any;\n isRecording: any;\n isRemovable: any;\n isSelf: any;\n isPairedWithSelf: boolean; // true for a device that we are paired with\n isBrb: boolean;\n isUser: any;\n isVideoMuted: any;\n roles: IExternalRoles;\n mediaStatus: IMediaStatus;\n name: any;\n participant: any;\n status: any;\n supportsBreakouts: boolean;\n supportsInterpretation: boolean;\n supportLiveAnnotation: boolean;\n type: any;\n namespace = MEETINGS;\n pairedWith: {\n participantUrl?: ParticipantUrl;\n memberId?: MemberId;\n };\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: Participant,\n options:\n | {\n selfId: string;\n hostId: string;\n contentSharingId: string;\n type: string;\n }\n | any = {}\n ) {\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.canReclaimHost = false;\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 * Deprecated: use associatedUsers instead\n * Is this member associated to another user by way of pairing (typical of devices)\n * @instance\n * @type {MemberId|null}\n * @deprecated\n * @public\n * @memberof Member\n */\n this.associatedUser = 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.associatedUsers = new Set<MemberId>();\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 {Boolean}\n * @public\n * @memberof Member\n */\n this.isBrb = false;\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 {Boolean}\n * @public\n * @memberof Member\n */\n this.isPresenterAssignmentProhibited = null;\n\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isPairedWithSelf = false;\n\n /**\n * @instance\n * @type {IExternalRoles}\n * @public\n * @memberof Member\n */\n this.roles = null;\n\n this.pairedWith = {\n participantUrl: undefined,\n memberId: undefined,\n };\n /**\n * @instance\n * @type {IMediaStatus}\n * @public\n * @memberof Member\n * @example {audio: MediaStatus.RECVONLY, video: MediaStatus.SENDRECV}\n */\n this.mediaStatus = {\n audio: null,\n video: null,\n };\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: Participant) {\n this.participant = participant;\n if (participant) {\n this.processPairedDevice(participant);\n this.canReclaimHost = MemberUtil.canReclaimHost(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.supportsInterpretation = MemberUtil.isInterpretationSupported(participant);\n this.supportLiveAnnotation = MemberUtil.isLiveAnnotationSupported(participant);\n this.isGuest = MemberUtil.isGuest(participant);\n this.isBrb = MemberUtil.isBrb(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.isPresenterAssignmentProhibited =\n MemberUtil.isPresenterAssignmentProhibited(participant);\n this.processStatus(participant);\n this.processRoles(participant);\n // must be done last\n this.isNotAdmitted = MemberUtil.isNotAdmitted(participant, this.isGuest, this.status);\n }\n }\n\n /**\n * Checks if the participant is paired with another device\n *\n * @param {any} participant the locus participant object\n * @returns {void}\n */\n processPairedDevice(participant: Participant) {\n // we can't populate this.pairedWith.memberId here because the member for that device might not yet exist\n // so only populating the participantUrl and memberId will be set later\n this.pairedWith.participantUrl = MemberUtil.extractPairedWithParticipantUrl(participant);\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: Participant, 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 this.mediaStatus = MemberUtil.extractMediaStatus(this.participant);\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: Participant) {\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: Participant, sharingId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isContentSharing = MemberUtil.isSame(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: Participant, 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: Participant, selfId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isSelf = MemberUtil.isSame(participant, 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: Participant, hostId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isHost = MemberUtil.isSame(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: Participant) {\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,IAAAA,UAA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,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;AACA;AACA;IACI,IAAI,CAACC,cAAc,GAAG,IAAI;IAC1B;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,eAAe,GAAG,IAAAC,IAAA,CAAA7B,OAAA,CAAkB,CAAC;IAC1C;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAAC8B,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,KAAK,GAAG,KAAK;IAClB;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,+BAA+B,GAAG,IAAI;;IAE3C;AACJ;AACA;AACA;AACA;AACA;IACI,IAAI,CAACC,gBAAgB,GAAG,KAAK;;IAE7B;AACJ;AACA;AACA;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ACA;AACA;AACA;AACA;AACA;EAPE;IAAArB,GAAA;IAAAC,KAAA,EAQA,SAAAY,cAAsB9D,WAAwB,EAAE+D,MAAc,EAAE;MAC9D,IAAIX,aAAU,CAAC3B,MAAM,CAACzB,WAAW,CAAC,EAAE;QAClC,IAAI,CAACgB,MAAM,GAAGoC,aAAU,CAAC6B,MAAM,CAACjF,WAAW,EAAE+D,MAAM,CAAC;MACtD;IACF;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EAPE;IAAAd,GAAA;IAAAC,KAAA,EAQA,SAAAc,cAAsBhE,WAAwB,EAAEiE,MAAc,EAAE;MAC9D,IAAIb,aAAU,CAAC3B,MAAM,CAACzB,WAAW,CAAC,EAAE;QAClC,IAAI,CAACiB,MAAM,GAAGmC,aAAU,CAAC6B,MAAM,CAACjF,WAAW,EAAEiE,MAAM,CAAC;MACtD;IACF;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAAhB,GAAA;IAAAC,KAAA,EAOA,SAAAU,aAAqB5D,WAAwB,EAAE;MAC7C,IAAI,CAACsC,KAAK,GAAGc,aAAU,CAAC8B,mBAAmB,CAAClF,WAAW,CAAC;IAC1D;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAAiD,GAAA;IAAAC,KAAA,EAOA,SAAAkB,YAAoBnC,IAAY,EAAE;MAChC,IAAI,CAACA,IAAI,GAAGA,IAAI;IAClB;EAAC;EAAA,OAAApC,MAAA;AAAA"}
1
+ {"version":3,"names":["_constants","require","_util","_interopRequireDefault","Member","exports","default","participant","options","arguments","length","undefined","_classCallCheck2","_defineProperty2","MEETINGS","canReclaimHost","id","name","isAudioMuted","isVideoMuted","isHandRaised","supportsBreakouts","supportLiveAnnotation","isSelf","isHost","isGuest","isInLobby","isInMeeting","isNotAdmitted","isContentSharing","status","isDevice","isUser","associatedUser","associatedUsers","_set","isRecording","isMutable","isRemovable","isBrb","type","isModerator","isModeratorAssignmentProhibited","isPresenterAssignmentProhibited","isPairedWithSelf","roles","pairedWith","participantUrl","memberId","mediaStatus","audio","video","processParticipant","processParticipantOptions","processMember","_createClass2","key","value","processPairedDevice","MemberUtil","extractId","extractName","isBreakoutsSupported","supportsInterpretation","isInterpretationSupported","isLiveAnnotationSupported","processStatus","processRoles","extractPairedWithParticipantUrl","processIsSelf","selfId","processIsHost","hostId","processIsContentSharing","contentSharingId","processType","processIsRecording","recordingId","extractMediaStatus","extractStatus","_IN_LOBBY_","_IN_MEETING_","_NOT_IN_MEETING_","setIsContentSharing","flag","setIsHost","setIsSelf","sharingId","isSame","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_, _OBSERVE_} from '../constants';\nimport {IExternalRoles, IMediaStatus, Participant, ParticipantUrl} from './types';\nimport MemberUtil from './util';\n\nexport type MemberId = string;\n/**\n * @class Member\n */\nexport default class Member {\n associatedUser: MemberId | null; // deprecated, use associatedUsers instead\n associatedUsers: Set<MemberId>; // users associated with this device, empty if this member is not a device\n canReclaimHost: boolean;\n id: MemberId;\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 isPresenterAssignmentProhibited: any;\n isMutable: any;\n isNotAdmitted: any;\n isRecording: any;\n isRemovable: any;\n isSelf: any;\n isPairedWithSelf: boolean; // true for a device that we are paired with\n isBrb: boolean;\n isUser: any;\n isVideoMuted: any;\n roles: IExternalRoles;\n mediaStatus: IMediaStatus;\n name: any;\n participant: any;\n status: any;\n supportsBreakouts: boolean;\n supportsInterpretation: boolean;\n supportLiveAnnotation: boolean;\n type: any;\n namespace = MEETINGS;\n pairedWith: {\n participantUrl?: ParticipantUrl;\n memberId?: MemberId;\n };\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: Participant,\n options:\n | {\n selfId: string;\n hostId: string;\n contentSharingId: string;\n type: string;\n }\n | any = {}\n ) {\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.canReclaimHost = false;\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 * Deprecated: use associatedUsers instead\n * Is this member associated to another user by way of pairing (typical of devices)\n * @instance\n * @type {MemberId|null}\n * @deprecated\n * @public\n * @memberof Member\n */\n this.associatedUser = 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.associatedUsers = new Set<MemberId>();\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 {Boolean}\n * @public\n * @memberof Member\n */\n this.isBrb = false;\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 {Boolean}\n * @public\n * @memberof Member\n */\n this.isPresenterAssignmentProhibited = null;\n\n /**\n * @instance\n * @type {Boolean}\n * @public\n * @memberof Member\n */\n this.isPairedWithSelf = false;\n\n /**\n * @instance\n * @type {IExternalRoles}\n * @public\n * @memberof Member\n */\n this.roles = null;\n\n this.pairedWith = {\n participantUrl: undefined,\n memberId: undefined,\n };\n /**\n * @instance\n * @type {IMediaStatus}\n * @public\n * @memberof Member\n * @example {audio: MediaStatus.RECVONLY, video: MediaStatus.SENDRECV}\n */\n this.mediaStatus = {\n audio: null,\n video: null,\n };\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: Participant) {\n this.participant = participant;\n if (participant) {\n this.processPairedDevice(participant);\n this.canReclaimHost = MemberUtil.canReclaimHost(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.supportsInterpretation = MemberUtil.isInterpretationSupported(participant);\n this.supportLiveAnnotation = MemberUtil.isLiveAnnotationSupported(participant);\n this.isGuest = MemberUtil.isGuest(participant);\n this.isBrb = MemberUtil.isBrb(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.isPresenterAssignmentProhibited =\n MemberUtil.isPresenterAssignmentProhibited(participant);\n this.processStatus(participant);\n this.processRoles(participant);\n // must be done last\n this.isNotAdmitted = MemberUtil.isNotAdmitted(participant, this.isGuest, this.status);\n }\n }\n\n /**\n * Checks if the participant is paired with another device\n *\n * @param {any} participant the locus participant object\n * @returns {void}\n */\n processPairedDevice(participant: Participant) {\n // we can't populate this.pairedWith.memberId here because the member for that device might not yet exist\n // so only populating the participantUrl and memberId will be set later\n this.pairedWith.participantUrl = MemberUtil.extractPairedWithParticipantUrl(participant);\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: Participant, 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 this.mediaStatus = MemberUtil.extractMediaStatus(this.participant);\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: Participant) {\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: Participant, sharingId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isContentSharing = MemberUtil.isSame(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: Participant, 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: Participant, selfId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isSelf = MemberUtil.isSame(participant, 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: Participant, hostId: string) {\n if (MemberUtil.isUser(participant)) {\n this.isHost = MemberUtil.isSame(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: Participant) {\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,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AALA;AACA;AACA;AAMA;AACA;AACA;AAFA,IAGqBG,MAAM,GAAAC,OAAA,CAAAC,OAAA;EAwCzB;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;EACE,SAAAF,OACEG,WAAwB,EASxB;IAAA,IARAC,OAOO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAAA,IAAAG,gBAAA,CAAAN,OAAA,QAAAF,MAAA;IAAA,IAAAS,gBAAA,CAAAP,OAAA;IA1DmB;IAAA,IAAAO,gBAAA,CAAAP,OAAA;IACD;IAAA,IAAAO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I,IAAI,CAACR,WAAW,GAAG,IAAI;IACvB;AACJ;AACA;AACA;AACA;AACA;AACA;IACI,IAAI,CAACS,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;AACA;AACA;IACI,IAAI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iB,MAAM,GAAGmC,aAAU,CAAC6B,MAAM,CAACjF,WAAW,EAAEiE,MAAM,CAAC;MACtD;IACF;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAAhB,GAAA;IAAAC,KAAA,EAOA,SAAAU,aAAqB5D,WAAwB,EAAE;MAC7C,IAAI,CAACsC,KAAK,GAAGc,aAAU,CAAC8B,mBAAmB,CAAClF,WAAW,CAAC;IAC1D;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAAiD,GAAA;IAAAC,KAAA,EAOA,SAAAkB,YAAoBnC,IAAY,EAAE;MAChC,IAAI,CAACA,IAAI,GAAGA,IAAI;IAClB;EAAC;EAAA,OAAApC,MAAA;AAAA"}
@@ -66,6 +66,13 @@ export type AddMediaOptions = {
66
66
  remoteMediaManagerConfig?: RemoteMediaManagerConfiguration;
67
67
  bundlePolicy?: BundlePolicy;
68
68
  allowMediaInLobby?: boolean;
69
+ additionalMediaOptions?: AdditionalMediaOptions;
70
+ };
71
+ export type AdditionalMediaOptions = {
72
+ sendVideo?: boolean;
73
+ receiveVideo?: boolean;
74
+ sendAudio?: boolean;
75
+ receiveAudio?: boolean;
69
76
  };
70
77
  export type CallStateForMetrics = {
71
78
  correlationId?: string;
@@ -458,7 +458,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
458
458
  }, _callee7);
459
459
  }))();
460
460
  },
461
- version: "3.8.1-next.8"
461
+ version: "3.8.1-web-workers-keepalive.1"
462
462
  });
463
463
  var _default = exports.default = Webinar;
464
464
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -43,13 +43,13 @@
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.8.1-next.8",
47
- "@webex/plugin-rooms": "3.8.0-next.32",
48
- "@webex/test-helper-chai": "3.8.1-next.3",
49
- "@webex/test-helper-mocha": "3.8.1-next.3",
50
- "@webex/test-helper-mock-webex": "3.8.1-next.3",
51
- "@webex/test-helper-retry": "3.8.1-next.3",
52
- "@webex/test-helper-test-users": "3.8.1-next.3",
46
+ "@webex/plugin-meetings": "3.8.1-web-workers-keepalive.1",
47
+ "@webex/plugin-rooms": "3.8.1-web-workers-keepalive.1",
48
+ "@webex/test-helper-chai": "3.8.1-web-workers-keepalive.1",
49
+ "@webex/test-helper-mocha": "3.8.1-web-workers-keepalive.1",
50
+ "@webex/test-helper-mock-webex": "3.8.1-web-workers-keepalive.1",
51
+ "@webex/test-helper-retry": "3.8.1-web-workers-keepalive.1",
52
+ "@webex/test-helper-test-users": "3.8.1-web-workers-keepalive.1",
53
53
  "chai": "^4.3.4",
54
54
  "chai-as-promised": "^7.1.1",
55
55
  "eslint": "^8.24.0",
@@ -61,23 +61,23 @@
61
61
  "typescript": "^4.7.4"
62
62
  },
63
63
  "dependencies": {
64
- "@webex/common": "3.8.1-next.3",
65
- "@webex/event-dictionary-ts": "^1.0.1753",
66
- "@webex/internal-media-core": "2.18.1",
67
- "@webex/internal-plugin-conversation": "3.8.1-next.3",
68
- "@webex/internal-plugin-device": "3.8.1-next.3",
69
- "@webex/internal-plugin-llm": "3.8.1-next.3",
70
- "@webex/internal-plugin-mercury": "3.8.1-next.3",
71
- "@webex/internal-plugin-metrics": "3.8.1-next.3",
72
- "@webex/internal-plugin-support": "3.8.1-next.3",
73
- "@webex/internal-plugin-user": "3.8.1-next.3",
74
- "@webex/internal-plugin-voicea": "3.8.1-next.8",
75
- "@webex/media-helpers": "3.8.1-next.4",
76
- "@webex/plugin-people": "3.8.1-next.3",
77
- "@webex/plugin-rooms": "3.8.0-next.32",
64
+ "@webex/common": "3.8.1-web-workers-keepalive.1",
65
+ "@webex/event-dictionary-ts": "^1.0.1819",
66
+ "@webex/internal-media-core": "2.18.3",
67
+ "@webex/internal-plugin-conversation": "3.8.1-web-workers-keepalive.1",
68
+ "@webex/internal-plugin-device": "3.8.1-web-workers-keepalive.1",
69
+ "@webex/internal-plugin-llm": "3.8.1-web-workers-keepalive.1",
70
+ "@webex/internal-plugin-mercury": "3.8.1-web-workers-keepalive.1",
71
+ "@webex/internal-plugin-metrics": "3.8.1-web-workers-keepalive.1",
72
+ "@webex/internal-plugin-support": "3.8.1-web-workers-keepalive.1",
73
+ "@webex/internal-plugin-user": "3.8.1-web-workers-keepalive.1",
74
+ "@webex/internal-plugin-voicea": "3.8.1-web-workers-keepalive.1",
75
+ "@webex/media-helpers": "3.8.1-web-workers-keepalive.1",
76
+ "@webex/plugin-people": "3.8.1-web-workers-keepalive.1",
77
+ "@webex/plugin-rooms": "3.8.1-web-workers-keepalive.1",
78
78
  "@webex/ts-sdp": "^1.8.1",
79
- "@webex/web-capabilities": "^1.4.0",
80
- "@webex/webex-core": "3.8.1-next.3",
79
+ "@webex/web-capabilities": "^1.6.0",
80
+ "@webex/webex-core": "3.8.1-web-workers-keepalive.1",
81
81
  "ampersand-collection": "^2.0.2",
82
82
  "bowser": "^2.11.0",
83
83
  "btoa": "^1.2.1",
@@ -93,5 +93,5 @@
93
93
  "//": [
94
94
  "TODO: upgrade jwt-decode when moving to node 18"
95
95
  ],
96
- "version": "3.8.1-next.8"
96
+ "version": "3.8.1-web-workers-keepalive.1"
97
97
  }
@@ -239,8 +239,8 @@ Media.createMediaConnection = (
239
239
  screenShareAudio: shareAudioStream?.outputStream?.getTracks()[0], // TODO: add type for screenShareAudio in internal-media-core SPARK-446923
240
240
  } as unknown,
241
241
  direction: {
242
- audio: Media.getDirection(true, mediaDirection.receiveAudio, mediaDirection.sendAudio),
243
- video: Media.getDirection(true, mediaDirection.receiveVideo, mediaDirection.sendVideo),
242
+ audio: Media.getDirection(false, mediaDirection.receiveAudio, mediaDirection.sendAudio),
243
+ video: Media.getDirection(false, mediaDirection.receiveVideo, mediaDirection.sendVideo),
244
244
  screenShareVideo: Media.getDirection(
245
245
  false,
246
246
  mediaDirection.receiveShare,
@@ -231,6 +231,14 @@ export type AddMediaOptions = {
231
231
  remoteMediaManagerConfig?: RemoteMediaManagerConfiguration; // applies only to multistream meetings
232
232
  bundlePolicy?: BundlePolicy; // applies only to multistream meetings
233
233
  allowMediaInLobby?: boolean; // allows adding media when in the lobby
234
+ additionalMediaOptions?: AdditionalMediaOptions; // allows adding additional options like send/receive audio/video
235
+ };
236
+
237
+ export type AdditionalMediaOptions = {
238
+ sendVideo?: boolean; // if not specified, default value of videoEnabled is used
239
+ receiveVideo?: boolean; // if not specified, default value of videoEnabled is used
240
+ sendAudio?: boolean; // if not specified, default value of audioEnabled true is used
241
+ receiveAudio?: boolean; // if not specified, default value of audioEnabled true is used
234
242
  };
235
243
 
236
244
  export type CallStateForMetrics = {
@@ -2758,9 +2766,11 @@ export default class Meeting extends StatelessWebexPlugin {
2758
2766
  LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED,
2759
2767
  ({spokenLanguage}) => {
2760
2768
  if (spokenLanguage) {
2761
- this.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
2769
+ if (this.transcription?.languageOptions) {
2770
+ this.transcription.languageOptions.currentSpokenLanguage = spokenLanguage;
2771
+ }
2762
2772
  // @ts-ignore
2763
- this.webex.internal.voicea.onSpokenLanguageUpdate(spokenLanguage);
2773
+ this.webex.internal.voicea.onSpokenLanguageUpdate(spokenLanguage, this.id);
2764
2774
 
2765
2775
  Trigger.trigger(
2766
2776
  this,
@@ -2769,7 +2779,7 @@ export default class Meeting extends StatelessWebexPlugin {
2769
2779
  function: 'setupLocusControlsListener',
2770
2780
  },
2771
2781
  EVENT_TRIGGERS.MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED,
2772
- {spokenLanguage}
2782
+ {spokenLanguage, meetingId: this.id}
2773
2783
  );
2774
2784
  }
2775
2785
  }
@@ -7755,8 +7765,21 @@ export default class Meeting extends StatelessWebexPlugin {
7755
7765
  shareVideoEnabled = true,
7756
7766
  remoteMediaManagerConfig,
7757
7767
  bundlePolicy = 'max-bundle',
7768
+ additionalMediaOptions = {},
7758
7769
  } = options;
7759
7770
 
7771
+ const {
7772
+ sendVideo: rawSendVideo,
7773
+ receiveVideo: rawReceiveVideo,
7774
+ sendAudio: rawSendAudio,
7775
+ receiveAudio: rawReceiveAudio,
7776
+ } = additionalMediaOptions;
7777
+
7778
+ const sendVideo = videoEnabled && (rawSendVideo ?? true);
7779
+ const receiveVideo = videoEnabled && (rawReceiveVideo ?? true);
7780
+ const sendAudio = audioEnabled && (rawSendAudio ?? true);
7781
+ const receiveAudio = audioEnabled && (rawReceiveAudio ?? true);
7782
+
7760
7783
  this.allowMediaInLobby = options?.allowMediaInLobby;
7761
7784
 
7762
7785
  // If the user is unjoined or guest waiting in lobby dont allow the user to addMedia
@@ -7792,11 +7815,11 @@ export default class Meeting extends StatelessWebexPlugin {
7792
7815
  // when audioEnabled/videoEnabled is true, we set sendAudio/sendVideo to true even before any streams are published
7793
7816
  // to avoid doing an extra SDP exchange when they are published for the first time
7794
7817
  this.mediaProperties.setMediaDirection({
7795
- sendAudio: audioEnabled,
7796
- sendVideo: videoEnabled,
7818
+ sendAudio,
7819
+ sendVideo,
7797
7820
  sendShare: false,
7798
- receiveAudio: audioEnabled,
7799
- receiveVideo: videoEnabled,
7821
+ receiveAudio,
7822
+ receiveVideo,
7800
7823
  receiveShare: shareAudioEnabled || shareVideoEnabled,
7801
7824
  });
7802
7825
 
@@ -3,7 +3,6 @@
3
3
  */
4
4
  import {MEETINGS, _IN_LOBBY_, _NOT_IN_MEETING_, _IN_MEETING_, _OBSERVE_} from '../constants';
5
5
  import {IExternalRoles, IMediaStatus, Participant, ParticipantUrl} from './types';
6
-
7
6
  import MemberUtil from './util';
8
7
 
9
8
  export type MemberId = string;
@@ -137,6 +137,113 @@ describe('createMediaConnection', () => {
137
137
  );
138
138
  });
139
139
 
140
+ it('should set direction to sendonly for both audio and video when only send flags are true', () => {
141
+ const roapMediaConnectionConstructorStub = sinon
142
+ .stub(InternalMediaCoreModule, 'RoapMediaConnection')
143
+ .returns(fakeRoapMediaConnection);
144
+
145
+ StaticConfig.set({bandwidth: {audio: 123, video: 456, startBitrate: 999}});
146
+
147
+ const ENABLE_EXTMAP = false;
148
+ const ENABLE_RTX = true;
149
+
150
+ Media.createMediaConnection(false, 'sendonly-debug-id', 'meetingId', {
151
+ mediaProperties: {
152
+ mediaDirection: {
153
+ sendAudio: true,
154
+ receiveAudio: false,
155
+ sendVideo: true,
156
+ receiveVideo: false,
157
+ sendShare: false,
158
+ receiveShare: false,
159
+ },
160
+ audioStream: fakeAudioStream,
161
+ videoStream: fakeVideoStream,
162
+ shareVideoTrack: null,
163
+ shareAudioTrack: null,
164
+ },
165
+ remoteQualityLevel: 'HIGH',
166
+ enableRtx: ENABLE_RTX,
167
+ enableExtmap: ENABLE_EXTMAP,
168
+ turnServerInfo: undefined,
169
+ iceCandidatesTimeout: undefined,
170
+ });
171
+
172
+ assert.calledWith(
173
+ roapMediaConnectionConstructorStub,
174
+ sinon.match.any,
175
+ {
176
+ localTracks: {
177
+ audio: fakeTrack,
178
+ video: fakeTrack,
179
+ screenShareVideo: undefined,
180
+ screenShareAudio: undefined,
181
+ },
182
+ direction: {
183
+ audio: 'sendonly',
184
+ video: 'sendonly',
185
+ screenShareVideo: 'inactive',
186
+ },
187
+ remoteQualityLevel: 'HIGH',
188
+ },
189
+ 'sendonly-debug-id'
190
+ );
191
+ });
192
+
193
+ it('should set direction to recvonly for both audio and video when only receive flags are true', () => {
194
+ const roapMediaConnectionConstructorStub = sinon
195
+ .stub(InternalMediaCoreModule, 'RoapMediaConnection')
196
+ .returns(fakeRoapMediaConnection);
197
+
198
+ StaticConfig.set({bandwidth: {audio: 123, video: 456, startBitrate: 999}});
199
+
200
+ const ENABLE_EXTMAP = true;
201
+ const ENABLE_RTX = false;
202
+
203
+ Media.createMediaConnection(false, 'recvonly-debug-id', 'meetingId', {
204
+ mediaProperties: {
205
+ mediaDirection: {
206
+ sendAudio: false,
207
+ receiveAudio: true,
208
+ sendVideo: false,
209
+ receiveVideo: true,
210
+ sendShare: false,
211
+ receiveShare: false,
212
+ },
213
+ audioStream: fakeAudioStream,
214
+ videoStream: fakeVideoStream,
215
+ shareVideoTrack: null,
216
+ shareAudioTrack: null,
217
+ },
218
+ remoteQualityLevel: 'HIGH',
219
+ enableRtx: ENABLE_RTX,
220
+ enableExtmap: ENABLE_EXTMAP,
221
+ turnServerInfo: undefined,
222
+ iceCandidatesTimeout: undefined,
223
+ });
224
+
225
+ assert.calledWith(
226
+ roapMediaConnectionConstructorStub,
227
+ sinon.match.any,
228
+ {
229
+ localTracks: {
230
+ audio: fakeTrack,
231
+ video: fakeTrack,
232
+ screenShareVideo: undefined,
233
+ screenShareAudio: undefined,
234
+ },
235
+ direction: {
236
+ audio: 'recvonly',
237
+ video: 'recvonly',
238
+ screenShareVideo: 'inactive',
239
+ },
240
+ remoteQualityLevel: 'HIGH',
241
+ },
242
+ 'recvonly-debug-id'
243
+ );
244
+ });
245
+
246
+
140
247
  it('creates a MultistreamRoapMediaConnection when multistream is enabled', () => {
141
248
  const multistreamRoapMediaConnectionConstructorStub = sinon
142
249
  .stub(InternalMediaCoreModule, 'MultistreamRoapMediaConnection')
@@ -1208,8 +1208,76 @@ describe('plugin-meetings', () => {
1208
1208
  reason: 'joinWithMedia failure',
1209
1209
  });
1210
1210
  });
1211
- });
1212
1211
 
1212
+ it('should ignore sendVideo/receiveVideo when videoEnabled is false', async () => {
1213
+ await meeting.joinWithMedia({
1214
+ joinOptions,
1215
+ mediaOptions: {
1216
+ videoEnabled: false,
1217
+ sendVideo: true,
1218
+ receiveVideo: true,
1219
+ allowMediaInLobby: true,
1220
+ },
1221
+ });
1222
+
1223
+ assert.calledWithMatch(
1224
+ meeting.addMediaInternal,
1225
+ sinon.match.any,
1226
+ sinon.match.any,
1227
+ sinon.match.any,
1228
+ sinon.match.has('videoEnabled', false)
1229
+ .and(sinon.match.has('allowMediaInLobby', true))
1230
+ );
1231
+ });
1232
+
1233
+ it('should ignore sendAudio/receiveAudio when audioEnabled is false', async () => {
1234
+ await meeting.joinWithMedia({
1235
+ joinOptions,
1236
+ mediaOptions: {
1237
+ audioEnabled: false,
1238
+ sendAudio: true,
1239
+ receiveAudio: false,
1240
+ allowMediaInLobby: true,
1241
+ },
1242
+ });
1243
+
1244
+ assert.calledWithMatch(
1245
+ meeting.addMediaInternal,
1246
+ sinon.match.any,
1247
+ sinon.match.any,
1248
+ sinon.match.any,
1249
+ sinon.match.has('audioEnabled', false)
1250
+ .and(sinon.match.has('allowMediaInLobby', true))
1251
+ );
1252
+ });
1253
+
1254
+
1255
+ it('should use provided send/receive values when videoEnabled/audioEnabled are true or not set', async () => {
1256
+ await meeting.joinWithMedia({
1257
+ joinOptions,
1258
+ mediaOptions: {
1259
+ sendVideo: true,
1260
+ receiveVideo: false,
1261
+ sendAudio: false,
1262
+ receiveAudio: true,
1263
+ allowMediaInLobby: true,
1264
+ },
1265
+ });
1266
+
1267
+ assert.calledWith(
1268
+ meeting.addMediaInternal,
1269
+ sinon.match.any,
1270
+ sinon.match.any,
1271
+ sinon.match.any,
1272
+ sinon.match({
1273
+ sendVideo: true,
1274
+ receiveVideo: false,
1275
+ sendAudio: false,
1276
+ receiveAudio: true,
1277
+ })
1278
+ );
1279
+ });
1280
+ });
1213
1281
  describe('#isTranscriptionSupported', () => {
1214
1282
  it('should return false if the feature is not supported for the meeting', () => {
1215
1283
  meeting.locusInfo.controls = {transcribe: {caption: false}};
@@ -1240,7 +1308,7 @@ describe('plugin-meetings', () => {
1240
1308
  LOCUSINFO.EVENTS.CONTROLS_MEETING_TRANSCRIPTION_SPOKEN_LANGUAGE_UPDATED,
1241
1309
  {spokenLanguage: 'fr'},
1242
1310
  );
1243
- assert.calledWith(webex.internal.voicea.onSpokenLanguageUpdate, 'fr');
1311
+ assert.calledWith(webex.internal.voicea.onSpokenLanguageUpdate, 'fr', meeting.id);
1244
1312
  assert.equal(meeting.transcription.languageOptions.currentSpokenLanguage, 'fr');
1245
1313
  assert.calledWith(
1246
1314
  TriggerProxy.trigger,
@@ -4286,11 +4354,11 @@ describe('plugin-meetings', () => {
4286
4354
 
4287
4355
  const error = new Error();
4288
4356
  meeting.meetingRequest.setBrb = sinon.stub().rejects(error);
4289
-
4357
+
4290
4358
  await expect(
4291
4359
  meeting.beRightBack(true)
4292
- ).to.be.rejectedWith(error);
4293
-
4360
+ ).to.be.rejectedWith(error);
4361
+
4294
4362
  assert.isFalse(meeting.brbState.state.syncToServerInProgress);
4295
4363
  });
4296
4364
  });
@@ -7948,13 +8016,11 @@ describe('plugin-meetings', () => {
7948
8016
  meeting.isoLocalClientMeetingJoinTime = undefined;
7949
8017
  assert.equal(meeting.isoLocalClientMeetingJoinTime, currentSystemTime);
7950
8018
  });
7951
-
7952
8019
  it('should fallback to system clock ISO string when given an invalid value', () => {
7953
8020
  const currentSystemTime = new Date().toISOString();
7954
8021
  meeting.isoLocalClientMeetingJoinTime = 'invalid-date';
7955
8022
  assert.equal(meeting.isoLocalClientMeetingJoinTime, currentSystemTime);
7956
8023
  });
7957
-
7958
8024
  it('should set the isoLocalClientMeetingJoinTime correctly for a valid date string', () => {
7959
8025
  const validDateString = 'Tue, 01 Apr 2025 13:00:36 GMT';
7960
8026
  const expectedISOString = new Date(validDateString).toISOString();
@@ -9128,7 +9194,6 @@ describe('plugin-meetings', () => {
9128
9194
  meeting.deferSDPAnswer = {
9129
9195
  reject: sinon.stub(),
9130
9196
  };
9131
-
9132
9197
  const clearTimeoutSpy = sinon.spy(clock, 'clearTimeout');
9133
9198
 
9134
9199
  const fakeError = new Errors.SdpAnswerHandlingError(fakeErrorMessage, {
@@ -3,9 +3,7 @@ import MockWebex from '@webex/test-helper-mock-webex';
3
3
  import sinon from 'sinon';
4
4
  import EventEmitter from 'events';
5
5
  import testUtils from '../../../utils/testUtils';
6
- import Reachability, {
7
- ReachabilityResultsForBackend,
8
- } from '@webex/plugin-meetings/src/reachability/';
6
+ import Reachability, {ReachabilityResultsForBackend} from '@webex/plugin-meetings/src/reachability/';
9
7
  import {ClusterNode} from '../../../../src/reachability/request';
10
8
  import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
11
9
  import * as ClusterReachabilityModule from '@webex/plugin-meetings/src/reachability/clusterReachability';