@webex/plugin-meetings 3.0.0-beta.34 → 3.0.0-beta.36

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.
Files changed (71) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/edit-lock-error.js +52 -0
  3. package/dist/breakouts/edit-lock-error.js.map +1 -0
  4. package/dist/breakouts/index.js +86 -2
  5. package/dist/breakouts/index.js.map +1 -1
  6. package/dist/constants.js +14 -2
  7. package/dist/constants.js.map +1 -1
  8. package/dist/media/index.js +4 -18
  9. package/dist/media/index.js.map +1 -1
  10. package/dist/media/properties.js +3 -3
  11. package/dist/media/properties.js.map +1 -1
  12. package/dist/meeting/index.js +194 -306
  13. package/dist/meeting/index.js.map +1 -1
  14. package/dist/meeting/muteState.js +7 -2
  15. package/dist/meeting/muteState.js.map +1 -1
  16. package/dist/meeting/request.js +135 -85
  17. package/dist/meeting/request.js.map +1 -1
  18. package/dist/meeting/util.js +2 -2
  19. package/dist/meeting/util.js.map +1 -1
  20. package/dist/metrics/constants.js +0 -4
  21. package/dist/metrics/constants.js.map +1 -1
  22. package/dist/reachability/index.js +25 -17
  23. package/dist/reachability/index.js.map +1 -1
  24. package/dist/reachability/request.js +12 -5
  25. package/dist/reachability/request.js.map +1 -1
  26. package/dist/reconnection-manager/index.js +1 -2
  27. package/dist/reconnection-manager/index.js.map +1 -1
  28. package/dist/roap/request.js +114 -83
  29. package/dist/roap/request.js.map +1 -1
  30. package/dist/types/breakouts/edit-lock-error.d.ts +15 -0
  31. package/dist/types/constants.d.ts +13 -1
  32. package/dist/types/media/properties.d.ts +7 -6
  33. package/dist/types/meeting/index.d.ts +11 -36
  34. package/dist/types/meeting/request.d.ts +10 -0
  35. package/dist/types/metrics/constants.d.ts +0 -4
  36. package/dist/types/reachability/request.d.ts +5 -3
  37. package/dist/types/roap/request.d.ts +6 -3
  38. package/package.json +19 -19
  39. package/src/breakouts/README.md +8 -2
  40. package/src/breakouts/edit-lock-error.ts +25 -0
  41. package/src/breakouts/index.ts +73 -0
  42. package/src/constants.ts +13 -1
  43. package/src/media/index.ts +14 -24
  44. package/src/media/properties.ts +16 -10
  45. package/src/meeting/index.ts +122 -204
  46. package/src/meeting/muteState.ts +5 -5
  47. package/src/meeting/request.ts +35 -1
  48. package/src/meeting/util.ts +5 -4
  49. package/src/metrics/constants.ts +0 -4
  50. package/src/reachability/index.ts +12 -4
  51. package/src/reachability/request.ts +10 -5
  52. package/src/reconnection-manager/index.ts +1 -1
  53. package/src/roap/request.ts +93 -78
  54. package/test/integration/spec/converged-space-meetings.js +3 -3
  55. package/test/integration/spec/journey.js +3 -3
  56. package/test/unit/spec/breakouts/edit-lock-error.ts +30 -0
  57. package/test/unit/spec/breakouts/index.ts +92 -1
  58. package/test/unit/spec/media/index.ts +8 -6
  59. package/test/unit/spec/meeting/index.js +87 -114
  60. package/test/unit/spec/meeting/muteState.js +21 -22
  61. package/test/unit/spec/meeting/request.js +27 -0
  62. package/test/unit/spec/meeting/utils.js +3 -1
  63. package/test/unit/spec/reachability/index.ts +18 -7
  64. package/test/unit/spec/reachability/request.js +66 -0
  65. package/test/unit/spec/roap/request.ts +187 -84
  66. package/test/utils/testUtils.js +30 -25
  67. package/dist/meeting/effectsState.js +0 -262
  68. package/dist/meeting/effectsState.js.map +0 -1
  69. package/dist/types/meeting/effectsState.d.ts +0 -42
  70. package/src/meeting/effectsState.ts +0 -211
  71. package/test/unit/spec/meeting/effectsState.js +0 -285
@@ -13,7 +13,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs2/he
13
13
  var _loggerProxy = _interopRequireDefault(require("../common/logs/logger-proxy"));
14
14
  var _parameter = _interopRequireDefault(require("../common/errors/parameter"));
15
15
  var _permission = _interopRequireDefault(require("../common/errors/permission"));
16
- var _media = _interopRequireDefault(require("../media"));
17
16
  var _util = _interopRequireDefault(require("./util"));
18
17
  var _constants = require("../constants");
19
18
  /* Certain aspects of server interaction for video muting are not implemented as we currently don't support remote muting of video.
@@ -121,7 +120,13 @@ var MuteState = /*#__PURE__*/function () {
121
120
  }, {
122
121
  key: "applyClientStateLocally",
123
122
  value: function applyClientStateLocally(meeting) {
124
- _media.default.setLocalTrack(!this.state.client.localMute, this.type === _constants.AUDIO ? meeting.mediaProperties.audioTrack : meeting.mediaProperties.videoTrack);
123
+ if (this.type === _constants.AUDIO) {
124
+ var _meeting$mediaPropert;
125
+ (_meeting$mediaPropert = meeting.mediaProperties.audioTrack) === null || _meeting$mediaPropert === void 0 ? void 0 : _meeting$mediaPropert.setMuted(this.state.client.localMute);
126
+ } else {
127
+ var _meeting$mediaPropert2;
128
+ (_meeting$mediaPropert2 = meeting.mediaProperties.videoTrack) === null || _meeting$mediaPropert2 === void 0 ? void 0 : _meeting$mediaPropert2.setMuted(this.state.client.localMute);
129
+ }
125
130
  }
126
131
 
127
132
  /**
@@ -1 +1 @@
1
- {"version":3,"names":["createMuteState","type","meeting","mediaDirection","AUDIO","sendAudio","VIDEO","sendVideo","LoggerProxy","logger","info","id","MuteState","ParameterError","state","client","localMute","server","remoteMute","remoteMuted","unmuteAllowed","syncToServerInProgress","pendingPromiseResolve","pendingPromiseReject","mute","reject","PermissionError","applyClientStateLocally","resolve","applyClientStateToServer","Media","setLocalTrack","mediaProperties","audioTrack","videoTrack","localMuteRequiresSync","remoteMuteRequiresSync","localMuteSyncPromise","sendLocalMuteRequestToServer","then","sendRemoteMuteRequestToServer","catch","e","audioMuted","audio","videoMuted","video","MeetingUtil","remoteUpdateAudioVideo","locus","locusInfo","onFullLocus","remoteUpdateError","warn","members","muteMember","selfId","muted","Error","isMuted","isSelf"],"sources":["muteState.ts"],"sourcesContent":["import LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\nimport PermissionError from '../common/errors/permission';\nimport Media from '../media';\nimport MeetingUtil from './util';\nimport {AUDIO, VIDEO} from '../constants';\n\n/* Certain aspects of server interaction for video muting are not implemented as we currently don't support remote muting of video.\n If we ever need to support it, search for REMOTE_MUTE_VIDEO_MISSING_IMPLEMENTATION string to find the places that need updating\n*/\n\n// eslint-disable-next-line import/prefer-default-export\nexport const createMuteState = (type, meeting, mediaDirection) => {\n if (type === AUDIO && !mediaDirection.sendAudio) {\n return null;\n }\n if (type === VIDEO && !mediaDirection.sendVideo) {\n return null;\n }\n\n LoggerProxy.logger.info(\n `Meeting:muteState#createMuteState --> ${type}: creating MuteState for meeting id ${meeting?.id}`\n );\n\n return new MuteState(type, meeting);\n};\n\n/** The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches\n the last requested state by the client.\n\n More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#\n*/\nclass MuteState {\n pendingPromiseReject: any;\n pendingPromiseResolve: any;\n state: any;\n type: any;\n\n /**\n * Constructor\n *\n * @param {String} type - audio or video\n * @param {Object} meeting - the meeting object (used for reading current remote mute status)\n */\n constructor(type: string, meeting: any) {\n if (type !== AUDIO && type !== VIDEO) {\n throw new ParameterError('Mute state is designed for handling audio or video only');\n }\n this.type = type;\n this.state = {\n client: {\n localMute: false,\n },\n server: {\n localMute: false,\n // initial values available only for audio (REMOTE_MUTE_VIDEO_MISSING_IMPLEMENTATION)\n remoteMute: type === AUDIO ? meeting.remoteMuted : false,\n unmuteAllowed: type === AUDIO ? meeting.unmuteAllowed : true,\n },\n syncToServerInProgress: false,\n };\n // these 2 hold the resolve, reject methods for the promise we returned to the client in last handleClientRequest() call\n this.pendingPromiseResolve = null;\n this.pendingPromiseReject = null;\n }\n\n /**\n * Handles mute/unmute request from the client/user. Returns a promise that's resolved once the server update is completed or\n * at the point that this request becomese superseded by another client request.\n *\n * The client doesn't have to wait for the returned promise to resolve before calling handleClientRequest() again. If\n * handleClientRequest() is called again before the previous one resolved, the MuteState class will make sure that eventually\n * the server state will match the last requested state from the client.\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [mute] true for muting, false for unmuting request\n * @returns {Promise}\n */\n public handleClientRequest(meeting?: object, mute?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleClientRequest --> ${this.type}: user requesting new mute state: ${mute}`\n );\n\n if (!mute && !this.state.server.unmuteAllowed) {\n return Promise.reject(\n new PermissionError('User is not allowed to unmute self (hard mute feature is being used)')\n );\n }\n\n // we don't check if we're already in the same state, because even if we were, we would still have to apply the mute state locally,\n // because the client may have changed the audio/vidoe tracks\n this.state.client.localMute = mute;\n this.applyClientStateLocally(meeting);\n\n return new Promise((resolve, reject) => {\n if (this.pendingPromiseResolve) {\n // resolve the last promise we returned to the client as the client has issued a new request that has superseded the previous one\n this.pendingPromiseResolve();\n }\n this.pendingPromiseResolve = resolve;\n this.pendingPromiseReject = reject;\n this.applyClientStateToServer(meeting);\n });\n }\n\n /**\n * Applies the current mute state to the local track (by enabling or disabling it accordingly)\n *\n * @public\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n public applyClientStateLocally(meeting?: any) {\n Media.setLocalTrack(\n !this.state.client.localMute,\n this.type === AUDIO ? meeting.mediaProperties.audioTrack : meeting.mediaProperties.videoTrack\n );\n }\n\n /**\n * Updates the server local and remote mute values so that they match the current client desired state.\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n private applyClientStateToServer(meeting?: object) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`\n );\n\n return;\n }\n\n const localMuteRequiresSync = this.state.client.localMute !== this.state.server.localMute;\n const remoteMuteRequiresSync = !this.state.client.localMute && this.state.server.remoteMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: localMuteRequiresSync: ${localMuteRequiresSync} (${this.state.client.localMute} ?= ${this.state.server.localMute})`\n );\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: remoteMuteRequiresSync: ${remoteMuteRequiresSync}`\n );\n\n if (!localMuteRequiresSync && !remoteMuteRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: client state already matching server state, nothing to do`\n );\n\n if (this.pendingPromiseResolve) {\n this.pendingPromiseResolve();\n }\n this.pendingPromiseResolve = null;\n this.pendingPromiseReject = null;\n\n return;\n }\n\n this.state.syncToServerInProgress = true;\n\n // first sync local mute with server\n const localMuteSyncPromise = localMuteRequiresSync\n ? this.sendLocalMuteRequestToServer(meeting)\n : Promise.resolve();\n\n localMuteSyncPromise\n .then(() =>\n // then follow it up with remote mute sync\n remoteMuteRequiresSync ? this.sendRemoteMuteRequestToServer(meeting) : Promise.resolve()\n )\n .then(() => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(meeting);\n })\n .catch((e) => {\n this.state.syncToServerInProgress = false;\n\n if (this.pendingPromiseReject) {\n this.pendingPromiseReject(e);\n }\n this.pendingPromiseResolve = null;\n this.pendingPromiseReject = null;\n });\n }\n\n /**\n * Sets the local mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendLocalMuteRequestToServer(meeting?: any) {\n const audioMuted =\n this.type === AUDIO ? this.state.client.localMute : meeting.audio?.state.client.localMute;\n const videoMuted =\n this.type === VIDEO ? this.state.client.localMute : meeting.video?.state.client.localMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: sending local mute (audio=${audioMuted}, video=${videoMuted}) to server`\n );\n\n return MeetingUtil.remoteUpdateAudioVideo(audioMuted, videoMuted, meeting)\n .then((locus) => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: local mute (audio=${audioMuted}, video=${videoMuted}) applied to server`\n );\n\n this.state.server.localMute = this.type === AUDIO ? audioMuted : videoMuted;\n\n meeting.locusInfo.onFullLocus(locus);\n\n return locus;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: failed to apply local mute (audio=${audioMuted}, video=${videoMuted}) to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /**\n * Sets the remote mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendRemoteMuteRequestToServer(meeting?: any) {\n if (this.type === AUDIO) {\n const remoteMute = this.state.client.localMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: sending remote mute:${remoteMute} to server`\n );\n\n return meeting.members\n .muteMember(meeting.members.selfId, remoteMute)\n .then(() => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: remote mute:${remoteMute} applied to server`\n );\n\n this.state.server.remoteMute = remoteMute;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: failed to apply remote mute ${remoteMute} to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n // for now we don't need to support remote muting of video (REMOTE_MUTE_VIDEO_MISSING_IMPLEMENTATION)\n this.state.server.remoteMute = this.state.client.localMute;\n\n return Promise.resolve();\n }\n\n /**\n * This method should be called whenever the server remote mute state is changed\n *\n * @public\n * @memberof MuteState\n * @param {Boolean} [muted] true if user is remotely muted, false otherwise\n * @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when \"hard mute\" feature is used)\n * @returns {undefined}\n */\n public handleServerRemoteMuteUpdate(muted?: boolean, unmuteAllowed?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`\n );\n this.state.server.remoteMute = muted;\n this.state.server.unmuteAllowed = unmuteAllowed;\n }\n\n /**\n * This method should be called whenever we receive from the server a requirement to locally unmute\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @returns {undefined}\n */\n public handleServerLocalUnmuteRequired(meeting?: object) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute`\n );\n\n this.state.server.remoteMute = false;\n this.state.client.localMute = false;\n\n if (this.pendingPromiseReject) {\n this.pendingPromiseReject(\n new Error('Server requested local unmute - this overrides any client request in progress')\n );\n this.pendingPromiseResolve = null;\n this.pendingPromiseReject = null;\n }\n\n this.applyClientStateLocally(meeting);\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Returns true if the user is locally or remotely muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isMuted() {\n return (\n this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute\n );\n }\n\n /**\n * Returns true if the user is locally muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isLocallyMuted() {\n return this.state.client.localMute || this.state.server.localMute;\n }\n\n /**\n * Returns true if the user is muted as a result of the client request (and not remotely muted)\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isSelf() {\n return this.state.client.localMute && !this.state.server.remoteMute;\n }\n\n // defined for backwards compatibility with the old AudioStateMachine/VideoStateMachine classes\n get muted() {\n return this.isMuted();\n }\n\n // defined for backwards compatibility with the old AudioStateMachine/VideoStateMachine classes\n get self() {\n return this.isSelf();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAe,CAAIC,IAAI,EAAEC,OAAO,EAAEC,cAAc,EAAK;EAChE,IAAIF,IAAI,KAAKG,gBAA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AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,0BAAwB;MACtB,OAAO,IAAI,CAACJ,KAAK,CAACC,MAAM,CAACC,SAAS,IAAI,IAAI,CAACF,KAAK,CAACG,MAAM,CAACD,SAAS;IACnE;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,kBAAgB;MACd,OAAO,IAAI,CAACF,KAAK,CAACC,MAAM,CAACC,SAAS,IAAI,CAAC,IAAI,CAACF,KAAK,CAACG,MAAM,CAACC,UAAU;IACrE;;IAEA;EAAA;IAAA;IAAA,KACA,eAAY;MACV,OAAO,IAAI,CAACyC,OAAO,EAAE;IACvB;;IAEA;EAAA;IAAA;IAAA,KACA,eAAW;MACT,OAAO,IAAI,CAACC,MAAM,EAAE;IACtB;EAAC;EAAA;AAAA"}
1
+ {"version":3,"names":["createMuteState","type","meeting","mediaDirection","AUDIO","sendAudio","VIDEO","sendVideo","LoggerProxy","logger","info","id","MuteState","ParameterError","state","client","localMute","server","remoteMute","remoteMuted","unmuteAllowed","syncToServerInProgress","pendingPromiseResolve","pendingPromiseReject","mute","reject","PermissionError","applyClientStateLocally","resolve","applyClientStateToServer","mediaProperties","audioTrack","setMuted","videoTrack","localMuteRequiresSync","remoteMuteRequiresSync","localMuteSyncPromise","sendLocalMuteRequestToServer","then","sendRemoteMuteRequestToServer","catch","e","audioMuted","audio","videoMuted","video","MeetingUtil","remoteUpdateAudioVideo","locus","locusInfo","onFullLocus","remoteUpdateError","warn","members","muteMember","selfId","muted","Error","isMuted","isSelf"],"sources":["muteState.ts"],"sourcesContent":["import LoggerProxy from '../common/logs/logger-proxy';\nimport ParameterError from '../common/errors/parameter';\nimport PermissionError from '../common/errors/permission';\nimport MeetingUtil from './util';\nimport {AUDIO, VIDEO} from '../constants';\n\n/* Certain aspects of server interaction for video muting are not implemented as we currently don't support remote muting of video.\n If we ever need to support it, search for REMOTE_MUTE_VIDEO_MISSING_IMPLEMENTATION string to find the places that need updating\n*/\n\n// eslint-disable-next-line import/prefer-default-export\nexport const createMuteState = (type, meeting, mediaDirection) => {\n if (type === AUDIO && !mediaDirection.sendAudio) {\n return null;\n }\n if (type === VIDEO && !mediaDirection.sendVideo) {\n return null;\n }\n\n LoggerProxy.logger.info(\n `Meeting:muteState#createMuteState --> ${type}: creating MuteState for meeting id ${meeting?.id}`\n );\n\n return new MuteState(type, meeting);\n};\n\n/** The purpose of this class is to manage the local and remote mute state and make sure that the server state always matches\n the last requested state by the client.\n\n More info about Locus muting API: https://sqbu-github.cisco.com/pages/WebExSquared/locus/guides/mute.html#\n*/\nclass MuteState {\n pendingPromiseReject: any;\n pendingPromiseResolve: any;\n state: any;\n type: any;\n\n /**\n * Constructor\n *\n * @param {String} type - audio or video\n * @param {Object} meeting - the meeting object (used for reading current remote mute status)\n */\n constructor(type: string, meeting: any) {\n if (type !== AUDIO && type !== VIDEO) {\n throw new ParameterError('Mute state is designed for handling audio or video only');\n }\n this.type = type;\n this.state = {\n client: {\n localMute: false,\n },\n server: {\n localMute: false,\n // initial values available only for audio (REMOTE_MUTE_VIDEO_MISSING_IMPLEMENTATION)\n remoteMute: type === AUDIO ? meeting.remoteMuted : false,\n unmuteAllowed: type === AUDIO ? meeting.unmuteAllowed : true,\n },\n syncToServerInProgress: false,\n };\n // these 2 hold the resolve, reject methods for the promise we returned to the client in last handleClientRequest() call\n this.pendingPromiseResolve = null;\n this.pendingPromiseReject = null;\n }\n\n /**\n * Handles mute/unmute request from the client/user. Returns a promise that's resolved once the server update is completed or\n * at the point that this request becomese superseded by another client request.\n *\n * The client doesn't have to wait for the returned promise to resolve before calling handleClientRequest() again. If\n * handleClientRequest() is called again before the previous one resolved, the MuteState class will make sure that eventually\n * the server state will match the last requested state from the client.\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @param {Boolean} [mute] true for muting, false for unmuting request\n * @returns {Promise}\n */\n public handleClientRequest(meeting?: object, mute?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleClientRequest --> ${this.type}: user requesting new mute state: ${mute}`\n );\n\n if (!mute && !this.state.server.unmuteAllowed) {\n return Promise.reject(\n new PermissionError('User is not allowed to unmute self (hard mute feature is being used)')\n );\n }\n\n // we don't check if we're already in the same state, because even if we were, we would still have to apply the mute state locally,\n // because the client may have changed the audio/vidoe tracks\n this.state.client.localMute = mute;\n this.applyClientStateLocally(meeting);\n\n return new Promise((resolve, reject) => {\n if (this.pendingPromiseResolve) {\n // resolve the last promise we returned to the client as the client has issued a new request that has superseded the previous one\n this.pendingPromiseResolve();\n }\n this.pendingPromiseResolve = resolve;\n this.pendingPromiseReject = reject;\n this.applyClientStateToServer(meeting);\n });\n }\n\n /**\n * Applies the current mute state to the local track (by enabling or disabling it accordingly)\n *\n * @public\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n public applyClientStateLocally(meeting?: any) {\n if (this.type === AUDIO) {\n meeting.mediaProperties.audioTrack?.setMuted(this.state.client.localMute);\n } else {\n meeting.mediaProperties.videoTrack?.setMuted(this.state.client.localMute);\n }\n }\n\n /**\n * Updates the server local and remote mute values so that they match the current client desired state.\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {void}\n */\n private applyClientStateToServer(meeting?: object) {\n if (this.state.syncToServerInProgress) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: request to server in progress, we need to wait for it to complete`\n );\n\n return;\n }\n\n const localMuteRequiresSync = this.state.client.localMute !== this.state.server.localMute;\n const remoteMuteRequiresSync = !this.state.client.localMute && this.state.server.remoteMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: localMuteRequiresSync: ${localMuteRequiresSync} (${this.state.client.localMute} ?= ${this.state.server.localMute})`\n );\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: remoteMuteRequiresSync: ${remoteMuteRequiresSync}`\n );\n\n if (!localMuteRequiresSync && !remoteMuteRequiresSync) {\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: client state already matching server state, nothing to do`\n );\n\n if (this.pendingPromiseResolve) {\n this.pendingPromiseResolve();\n }\n this.pendingPromiseResolve = null;\n this.pendingPromiseReject = null;\n\n return;\n }\n\n this.state.syncToServerInProgress = true;\n\n // first sync local mute with server\n const localMuteSyncPromise = localMuteRequiresSync\n ? this.sendLocalMuteRequestToServer(meeting)\n : Promise.resolve();\n\n localMuteSyncPromise\n .then(() =>\n // then follow it up with remote mute sync\n remoteMuteRequiresSync ? this.sendRemoteMuteRequestToServer(meeting) : Promise.resolve()\n )\n .then(() => {\n this.state.syncToServerInProgress = false;\n LoggerProxy.logger.info(\n `Meeting:muteState#applyClientStateToServer --> ${this.type}: sync with server completed`\n );\n\n // need to check if a new sync is required, because this.state.client may have changed while we were doing the current sync\n this.applyClientStateToServer(meeting);\n })\n .catch((e) => {\n this.state.syncToServerInProgress = false;\n\n if (this.pendingPromiseReject) {\n this.pendingPromiseReject(e);\n }\n this.pendingPromiseResolve = null;\n this.pendingPromiseReject = null;\n });\n }\n\n /**\n * Sets the local mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendLocalMuteRequestToServer(meeting?: any) {\n const audioMuted =\n this.type === AUDIO ? this.state.client.localMute : meeting.audio?.state.client.localMute;\n const videoMuted =\n this.type === VIDEO ? this.state.client.localMute : meeting.video?.state.client.localMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: sending local mute (audio=${audioMuted}, video=${videoMuted}) to server`\n );\n\n return MeetingUtil.remoteUpdateAudioVideo(audioMuted, videoMuted, meeting)\n .then((locus) => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: local mute (audio=${audioMuted}, video=${videoMuted}) applied to server`\n );\n\n this.state.server.localMute = this.type === AUDIO ? audioMuted : videoMuted;\n\n meeting.locusInfo.onFullLocus(locus);\n\n return locus;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendLocalMuteRequestToServer --> ${this.type}: failed to apply local mute (audio=${audioMuted}, video=${videoMuted}) to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n /**\n * Sets the remote mute value in the server\n *\n * @private\n * @param {Object} [meeting] the meeting object\n * @memberof MuteState\n * @returns {Promise}\n */\n private sendRemoteMuteRequestToServer(meeting?: any) {\n if (this.type === AUDIO) {\n const remoteMute = this.state.client.localMute;\n\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: sending remote mute:${remoteMute} to server`\n );\n\n return meeting.members\n .muteMember(meeting.members.selfId, remoteMute)\n .then(() => {\n LoggerProxy.logger.info(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: remote mute:${remoteMute} applied to server`\n );\n\n this.state.server.remoteMute = remoteMute;\n })\n .catch((remoteUpdateError) => {\n LoggerProxy.logger.warn(\n `Meeting:muteState#sendRemoteMuteRequestToServer --> ${this.type}: failed to apply remote mute ${remoteMute} to server: ${remoteUpdateError}`\n );\n\n return Promise.reject(remoteUpdateError);\n });\n }\n\n // for now we don't need to support remote muting of video (REMOTE_MUTE_VIDEO_MISSING_IMPLEMENTATION)\n this.state.server.remoteMute = this.state.client.localMute;\n\n return Promise.resolve();\n }\n\n /**\n * This method should be called whenever the server remote mute state is changed\n *\n * @public\n * @memberof MuteState\n * @param {Boolean} [muted] true if user is remotely muted, false otherwise\n * @param {Boolean} [unmuteAllowed] indicates if user is allowed to unmute self (false when \"hard mute\" feature is used)\n * @returns {undefined}\n */\n public handleServerRemoteMuteUpdate(muted?: boolean, unmuteAllowed?: boolean) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerRemoteMuteUpdate --> ${this.type}: updating server remoteMute to (${muted})`\n );\n this.state.server.remoteMute = muted;\n this.state.server.unmuteAllowed = unmuteAllowed;\n }\n\n /**\n * This method should be called whenever we receive from the server a requirement to locally unmute\n *\n * @public\n * @memberof MuteState\n * @param {Object} [meeting] the meeting object\n * @returns {undefined}\n */\n public handleServerLocalUnmuteRequired(meeting?: object) {\n LoggerProxy.logger.info(\n `Meeting:muteState#handleServerLocalUnmuteRequired --> ${this.type}: localAudioUnmuteRequired received -> doing local unmute`\n );\n\n this.state.server.remoteMute = false;\n this.state.client.localMute = false;\n\n if (this.pendingPromiseReject) {\n this.pendingPromiseReject(\n new Error('Server requested local unmute - this overrides any client request in progress')\n );\n this.pendingPromiseResolve = null;\n this.pendingPromiseReject = null;\n }\n\n this.applyClientStateLocally(meeting);\n this.applyClientStateToServer(meeting);\n }\n\n /**\n * Returns true if the user is locally or remotely muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isMuted() {\n return (\n this.state.client.localMute || this.state.server.localMute || this.state.server.remoteMute\n );\n }\n\n /**\n * Returns true if the user is locally muted\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isLocallyMuted() {\n return this.state.client.localMute || this.state.server.localMute;\n }\n\n /**\n * Returns true if the user is muted as a result of the client request (and not remotely muted)\n *\n * @public\n * @memberof MuteState\n * @returns {Boolean}\n */\n public isSelf() {\n return this.state.client.localMute && !this.state.server.remoteMute;\n }\n\n // defined for backwards compatibility with the old AudioStateMachine/VideoStateMachine classes\n get muted() {\n return this.isMuted();\n }\n\n // defined for backwards compatibility with the old AudioStateMachine/VideoStateMachine classes\n get self() {\n return this.isSelf();\n }\n}\n"],"mappings":";;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;;AAEA;AACO,IAAMA,eAAe,GAAG,SAAlBA,eAAe,CAAIC,IAAI,EAAEC,OAAO,EAAEC,cAAc,EAAK;EAChE,IAAIF,IAAI,KAAKG,gBAAK,IAAI,CAACD,cAAc,CAACE,SAAS,EAAE;IAC/C,OAAO,IAAI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,SAAS,IAAI,IAAI,CAACF,KAAK,CAACG,MAAM,CAACC,UAAU;IAE9F;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,0BAAwB;MACtB,OAAO,IAAI,CAACJ,KAAK,CAACC,MAAM,CAACC,SAAS,IAAI,IAAI,CAACF,KAAK,CAACG,MAAM,CAACD,SAAS;IACnE;;IAEA;AACF;AACA;AACA;AACA;AACA;AACA;EANE;IAAA;IAAA,OAOA,kBAAgB;MACd,OAAO,IAAI,CAACF,KAAK,CAACC,MAAM,CAACC,SAAS,IAAI,CAAC,IAAI,CAACF,KAAK,CAACG,MAAM,CAACC,UAAU;IACrE;;IAEA;EAAA;IAAA;IAAA,KACA,eAAY;MACV,OAAO,IAAI,CAACwC,OAAO,EAAE;IACvB;;IAEA;EAAA;IAAA;IAAA,KACA,eAAW;MACT,OAAO,IAAI,CAACC,MAAM,EAAE;IACtB;EAAC;EAAA;AAAA"}
@@ -39,11 +39,51 @@ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !_R
39
39
  var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
40
40
  (0, _inherits2.default)(MeetingRequest, _StatelessWebexPlugin);
41
41
  var _super = _createSuper(MeetingRequest);
42
+ /**
43
+ * Constructor
44
+ * @param {Object} attrs
45
+ * @param {Object} options
46
+ */
42
47
  function MeetingRequest(attrs, options) {
43
48
  var _this;
44
49
  (0, _classCallCheck2.default)(this, MeetingRequest);
45
50
  _this = _super.call(this, attrs, options);
46
51
  (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "changeVideoLayoutDebounced", void 0);
52
+ (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "getJoinCookie", /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee() {
53
+ var joinCookieRaw, joinCookie;
54
+ return _regenerator.default.wrap(function _callee$(_context) {
55
+ while (1) switch (_context.prev = _context.next) {
56
+ case 0:
57
+ _context.next = 2;
58
+ return _this.webex.boundedStorage.get(_constants.REACHABILITY.namespace, _constants.REACHABILITY.localStorageJoinCookie).catch(function () {});
59
+ case 2:
60
+ joinCookieRaw = _context.sent;
61
+ if (!joinCookieRaw) {
62
+ _context.next = 13;
63
+ break;
64
+ }
65
+ _context.prev = 4;
66
+ joinCookie = JSON.parse(joinCookieRaw);
67
+ if (!joinCookie) {
68
+ _context.next = 8;
69
+ break;
70
+ }
71
+ return _context.abrupt("return", joinCookie);
72
+ case 8:
73
+ _context.next = 13;
74
+ break;
75
+ case 10:
76
+ _context.prev = 10;
77
+ _context.t0 = _context["catch"](4);
78
+ _loggerProxy.default.logger.error("MeetingRequest#constructor --> Error in parsing join cookie data: ".concat(_context.t0));
79
+ case 13:
80
+ return _context.abrupt("return", null);
81
+ case 14:
82
+ case "end":
83
+ return _context.stop();
84
+ }
85
+ }, _callee, null, [[4, 10]]);
86
+ })));
47
87
  _this.changeVideoLayoutDebounced = (0, _debounce2.default)(_this.changeVideoLayout, 2000, {
48
88
  leading: true,
49
89
  trailing: true
@@ -52,32 +92,41 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
52
92
  }
53
93
 
54
94
  /**
55
- * Make a network request to join a meeting
56
- * @param {Object} options
57
- * @param {String} options.sipUri
58
- * @param {String} options.deviceUrl
59
- * @param {String} options.locusUrl
60
- * @param {String} options.resourceId,
61
- * @param {String} options.correlationId
62
- * @param {boolean} options.ensureConversation
63
- * @param {boolean} options.moderator
64
- * @param {boolean} options.pin
65
- * @param {boolean} options.moveToResource
66
- * @param {Object} options.roapMessage
67
- * @param {boolean} options.breakoutsSupported
68
- * @returns {Promise}
95
+ * Returns joinCookie from boundedStorage if present.
96
+ * @returns {Object} joinCookie
69
97
  */
70
98
  (0, _createClass2.default)(MeetingRequest, [{
71
99
  key: "joinMeeting",
72
- value: function () {
73
- var _joinMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(options) {
74
- var asResourceOccupant, inviteeAddress, meetingNumber, permissionToken, deviceUrl, locusUrl, resourceId, correlationId, ensureConversation, moderator, pin, moveToResource, roapMessage, preferTranscoding, breakoutsSupported, url, body;
75
- return _regenerator.default.wrap(function _callee$(_context) {
76
- while (1) switch (_context.prev = _context.next) {
100
+ value:
101
+ /**
102
+ * Make a network request to join a meeting
103
+ * @param {Object} options
104
+ * @param {String} options.sipUri
105
+ * @param {String} options.deviceUrl
106
+ * @param {String} options.locusUrl
107
+ * @param {String} options.resourceId,
108
+ * @param {String} options.correlationId
109
+ * @param {boolean} options.ensureConversation
110
+ * @param {boolean} options.moderator
111
+ * @param {boolean} options.pin
112
+ * @param {boolean} options.moveToResource
113
+ * @param {Object} options.roapMessage
114
+ * @param {boolean} options.breakoutsSupported
115
+ * @returns {Promise}
116
+ */
117
+ function () {
118
+ var _joinMeeting = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options) {
119
+ var asResourceOccupant, inviteeAddress, meetingNumber, permissionToken, deviceUrl, locusUrl, resourceId, correlationId, ensureConversation, moderator, pin, moveToResource, roapMessage, preferTranscoding, breakoutsSupported, url, joinCookie, body;
120
+ return _regenerator.default.wrap(function _callee2$(_context2) {
121
+ while (1) switch (_context2.prev = _context2.next) {
77
122
  case 0:
78
123
  asResourceOccupant = options.asResourceOccupant, inviteeAddress = options.inviteeAddress, meetingNumber = options.meetingNumber, permissionToken = options.permissionToken, deviceUrl = options.deviceUrl, locusUrl = options.locusUrl, resourceId = options.resourceId, correlationId = options.correlationId, ensureConversation = options.ensureConversation, moderator = options.moderator, pin = options.pin, moveToResource = options.moveToResource, roapMessage = options.roapMessage, preferTranscoding = options.preferTranscoding, breakoutsSupported = options.breakoutsSupported;
79
124
  _loggerProxy.default.logger.info('Meeting:request#joinMeeting --> Joining a meeting', correlationId);
80
125
  url = '';
126
+ _context2.next = 5;
127
+ return this.getJoinCookie();
128
+ case 5:
129
+ joinCookie = _context2.sent;
81
130
  body = {
82
131
  asResourceOccupant: asResourceOccupant,
83
132
  device: {
@@ -93,7 +142,8 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
93
142
  ensureConversation: ensureConversation || false,
94
143
  supportsNativeLobby: 1,
95
144
  clientMediaPreferences: {
96
- preferTranscoding: preferTranscoding !== null && preferTranscoding !== void 0 ? preferTranscoding : true
145
+ preferTranscoding: preferTranscoding !== null && preferTranscoding !== void 0 ? preferTranscoding : true,
146
+ joinCookie: joinCookie
97
147
  }
98
148
  };
99
149
  if (breakoutsSupported) {
@@ -117,34 +167,34 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
117
167
  body.pin = pin;
118
168
  }
119
169
  if (!locusUrl) {
120
- _context.next = 13;
170
+ _context2.next = 16;
121
171
  break;
122
172
  }
123
173
  url = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT);
124
- _context.next = 25;
174
+ _context2.next = 28;
125
175
  break;
126
- case 13:
176
+ case 16:
127
177
  if (!(inviteeAddress || meetingNumber)) {
128
- _context.next = 25;
178
+ _context2.next = 28;
129
179
  break;
130
180
  }
131
- _context.prev = 14;
132
- _context.next = 17;
181
+ _context2.prev = 17;
182
+ _context2.next = 20;
133
183
  return this.webex.internal.services.waitForCatalog('postauth');
134
- case 17:
184
+ case 20:
135
185
  // @ts-ignore
136
186
  url = "".concat(this.webex.internal.services.get('locus'), "/").concat(_constants.LOCI, "/").concat(_constants.CALL);
137
187
  body.invitee = {
138
188
  address: inviteeAddress || "wbxmn:".concat(meetingNumber)
139
189
  };
140
- _context.next = 25;
190
+ _context2.next = 28;
141
191
  break;
142
- case 21:
143
- _context.prev = 21;
144
- _context.t0 = _context["catch"](14);
145
- _loggerProxy.default.logger.error("Meeting:request#joinMeeting Error Joining ".concat(inviteeAddress || meetingNumber, " --> ").concat(_context.t0));
146
- throw _context.t0;
147
- case 25:
192
+ case 24:
193
+ _context2.prev = 24;
194
+ _context2.t0 = _context2["catch"](17);
195
+ _loggerProxy.default.logger.error("Meeting:request#joinMeeting Error Joining ".concat(inviteeAddress || meetingNumber, " --> ").concat(_context2.t0));
196
+ throw _context2.t0;
197
+ case 28:
148
198
  // TODO: -- this will be resolved in SDK request
149
199
  url = url.concat("?".concat(_constants.ALTERNATE_REDIRECT_TRUE));
150
200
  if (resourceId === inviteeAddress) {
@@ -157,16 +207,16 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
157
207
  }
158
208
 
159
209
  /// @ts-ignore
160
- return _context.abrupt("return", this.request({
210
+ return _context2.abrupt("return", this.request({
161
211
  method: _constants.HTTP_VERBS.POST,
162
212
  uri: url,
163
213
  body: body
164
214
  }));
165
- case 29:
215
+ case 32:
166
216
  case "end":
167
- return _context.stop();
217
+ return _context2.stop();
168
218
  }
169
- }, _callee, this, [[14, 21]]);
219
+ }, _callee2, this, [[17, 24]]);
170
220
  }));
171
221
  function joinMeeting(_x) {
172
222
  return _joinMeeting.apply(this, arguments);
@@ -183,9 +233,9 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
183
233
  */
184
234
  }, {
185
235
  key: "refreshCaptcha",
186
- value: function refreshCaptcha(_ref) {
187
- var captchaRefreshUrl = _ref.captchaRefreshUrl,
188
- captchaId = _ref.captchaId;
236
+ value: function refreshCaptcha(_ref2) {
237
+ var captchaRefreshUrl = _ref2.captchaRefreshUrl,
238
+ captchaId = _ref2.captchaId;
189
239
  var body = {
190
240
  captchaId: captchaId
191
241
  };
@@ -213,11 +263,11 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
213
263
  */
214
264
  }, {
215
265
  key: "dialIn",
216
- value: function dialIn(_ref2) {
217
- var locusUrl = _ref2.locusUrl,
218
- dialInUrl = _ref2.dialInUrl,
219
- clientUrl = _ref2.clientUrl,
220
- correlationId = _ref2.correlationId;
266
+ value: function dialIn(_ref3) {
267
+ var locusUrl = _ref3.locusUrl,
268
+ dialInUrl = _ref3.dialInUrl,
269
+ clientUrl = _ref3.clientUrl,
270
+ correlationId = _ref3.correlationId;
221
271
  _loggerProxy.default.logger.info('Meeting:request#dialIn --> Provisioning a dial in device', correlationId);
222
272
  var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT);
223
273
  var body = {
@@ -254,12 +304,12 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
254
304
  */
255
305
  }, {
256
306
  key: "dialOut",
257
- value: function dialOut(_ref3) {
258
- var locusUrl = _ref3.locusUrl,
259
- dialOutUrl = _ref3.dialOutUrl,
260
- phoneNumber = _ref3.phoneNumber,
261
- clientUrl = _ref3.clientUrl,
262
- correlationId = _ref3.correlationId;
307
+ value: function dialOut(_ref4) {
308
+ var locusUrl = _ref4.locusUrl,
309
+ dialOutUrl = _ref4.dialOutUrl,
310
+ phoneNumber = _ref4.phoneNumber,
311
+ clientUrl = _ref4.clientUrl,
312
+ correlationId = _ref4.correlationId;
263
313
  _loggerProxy.default.logger.info('Meeting:request#dialOut --> Provisioning a dial out device', correlationId);
264
314
  var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT);
265
315
  var body = {
@@ -356,11 +406,11 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
356
406
  */
357
407
  }, {
358
408
  key: "disconnectPhoneAudio",
359
- value: function disconnectPhoneAudio(_ref4) {
360
- var locusUrl = _ref4.locusUrl,
361
- phoneUrl = _ref4.phoneUrl,
362
- correlationId = _ref4.correlationId,
363
- selfId = _ref4.selfId;
409
+ value: function disconnectPhoneAudio(_ref5) {
410
+ var locusUrl = _ref5.locusUrl,
411
+ phoneUrl = _ref5.phoneUrl,
412
+ correlationId = _ref5.correlationId,
413
+ selfId = _ref5.selfId;
364
414
  _loggerProxy.default.logger.info("Meeting:request#disconnectPhoneAudio --> request phone ".concat(phoneUrl, " to leave"), correlationId);
365
415
  var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT, "/").concat(selfId, "/").concat(_constants.LEAVE);
366
416
  var body = {
@@ -394,12 +444,12 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
394
444
  */
395
445
  }, {
396
446
  key: "leaveMeeting",
397
- value: function leaveMeeting(_ref5) {
398
- var locusUrl = _ref5.locusUrl,
399
- selfId = _ref5.selfId,
400
- url = _ref5.deviceUrl,
401
- resourceId = _ref5.resourceId,
402
- correlationId = _ref5.correlationId;
447
+ value: function leaveMeeting(_ref6) {
448
+ var locusUrl = _ref6.locusUrl,
449
+ selfId = _ref6.selfId,
450
+ url = _ref6.deviceUrl,
451
+ resourceId = _ref6.resourceId,
452
+ correlationId = _ref6.correlationId;
403
453
  _loggerProxy.default.logger.info('Meeting:request#leaveMeeting --> Leaving a meeting', correlationId);
404
454
  var uri = "".concat(locusUrl, "/").concat(_constants.PARTICIPANT, "/").concat(selfId, "/").concat(_constants.LEAVE);
405
455
  var body = {
@@ -595,10 +645,10 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
595
645
  */
596
646
  }, {
597
647
  key: "sendDTMF",
598
- value: function sendDTMF(_ref6) {
599
- var locusUrl = _ref6.locusUrl,
600
- deviceUrl = _ref6.deviceUrl,
601
- tones = _ref6.tones;
648
+ value: function sendDTMF(_ref7) {
649
+ var locusUrl = _ref7.locusUrl,
650
+ deviceUrl = _ref7.deviceUrl,
651
+ tones = _ref7.tones;
602
652
  // @ts-ignore
603
653
  return this.request({
604
654
  method: _constants.HTTP_VERBS.POST,
@@ -629,12 +679,12 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
629
679
  */
630
680
  }, {
631
681
  key: "changeVideoLayout",
632
- value: function changeVideoLayout(_ref7) {
633
- var locusUrl = _ref7.locusUrl,
634
- deviceUrl = _ref7.deviceUrl,
635
- layoutType = _ref7.layoutType,
636
- main = _ref7.main,
637
- content = _ref7.content;
682
+ value: function changeVideoLayout(_ref8) {
683
+ var locusUrl = _ref8.locusUrl,
684
+ deviceUrl = _ref8.deviceUrl,
685
+ layoutType = _ref8.layoutType,
686
+ main = _ref8.main,
687
+ content = _ref8.content;
638
688
  // send main/content renderInfo only if both width and height are specified
639
689
  if (main && (!main.width || !main.height)) {
640
690
  return _promise.default.reject(new Error("Both width and height must be specified. One of them is missing for main: ".concat((0, _stringify.default)(main))));
@@ -679,8 +729,8 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
679
729
  */
680
730
  }, {
681
731
  key: "endMeetingForAll",
682
- value: function endMeetingForAll(_ref8) {
683
- var locusUrl = _ref8.locusUrl;
732
+ value: function endMeetingForAll(_ref9) {
733
+ var locusUrl = _ref9.locusUrl;
684
734
  var uri = "".concat(locusUrl, "/").concat(_constants.END);
685
735
 
686
736
  // @ts-ignore
@@ -698,8 +748,8 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
698
748
  */
699
749
  }, {
700
750
  key: "keepAlive",
701
- value: function keepAlive(_ref9) {
702
- var keepAliveUrl = _ref9.keepAliveUrl;
751
+ value: function keepAlive(_ref10) {
752
+ var keepAliveUrl = _ref10.keepAliveUrl;
703
753
  // @ts-ignore
704
754
  return this.request({
705
755
  method: _constants.HTTP_VERBS.GET,
@@ -717,10 +767,10 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
717
767
  */
718
768
  }, {
719
769
  key: "sendReaction",
720
- value: function sendReaction(_ref10) {
721
- var reactionChannelUrl = _ref10.reactionChannelUrl,
722
- reaction = _ref10.reaction,
723
- participantId = _ref10.participantId;
770
+ value: function sendReaction(_ref11) {
771
+ var reactionChannelUrl = _ref11.reactionChannelUrl,
772
+ reaction = _ref11.reaction,
773
+ participantId = _ref11.participantId;
724
774
  var uri = reactionChannelUrl;
725
775
 
726
776
  // @ts-ignore
@@ -744,10 +794,10 @@ var MeetingRequest = /*#__PURE__*/function (_StatelessWebexPlugin) {
744
794
  */
745
795
  }, {
746
796
  key: "toggleReactions",
747
- value: function toggleReactions(_ref11) {
748
- var enable = _ref11.enable,
749
- locusUrl = _ref11.locusUrl,
750
- requestingParticipantId = _ref11.requestingParticipantId;
797
+ value: function toggleReactions(_ref12) {
798
+ var enable = _ref12.enable,
799
+ locusUrl = _ref12.locusUrl,
800
+ requestingParticipantId = _ref12.requestingParticipantId;
751
801
  var uri = "".concat(locusUrl, "/").concat(_constants.CONTROLS);
752
802
 
753
803
  // @ts-ignore