@webex/plugin-meetings 3.7.0-next.12 → 3.7.0-next.14

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 (39) hide show
  1. package/dist/breakouts/breakout.js +1 -1
  2. package/dist/breakouts/index.js +1 -1
  3. package/dist/common/errors/{webinar-registration-error.js → join-webinar-error.js} +12 -12
  4. package/dist/common/errors/join-webinar-error.js.map +1 -0
  5. package/dist/constants.js +10 -4
  6. package/dist/constants.js.map +1 -1
  7. package/dist/index.js +7 -7
  8. package/dist/index.js.map +1 -1
  9. package/dist/interpretation/index.js +1 -1
  10. package/dist/interpretation/siLanguage.js +1 -1
  11. package/dist/meeting/index.js +18 -13
  12. package/dist/meeting/index.js.map +1 -1
  13. package/dist/meeting-info/meeting-info-v2.js +29 -17
  14. package/dist/meeting-info/meeting-info-v2.js.map +1 -1
  15. package/dist/meetings/index.js +2 -2
  16. package/dist/meetings/index.js.map +1 -1
  17. package/dist/metrics/constants.js +1 -1
  18. package/dist/metrics/constants.js.map +1 -1
  19. package/dist/types/common/errors/{webinar-registration-error.d.ts → join-webinar-error.d.ts} +2 -2
  20. package/dist/types/constants.d.ts +5 -1
  21. package/dist/types/index.d.ts +2 -2
  22. package/dist/types/meeting-info/meeting-info-v2.d.ts +4 -4
  23. package/dist/types/metrics/constants.d.ts +1 -1
  24. package/dist/webinar/index.js +5 -7
  25. package/dist/webinar/index.js.map +1 -1
  26. package/package.json +3 -3
  27. package/src/common/errors/join-webinar-error.ts +24 -0
  28. package/src/constants.ts +7 -3
  29. package/src/index.ts +2 -2
  30. package/src/meeting/index.ts +11 -4
  31. package/src/meeting-info/meeting-info-v2.ts +23 -11
  32. package/src/meetings/index.ts +2 -2
  33. package/src/metrics/constants.ts +1 -1
  34. package/src/webinar/index.ts +4 -6
  35. package/test/unit/spec/meeting/index.js +51 -6
  36. package/test/unit/spec/meeting-info/meetinginfov2.js +9 -4
  37. package/test/unit/spec/webinar/index.ts +1 -1
  38. package/dist/common/errors/webinar-registration-error.js.map +0 -1
  39. package/src/common/errors/webinar-registration-error.ts +0 -27
@@ -1,7 +1,7 @@
1
1
  /**
2
- * Error occurred while the webinar required registration
2
+ * Error occurred while join the webinar
3
3
  */
4
- export default class WebinarRegistrationError extends Error {
4
+ export default class JoinWebinarError extends Error {
5
5
  code: number;
6
6
  error: any;
7
7
  sdkMessage: string;
@@ -136,6 +136,8 @@ export declare const ICE_FAIL_TIMEOUT = 3000;
136
136
  export declare const RETRY_TIMEOUT = 3000;
137
137
  export declare const ICE_AND_DTLS_CONNECTION_TIMEOUT = 20000;
138
138
  export declare const ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT = 35000;
139
+ export declare const WEBINAR_ERROR_WEBCAST: number[];
140
+ export declare const WEBINAR_ERROR_REGISTRATIONID: number[];
139
141
  export declare const DIALER_REGEX: {
140
142
  SIP_ADDRESS: RegExp;
141
143
  PHONE_NUMBER: RegExp;
@@ -416,7 +418,7 @@ export declare const ERROR_DICTIONARY: {
416
418
  MESSAGE: string;
417
419
  CODE: number;
418
420
  };
419
- WebinarRegistrationError: {
421
+ JoinWebinarError: {
420
422
  NAME: string;
421
423
  MESSAGE: string;
422
424
  CODE: number;
@@ -1097,6 +1099,8 @@ export declare const MEETING_INFO_FAILURE_REASON: {
1097
1099
  WRONG_CAPTCHA: string;
1098
1100
  POLICY: string;
1099
1101
  WEBINAR_REGISTRATION: string;
1102
+ NEED_JOIN_WITH_WEBCAST: string;
1103
+ WEBINAR_NEED_REGISTRATIONID: string;
1100
1104
  OTHER: string;
1101
1105
  };
1102
1106
  export declare const BNR_STATUS: {
@@ -3,7 +3,7 @@ import CaptchaError from './common/errors/captcha-error';
3
3
  import IntentToJoinError from './common/errors/intent-to-join';
4
4
  import PasswordError from './common/errors/password-error';
5
5
  import PermissionError from './common/errors/permission';
6
- import WebinarRegistrationError from './common/errors/webinar-registration-error';
6
+ import JoinWebinarError from './common/errors/join-webinar-error';
7
7
  import { ReclaimHostEmptyWrongKeyError, ReclaimHostIsHostAlreadyError, ReclaimHostNotAllowedError, ReclaimHostNotSupportedError } from './common/errors/reclaim-host-role-errors';
8
8
  import Meeting from './meeting';
9
9
  import MeetingInfoUtil from './meeting-info/utilv2';
@@ -15,6 +15,6 @@ export * as REACTIONS from './reactions/reactions';
15
15
  export * as sdkAnnotationTypes from './annotation/annotation.types';
16
16
  export * as MeetingInfoV2 from './meeting-info/meeting-info-v2';
17
17
  export { type Reaction } from './reactions/reactions.type';
18
- export { CaptchaError, IntentToJoinError, JoinMeetingError, PasswordError, PermissionError, ReclaimHostIsHostAlreadyError, ReclaimHostNotAllowedError, ReclaimHostNotSupportedError, ReclaimHostEmptyWrongKeyError, Meeting, MeetingInfoUtil, WebinarRegistrationError, };
18
+ export { CaptchaError, IntentToJoinError, JoinMeetingError, PasswordError, PermissionError, ReclaimHostIsHostAlreadyError, ReclaimHostNotAllowedError, ReclaimHostNotSupportedError, ReclaimHostEmptyWrongKeyError, Meeting, MeetingInfoUtil, JoinWebinarError, };
19
19
  export { RemoteMedia } from './multistream/remoteMedia';
20
20
  export { default as TriggerProxy } from './common/events/trigger-proxy';
@@ -65,9 +65,9 @@ export declare class MeetingInfoV2CaptchaError extends Error {
65
65
  constructor(wbxAppApiErrorCode?: number, captchaInfo?: object, message?: string);
66
66
  }
67
67
  /**
68
- * Error preventing join because of a webinar registration error
68
+ * Error preventing join because of a webinar have some error
69
69
  */
70
- export declare class MeetingInfoV2WebinarRegistrationError extends Error {
70
+ export declare class MeetingInfoV2JoinWebinarError extends Error {
71
71
  meetingInfo: any;
72
72
  sdkMessage: any;
73
73
  wbxAppApiCode: any;
@@ -107,11 +107,11 @@ export default class MeetingInfoV2 {
107
107
  */
108
108
  handlePolicyError: (err: any) => void;
109
109
  /**
110
- * Raises a handleWebinarRegistrationError for webinar registration error codes
110
+ * Raises a handleJoinWebinarError for join webinar error codes
111
111
  * @param {any} err the error from the request
112
112
  * @returns {void}
113
113
  */
114
- handleWebinarRegistrationError: (err: any) => void;
114
+ handleJoinWebinarError: (err: any) => void;
115
115
  /**
116
116
  * Creates adhoc space meetings for a space by fetching the conversation infomation
117
117
  * @param {String} conversationUrl conversationUrl to start adhoc meeting on
@@ -67,7 +67,7 @@ declare const BEHAVIORAL_METRICS: {
67
67
  ROAP_HTTP_RESPONSE_MISSING: string;
68
68
  TURN_DISCOVERY_REQUIRES_OK: string;
69
69
  REACHABILITY_COMPLETED: string;
70
- WEBINAR_REGISTRATION_ERROR: string;
70
+ JOIN_WEBINAR_ERROR: string;
71
71
  GUEST_ENTERED_LOBBY: string;
72
72
  GUEST_EXITED_LOBBY: string;
73
73
  };
@@ -283,12 +283,10 @@ var Webinar = _webexCore.WebexPlugin.extend({
283
283
  _context4.t8 = _constants.HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON;
284
284
  _context4.t9 = (0, _context4.t3)(_context4.t6, _context4.t7, _context4.t8);
285
285
  _context4.t10 = {
286
- layout: {
287
- videoLayout: layout.videoLayout,
288
- contentLayout: layout.contentLayout,
289
- syncStageLayout: layout.syncStageLayout,
290
- syncStageInMeeting: layout.syncStageInMeeting
291
- }
286
+ videoLayout: layout.videoLayout,
287
+ contentLayout: layout.contentLayout,
288
+ syncStageLayout: layout.syncStageLayout,
289
+ syncStageInMeeting: layout.syncStageInMeeting
292
290
  };
293
291
  _context4.t11 = {
294
292
  method: _context4.t1,
@@ -427,7 +425,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
427
425
  }, _callee7);
428
426
  }))();
429
427
  },
430
- version: "3.7.0-next.12"
428
+ version: "3.7.0-next.14"
431
429
  });
432
430
  var _default = exports.default = Webinar;
433
431
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_webexCore","require","_uuid","_interopRequireDefault","_lodash","_constants","_collection","_loggerProxy","Webinar","WebexPlugin","extend","namespace","MEETINGS","collections","webinar","WebinarCollection","props","locusUrl","webcastInstanceUrl","canManageWebcast","selfIsPanelist","selfIsAttendee","practiceSessionEnabled","locusUrlUpdate","set","updateWebcastUrl","payload","get","updateCanManageWebcast","updateRoleChanged","oldRoles","newRoles","isPromoted","includes","SELF_ROLES","ATTENDEE","PANELIST","isDemoted","MODERATOR","setPracticeSessionState","enabled","request","method","HTTP_VERBS","PATCH","uri","concat","body","practiceSession","catch","error","LoggerProxy","logger","updatePracticeSessionStatus","startWebcast","meeting","layout","_this","_asyncToGenerator2","default","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","Error","t0","t1","PUT","t2","t3","_defineProperty2","webex","credentials","getUserToken","t4","sent","t5","config","trackingIdPrefix","uuid","v4","toString","t6","authorization","trackingId","t7","HEADERS","CONTENT_TYPE","t8","CONTENT_TYPE_VALUE","APPLICATION_JSON","t9","t10","action","meetingInfo","locusId","correlationId","t11","headers","abrupt","call","stop","stopWebcast","_this2","_callee2","_callee2$","_context2","queryWebcastLayout","_this3","_callee3","_callee3$","_context3","GET","updateWebcastLayout","_this4","_callee4","_callee4$","_context4","videoLayout","contentLayout","syncStageLayout","syncStageInMeeting","viewAllWebcastAttendees","_this5","_callee5","_callee5$","_context5","searchWebcastAttendees","_arguments","arguments","_this6","_callee6","queryString","_callee6$","_context6","length","undefined","encodeURIComponent","expelWebcastAttendee","participantId","_this7","_callee7","_callee7$","_context7","DELETE","version","_default","exports"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.\n */\nimport {WebexPlugin, config} from '@webex/webex-core';\nimport uuid from 'uuid';\nimport {get} from 'lodash';\nimport {HEADERS, HTTP_VERBS, MEETINGS, SELF_ROLES} from '../constants';\n\nimport WebinarCollection from './collection';\nimport LoggerProxy from '../common/logs/logger-proxy';\n\n/**\n * @class Webinar\n */\nconst Webinar = WebexPlugin.extend({\n namespace: MEETINGS,\n collections: {\n webinar: WebinarCollection,\n },\n\n props: {\n locusUrl: 'string', // appears current webinar's locus url\n webcastInstanceUrl: 'string', // current webinar's webcast instance url\n canManageWebcast: 'boolean', // appears the ability to manage webcast\n selfIsPanelist: 'boolean', // self is panelist\n selfIsAttendee: 'boolean', // self is attendee\n practiceSessionEnabled: 'boolean', // practice session enabled\n },\n\n /**\n * Update the current locus url of the webinar\n * @param {string} locusUrl\n * @returns {void}\n */\n locusUrlUpdate(locusUrl) {\n this.set('locusUrl', locusUrl);\n },\n\n /**\n * Update the current webcast instance url of the meeting\n * @param {object} payload\n * @returns {void}\n */\n updateWebcastUrl(payload) {\n this.set('webcastInstanceUrl', get(payload, 'resources.webcastInstance.url'));\n },\n\n /**\n * Update whether self has capability to manage start/stop webcast (only host can manage it)\n * @param {boolean} canManageWebcast\n * @returns {void}\n */\n updateCanManageWebcast(canManageWebcast) {\n this.set('canManageWebcast', canManageWebcast);\n },\n\n /**\n * Updates user roles and manages associated state transitions\n * @param {object} payload\n * @param {string[]} payload.oldRoles - Previous roles of the user\n * @param {string[]} payload.newRoles - New roles of the user\n * @returns {{isPromoted: boolean, isDemoted: boolean}} Role transition states\n */\n updateRoleChanged(payload) {\n const oldRoles = get(payload, 'oldRoles', []);\n const newRoles = get(payload, 'newRoles', []);\n\n const isPromoted =\n oldRoles.includes(SELF_ROLES.ATTENDEE) && newRoles.includes(SELF_ROLES.PANELIST);\n const isDemoted =\n oldRoles.includes(SELF_ROLES.PANELIST) && newRoles.includes(SELF_ROLES.ATTENDEE);\n this.set('selfIsPanelist', newRoles.includes(SELF_ROLES.PANELIST));\n this.set('selfIsAttendee', newRoles.includes(SELF_ROLES.ATTENDEE));\n this.updateCanManageWebcast(newRoles.includes(SELF_ROLES.MODERATOR));\n\n return {isPromoted, isDemoted};\n },\n\n /**\n * start or stop practice session for webinar\n * @param {boolean} enabled\n * @returns {Promise}\n */\n setPracticeSessionState(enabled) {\n return this.request({\n method: HTTP_VERBS.PATCH,\n uri: `${this.locusUrl}/controls`,\n body: {\n practiceSession: {\n enabled,\n },\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#setPracticeSessionState failed', error);\n throw error;\n });\n },\n\n /**\n * update practice session status\n * @param {object} payload\n * @returns {void}\n */\n updatePracticeSessionStatus(payload) {\n this.set('practiceSessionEnabled', payload.enabled);\n },\n\n /**\n * start webcast mode for webinar\n * @param {object} meeting\n * @param {object} layout\n * @returns {Promise}\n */\n async startWebcast(meeting, layout) {\n if (!meeting) {\n LoggerProxy.logger.error(\n `Meeting:webinar#startWebcast failed --> meeting parameter : ${meeting}`\n );\n throw new Error('Meeting parameter does not meet expectations');\n }\n\n return this.request({\n method: HTTP_VERBS.PUT,\n uri: `${this.webcastInstanceUrl}/streaming`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n [HEADERS.CONTENT_TYPE]: HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON,\n },\n body: {\n action: 'start',\n meetingInfo: {\n locusId: meeting.locusId,\n correlationId: meeting.correlationId,\n },\n layout,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#startWebcast failed', error);\n throw error;\n });\n },\n\n /**\n * stop webcast mode for webinar\n * @returns {Promise}\n */\n async stopWebcast() {\n return this.request({\n method: HTTP_VERBS.PUT,\n uri: `${this.webcastInstanceUrl}/streaming`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n [HEADERS.CONTENT_TYPE]: HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON,\n },\n body: {\n action: 'stop',\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#stopWebcast failed', error);\n throw error;\n });\n },\n\n /**\n * query webcast layout for webinar\n * @returns {Promise}\n */\n async queryWebcastLayout() {\n return this.request({\n method: HTTP_VERBS.GET,\n uri: `${this.webcastInstanceUrl}/layout`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#queryWebcastLayout failed', error);\n throw error;\n });\n },\n\n /**\n * update webcast layout for webinar\n * @param {object} layout\n * @returns {Promise}\n */\n async updateWebcastLayout(layout) {\n return this.request({\n method: HTTP_VERBS.PUT,\n uri: `${this.webcastInstanceUrl}/layout`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n [HEADERS.CONTENT_TYPE]: HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON,\n },\n body: {\n layout: {\n videoLayout: layout.videoLayout,\n contentLayout: layout.contentLayout,\n syncStageLayout: layout.syncStageLayout,\n syncStageInMeeting: layout.syncStageInMeeting,\n },\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#updateWebcastLayout failed', error);\n throw error;\n });\n },\n\n /**\n * view all webcast attendees\n * @param {string} queryString\n * @returns {Promise}\n */\n async viewAllWebcastAttendees() {\n return this.request({\n method: HTTP_VERBS.GET,\n uri: `${this.webcastInstanceUrl}/attendees`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#viewAllWebcastAttendees failed', error);\n throw error;\n });\n },\n\n /**\n * search webcast attendees by query string\n * @param {string} queryString\n * @returns {Promise}\n */\n async searchWebcastAttendees(queryString = '') {\n return this.request({\n method: HTTP_VERBS.GET,\n uri: `${this.webcastInstanceUrl}/attendees?keyword=${encodeURIComponent(queryString)}`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#searchWebcastAttendees failed', error);\n throw error;\n });\n },\n\n /**\n * expel webcast attendee by participantId\n * @param {string} participantId\n * @returns {Promise}\n */\n async expelWebcastAttendee(participantId) {\n return this.request({\n method: HTTP_VERBS.DELETE,\n uri: `${this.webcastInstanceUrl}/attendees/${participantId}`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#expelWebcastAttendee failed', error);\n throw error;\n });\n },\n});\n\nexport default Webinar;\n"],"mappings":";;;;;;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,YAAA,GAAAJ,sBAAA,CAAAF,OAAA;AATA;AACA;AACA;;AASA;AACA;AACA;AACA,IAAMO,OAAO,GAAGC,sBAAW,CAACC,MAAM,CAAC;EACjCC,SAAS,EAAEC,mBAAQ;EACnBC,WAAW,EAAE;IACXC,OAAO,EAAEC;EACX,CAAC;EAEDC,KAAK,EAAE;IACLC,QAAQ,EAAE,QAAQ;IAAE;IACpBC,kBAAkB,EAAE,QAAQ;IAAE;IAC9BC,gBAAgB,EAAE,SAAS;IAAE;IAC7BC,cAAc,EAAE,SAAS;IAAE;IAC3BC,cAAc,EAAE,SAAS;IAAE;IAC3BC,sBAAsB,EAAE,SAAS,CAAE;EACrC,CAAC;EAED;AACF;AACA;AACA;AACA;EACEC,cAAc,WAAAA,eAACN,QAAQ,EAAE;IACvB,IAAI,CAACO,GAAG,CAAC,UAAU,EAAEP,QAAQ,CAAC;EAChC,CAAC;EAED;AACF;AACA;AACA;AACA;EACEQ,gBAAgB,WAAAA,iBAACC,OAAO,EAAE;IACxB,IAAI,CAACF,GAAG,CAAC,oBAAoB,EAAE,IAAAG,WAAG,EAACD,OAAO,EAAE,+BAA+B,CAAC,CAAC;EAC/E,CAAC;EAED;AACF;AACA;AACA;AACA;EACEE,sBAAsB,WAAAA,uB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;YACb,CAAC;UAAA;UAAA;YAAA,OAAAiG,SAAA,CAAA1C,IAAA;QAAA;MAAA,GAAAwC,QAAA;IAAA;EACH,CAAC;EAAAI,OAAA;AACH,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA5F,OAAA,GAEYnD,OAAO"}
1
+ {"version":3,"names":["_webexCore","require","_uuid","_interopRequireDefault","_lodash","_constants","_collection","_loggerProxy","Webinar","WebexPlugin","extend","namespace","MEETINGS","collections","webinar","WebinarCollection","props","locusUrl","webcastInstanceUrl","canManageWebcast","selfIsPanelist","selfIsAttendee","practiceSessionEnabled","locusUrlUpdate","set","updateWebcastUrl","payload","get","updateCanManageWebcast","updateRoleChanged","oldRoles","newRoles","isPromoted","includes","SELF_ROLES","ATTENDEE","PANELIST","isDemoted","MODERATOR","setPracticeSessionState","enabled","request","method","HTTP_VERBS","PATCH","uri","concat","body","practiceSession","catch","error","LoggerProxy","logger","updatePracticeSessionStatus","startWebcast","meeting","layout","_this","_asyncToGenerator2","default","_regenerator","mark","_callee","wrap","_callee$","_context","prev","next","Error","t0","t1","PUT","t2","t3","_defineProperty2","webex","credentials","getUserToken","t4","sent","t5","config","trackingIdPrefix","uuid","v4","toString","t6","authorization","trackingId","t7","HEADERS","CONTENT_TYPE","t8","CONTENT_TYPE_VALUE","APPLICATION_JSON","t9","t10","action","meetingInfo","locusId","correlationId","t11","headers","abrupt","call","stop","stopWebcast","_this2","_callee2","_callee2$","_context2","queryWebcastLayout","_this3","_callee3","_callee3$","_context3","GET","updateWebcastLayout","_this4","_callee4","_callee4$","_context4","videoLayout","contentLayout","syncStageLayout","syncStageInMeeting","viewAllWebcastAttendees","_this5","_callee5","_callee5$","_context5","searchWebcastAttendees","_arguments","arguments","_this6","_callee6","queryString","_callee6$","_context6","length","undefined","encodeURIComponent","expelWebcastAttendee","participantId","_this7","_callee7","_callee7$","_context7","DELETE","version","_default","exports"],"sources":["index.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-2023 Cisco Systems, Inc. See LICENSE file.\n */\nimport {WebexPlugin, config} from '@webex/webex-core';\nimport uuid from 'uuid';\nimport {get} from 'lodash';\nimport {HEADERS, HTTP_VERBS, MEETINGS, SELF_ROLES} from '../constants';\n\nimport WebinarCollection from './collection';\nimport LoggerProxy from '../common/logs/logger-proxy';\n\n/**\n * @class Webinar\n */\nconst Webinar = WebexPlugin.extend({\n namespace: MEETINGS,\n collections: {\n webinar: WebinarCollection,\n },\n\n props: {\n locusUrl: 'string', // appears current webinar's locus url\n webcastInstanceUrl: 'string', // current webinar's webcast instance url\n canManageWebcast: 'boolean', // appears the ability to manage webcast\n selfIsPanelist: 'boolean', // self is panelist\n selfIsAttendee: 'boolean', // self is attendee\n practiceSessionEnabled: 'boolean', // practice session enabled\n },\n\n /**\n * Update the current locus url of the webinar\n * @param {string} locusUrl\n * @returns {void}\n */\n locusUrlUpdate(locusUrl) {\n this.set('locusUrl', locusUrl);\n },\n\n /**\n * Update the current webcast instance url of the meeting\n * @param {object} payload\n * @returns {void}\n */\n updateWebcastUrl(payload) {\n this.set('webcastInstanceUrl', get(payload, 'resources.webcastInstance.url'));\n },\n\n /**\n * Update whether self has capability to manage start/stop webcast (only host can manage it)\n * @param {boolean} canManageWebcast\n * @returns {void}\n */\n updateCanManageWebcast(canManageWebcast) {\n this.set('canManageWebcast', canManageWebcast);\n },\n\n /**\n * Updates user roles and manages associated state transitions\n * @param {object} payload\n * @param {string[]} payload.oldRoles - Previous roles of the user\n * @param {string[]} payload.newRoles - New roles of the user\n * @returns {{isPromoted: boolean, isDemoted: boolean}} Role transition states\n */\n updateRoleChanged(payload) {\n const oldRoles = get(payload, 'oldRoles', []);\n const newRoles = get(payload, 'newRoles', []);\n\n const isPromoted =\n oldRoles.includes(SELF_ROLES.ATTENDEE) && newRoles.includes(SELF_ROLES.PANELIST);\n const isDemoted =\n oldRoles.includes(SELF_ROLES.PANELIST) && newRoles.includes(SELF_ROLES.ATTENDEE);\n this.set('selfIsPanelist', newRoles.includes(SELF_ROLES.PANELIST));\n this.set('selfIsAttendee', newRoles.includes(SELF_ROLES.ATTENDEE));\n this.updateCanManageWebcast(newRoles.includes(SELF_ROLES.MODERATOR));\n\n return {isPromoted, isDemoted};\n },\n\n /**\n * start or stop practice session for webinar\n * @param {boolean} enabled\n * @returns {Promise}\n */\n setPracticeSessionState(enabled) {\n return this.request({\n method: HTTP_VERBS.PATCH,\n uri: `${this.locusUrl}/controls`,\n body: {\n practiceSession: {\n enabled,\n },\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#setPracticeSessionState failed', error);\n throw error;\n });\n },\n\n /**\n * update practice session status\n * @param {object} payload\n * @returns {void}\n */\n updatePracticeSessionStatus(payload) {\n this.set('practiceSessionEnabled', payload.enabled);\n },\n\n /**\n * start webcast mode for webinar\n * @param {object} meeting\n * @param {object} layout\n * @returns {Promise}\n */\n async startWebcast(meeting, layout) {\n if (!meeting) {\n LoggerProxy.logger.error(\n `Meeting:webinar#startWebcast failed --> meeting parameter : ${meeting}`\n );\n throw new Error('Meeting parameter does not meet expectations');\n }\n\n return this.request({\n method: HTTP_VERBS.PUT,\n uri: `${this.webcastInstanceUrl}/streaming`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n [HEADERS.CONTENT_TYPE]: HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON,\n },\n body: {\n action: 'start',\n meetingInfo: {\n locusId: meeting.locusId,\n correlationId: meeting.correlationId,\n },\n layout,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#startWebcast failed', error);\n throw error;\n });\n },\n\n /**\n * stop webcast mode for webinar\n * @returns {Promise}\n */\n async stopWebcast() {\n return this.request({\n method: HTTP_VERBS.PUT,\n uri: `${this.webcastInstanceUrl}/streaming`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n [HEADERS.CONTENT_TYPE]: HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON,\n },\n body: {\n action: 'stop',\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#stopWebcast failed', error);\n throw error;\n });\n },\n\n /**\n * query webcast layout for webinar\n * @returns {Promise}\n */\n async queryWebcastLayout() {\n return this.request({\n method: HTTP_VERBS.GET,\n uri: `${this.webcastInstanceUrl}/layout`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#queryWebcastLayout failed', error);\n throw error;\n });\n },\n\n /**\n * update webcast layout for webinar\n * @param {object} layout\n * @returns {Promise}\n */\n async updateWebcastLayout(layout) {\n return this.request({\n method: HTTP_VERBS.PUT,\n uri: `${this.webcastInstanceUrl}/layout`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n [HEADERS.CONTENT_TYPE]: HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON,\n },\n body: {\n videoLayout: layout.videoLayout,\n contentLayout: layout.contentLayout,\n syncStageLayout: layout.syncStageLayout,\n syncStageInMeeting: layout.syncStageInMeeting,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#updateWebcastLayout failed', error);\n throw error;\n });\n },\n\n /**\n * view all webcast attendees\n * @param {string} queryString\n * @returns {Promise}\n */\n async viewAllWebcastAttendees() {\n return this.request({\n method: HTTP_VERBS.GET,\n uri: `${this.webcastInstanceUrl}/attendees`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#viewAllWebcastAttendees failed', error);\n throw error;\n });\n },\n\n /**\n * search webcast attendees by query string\n * @param {string} queryString\n * @returns {Promise}\n */\n async searchWebcastAttendees(queryString = '') {\n return this.request({\n method: HTTP_VERBS.GET,\n uri: `${this.webcastInstanceUrl}/attendees?keyword=${encodeURIComponent(queryString)}`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#searchWebcastAttendees failed', error);\n throw error;\n });\n },\n\n /**\n * expel webcast attendee by participantId\n * @param {string} participantId\n * @returns {Promise}\n */\n async expelWebcastAttendee(participantId) {\n return this.request({\n method: HTTP_VERBS.DELETE,\n uri: `${this.webcastInstanceUrl}/attendees/${participantId}`,\n headers: {\n authorization: await this.webex.credentials.getUserToken(),\n trackingId: `${config.trackingIdPrefix}_${uuid.v4().toString()}`,\n },\n }).catch((error) => {\n LoggerProxy.logger.error('Meeting:webinar#expelWebcastAttendee failed', error);\n throw error;\n });\n },\n});\n\nexport default Webinar;\n"],"mappings":";;;;;;;;;;;AAGA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,YAAA,GAAAJ,sBAAA,CAAAF,OAAA;AATA;AACA;AACA;;AASA;AACA;AACA;AACA,IAAMO,OAAO,GAAGC,sBAAW,CAACC,MAAM,CAAC;EACjCC,SAAS,EAAEC,mBAAQ;EACnBC,WAAW,EAAE;IACXC,OAAO,EAAEC;EACX,CAAC;EAEDC,KAAK,EAAE;IACLC,QAAQ,EAAE,QAAQ;IAAE;IACpBC,kBAAkB,EAAE,QAAQ;IAAE;IAC9BC,gBAAgB,EAAE,SAAS;IAAE;IAC7BC,cAAc,EAAE,SAAS;IAAE;IAC3BC,cAAc,EAAE,SAAS;IAAE;IAC3BC,sBAAsB,EAAE,SAAS,CAAE;EACrC,CAAC;E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cACH8B,OAAO,EAAA6C,SAAA,CAAAnE;YAAA;YAAA,OAAAmE,SAAA,CAAA5C,MAAA,WAAA4C,SAAA,CAAA9E,EAAA,CAHG5B,OAAO,CAAA+D,IAAA,CAAA2C,SAAA,CAAA9E,EAAA,EAAA8E,SAAA,CAAA7D,EAAA,EAOhBrC,KAAK,CAAC,UAACC,KAAK,EAAK;cAClBC,oBAAW,CAACC,MAAM,CAACF,KAAK,CAAC,6CAA6C,EAAEA,KAAK,CAAC;cAC9E,MAAMA,KAAK;YACb,CAAC;UAAA;UAAA;YAAA,OAAAiG,SAAA,CAAA1C,IAAA;QAAA;MAAA,GAAAwC,QAAA;IAAA;EACH,CAAC;EAAAI,OAAA;AACH,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA5F,OAAA,GAEYnD,OAAO"}
package/package.json CHANGED
@@ -43,7 +43,7 @@
43
43
  "@webex/eslint-config-legacy": "0.0.0",
44
44
  "@webex/jest-config-legacy": "0.0.0",
45
45
  "@webex/legacy-tools": "0.0.0",
46
- "@webex/plugin-meetings": "3.7.0-next.12",
46
+ "@webex/plugin-meetings": "3.7.0-next.14",
47
47
  "@webex/plugin-rooms": "3.7.0-next.4",
48
48
  "@webex/test-helper-chai": "3.7.0-next.2",
49
49
  "@webex/test-helper-mocha": "3.7.0-next.2",
@@ -70,7 +70,7 @@
70
70
  "@webex/internal-plugin-metrics": "3.7.0-next.2",
71
71
  "@webex/internal-plugin-support": "3.7.0-next.5",
72
72
  "@webex/internal-plugin-user": "3.7.0-next.2",
73
- "@webex/internal-plugin-voicea": "3.7.0-next.12",
73
+ "@webex/internal-plugin-voicea": "3.7.0-next.14",
74
74
  "@webex/media-helpers": "3.7.0-next.2",
75
75
  "@webex/plugin-people": "3.7.0-next.2",
76
76
  "@webex/plugin-rooms": "3.7.0-next.4",
@@ -91,5 +91,5 @@
91
91
  "//": [
92
92
  "TODO: upgrade jwt-decode when moving to node 18"
93
93
  ],
94
- "version": "3.7.0-next.12"
94
+ "version": "3.7.0-next.14"
95
95
  }
@@ -0,0 +1,24 @@
1
+ import {ERROR_DICTIONARY} from '../../constants';
2
+
3
+ /**
4
+ * Error occurred while join the webinar
5
+ */
6
+ export default class JoinWebinarError extends Error {
7
+ code: number;
8
+ error: any;
9
+ sdkMessage: string;
10
+
11
+ /**
12
+ * @constructor
13
+ * @param {String} [message]
14
+ * @param {Object} [error]
15
+ */
16
+ constructor(message: string = ERROR_DICTIONARY.JoinWebinarError.MESSAGE, error: any = null) {
17
+ super(message);
18
+ this.name = ERROR_DICTIONARY.JoinWebinarError.NAME;
19
+ this.sdkMessage = ERROR_DICTIONARY.JoinWebinarError.MESSAGE;
20
+ this.error = error;
21
+ this.stack = error ? error.stack : new Error().stack;
22
+ this.code = ERROR_DICTIONARY.JoinWebinarError.CODE;
23
+ }
24
+ }
package/src/constants.ts CHANGED
@@ -198,6 +198,8 @@ export const RETRY_TIMEOUT = 3000;
198
198
 
199
199
  export const ICE_AND_DTLS_CONNECTION_TIMEOUT = 20000;
200
200
  export const ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT = 35000;
201
+ export const WEBINAR_ERROR_WEBCAST = [403026];
202
+ export const WEBINAR_ERROR_REGISTRATIONID = [403037, 403137];
201
203
 
202
204
  // ******************** REGEX **********************
203
205
  // Please alphabetize
@@ -536,9 +538,9 @@ export const ERROR_DICTIONARY = {
536
538
  'Reconnection was not started, because there is one already in progress or reconnections are disabled in config.',
537
539
  CODE: 15,
538
540
  },
539
- WebinarRegistrationError: {
540
- NAME: 'WebinarRegistrationError',
541
- MESSAGE: 'An error occurred while the webinar required registration.',
541
+ JoinWebinarError: {
542
+ NAME: 'JoinWebinarError',
543
+ MESSAGE: 'An error occurred while the join webinar.',
542
544
  CODE: 16,
543
545
  },
544
546
  };
@@ -1317,6 +1319,8 @@ export const MEETING_INFO_FAILURE_REASON = {
1317
1319
  WRONG_CAPTCHA: 'WRONG_CAPTCHA', // wbxappapi requires a captcha code or a wrong captcha code was provided
1318
1320
  POLICY: 'POLICY', // meeting info request violates some meeting policy
1319
1321
  WEBINAR_REGISTRATION: 'WEBINAR_REGISTRATION', // webinar need registration
1322
+ NEED_JOIN_WITH_WEBCAST: 'NEED_JOIN_WITH_WEBCAST', // webinar need using webcast join
1323
+ WEBINAR_NEED_REGISTRATIONID: 'WEBINAR_NEED_REGISTRATIONID', // webinar need registrationID
1320
1324
  OTHER: 'OTHER', // any other error (network, etc)
1321
1325
  };
1322
1326
 
package/src/index.ts CHANGED
@@ -8,7 +8,7 @@ import CaptchaError from './common/errors/captcha-error';
8
8
  import IntentToJoinError from './common/errors/intent-to-join';
9
9
  import PasswordError from './common/errors/password-error';
10
10
  import PermissionError from './common/errors/permission';
11
- import WebinarRegistrationError from './common/errors/webinar-registration-error';
11
+ import JoinWebinarError from './common/errors/join-webinar-error';
12
12
  import {
13
13
  ReclaimHostEmptyWrongKeyError,
14
14
  ReclaimHostIsHostAlreadyError,
@@ -69,7 +69,7 @@ export {
69
69
  ReclaimHostEmptyWrongKeyError,
70
70
  Meeting,
71
71
  MeetingInfoUtil,
72
- WebinarRegistrationError,
72
+ JoinWebinarError,
73
73
  };
74
74
 
75
75
  export {RemoteMedia} from './multistream/remoteMedia';
@@ -122,6 +122,8 @@ import {
122
122
  MEETING_PERMISSION_TOKEN_REFRESH_REASON,
123
123
  ROAP_OFFER_ANSWER_EXCHANGE_TIMEOUT,
124
124
  NAMED_MEDIA_GROUP_TYPE_AUDIO,
125
+ WEBINAR_ERROR_WEBCAST,
126
+ WEBINAR_ERROR_REGISTRATIONID,
125
127
  } from '../constants';
126
128
  import BEHAVIORAL_METRICS from '../metrics/constants';
127
129
  import ParameterError from '../common/errors/parameter';
@@ -129,7 +131,7 @@ import {
129
131
  MeetingInfoV2PasswordError,
130
132
  MeetingInfoV2CaptchaError,
131
133
  MeetingInfoV2PolicyError,
132
- MeetingInfoV2WebinarRegistrationError,
134
+ MeetingInfoV2JoinWebinarError,
133
135
  } from '../meeting-info/meeting-info-v2';
134
136
  import {CSI, ReceiveSlotManager} from '../multistream/receiveSlotManager';
135
137
  import SendSlotManager from '../multistream/sendSlotManager';
@@ -158,7 +160,7 @@ import ControlsOptionsManager from '../controls-options-manager';
158
160
  import PermissionError from '../common/errors/permission';
159
161
  import {LocusMediaRequest} from './locusMediaRequest';
160
162
  import {ConnectionStateHandler, ConnectionStateEvent} from './connectionStateHandler';
161
- import WebinarRegistrationError from '../common/errors/webinar-registration-error';
163
+ import JoinWebinarError from '../common/errors/join-webinar-error';
162
164
 
163
165
  // default callback so we don't call an undefined function, but in practice it should never be used
164
166
  const DEFAULT_ICE_PHASE_CALLBACK = () => 'JOIN_MEETING_FINAL';
@@ -1767,15 +1769,20 @@ export default class Meeting extends StatelessWebexPlugin {
1767
1769
  this.meetingInfo = err.meetingInfo;
1768
1770
  }
1769
1771
  throw new PermissionError();
1770
- } else if (err instanceof MeetingInfoV2WebinarRegistrationError) {
1772
+ } else if (err instanceof MeetingInfoV2JoinWebinarError) {
1771
1773
  this.meetingInfoFailureReason = MEETING_INFO_FAILURE_REASON.WEBINAR_REGISTRATION;
1774
+ if (WEBINAR_ERROR_WEBCAST.includes(err.wbxAppApiCode)) {
1775
+ this.meetingInfoFailureReason = MEETING_INFO_FAILURE_REASON.NEED_JOIN_WITH_WEBCAST;
1776
+ } else if (WEBINAR_ERROR_REGISTRATIONID.includes(err.wbxAppApiCode)) {
1777
+ this.meetingInfoFailureReason = MEETING_INFO_FAILURE_REASON.WEBINAR_NEED_REGISTRATIONID;
1778
+ }
1772
1779
  this.meetingInfoFailureCode = err.wbxAppApiCode;
1773
1780
 
1774
1781
  if (err.meetingInfo) {
1775
1782
  this.meetingInfo = err.meetingInfo;
1776
1783
  }
1777
1784
 
1778
- throw new WebinarRegistrationError();
1785
+ throw new JoinWebinarError();
1779
1786
  } else if (err instanceof MeetingInfoV2PasswordError) {
1780
1787
  LoggerProxy.logger.info(
1781
1788
  // @ts-ignore
@@ -18,7 +18,19 @@ const ADHOC_MEETING_DEFAULT_ERROR =
18
18
  'Failed starting the adhoc meeting, Please contact support team ';
19
19
  const CAPTCHA_ERROR_REQUIRES_PASSWORD_CODES = [423005, 423006];
20
20
  const POLICY_ERROR_CODES = [403049, 403104, 403103, 403048, 403102, 403101];
21
- const WEBINAR_REGISTRATION_ERROR_CODES = [403021, 403022, 403024];
21
+ /**
22
+ * 403021 - Meeting registration is required
23
+ * 403022 - Meeting registration is still pending
24
+ * 403024 - Meeting registration have been rejected
25
+ * 403137 - Registration ID verified failure
26
+ * 423007 - Registration ID input too many time,please input captcha code
27
+ * 403026 - Need to join meeting via webcast
28
+ * 403037 - Meeting join required registration ID
29
+ * 403137 - Registration ID verified failure
30
+ *
31
+ */
32
+ const JOIN_WEBINAR_ERROR_CODES = [403021, 403022, 403024, 403137, 423007, 403026, 403037, 403137];
33
+
22
34
  /**
23
35
  * Error to indicate that wbxappapi requires a password
24
36
  */
@@ -126,9 +138,9 @@ export class MeetingInfoV2CaptchaError extends Error {
126
138
  }
127
139
 
128
140
  /**
129
- * Error preventing join because of a webinar registration error
141
+ * Error preventing join because of a webinar have some error
130
142
  */
131
- export class MeetingInfoV2WebinarRegistrationError extends Error {
143
+ export class MeetingInfoV2JoinWebinarError extends Error {
132
144
  meetingInfo: any;
133
145
  sdkMessage: any;
134
146
  wbxAppApiCode: any;
@@ -142,7 +154,7 @@ export class MeetingInfoV2WebinarRegistrationError extends Error {
142
154
  */
143
155
  constructor(wbxAppApiErrorCode?: number, meetingInfo?: object, message?: string) {
144
156
  super(`${message}, code=${wbxAppApiErrorCode}`);
145
- this.name = 'MeetingInfoV2WebinarRegistrationError';
157
+ this.name = 'MeetingInfoV2JoinWebinarError';
146
158
  this.sdkMessage = message;
147
159
  this.stack = new Error().stack;
148
160
  this.wbxAppApiCode = wbxAppApiErrorCode;
@@ -204,21 +216,21 @@ export default class MeetingInfoV2 {
204
216
  };
205
217
 
206
218
  /**
207
- * Raises a handleWebinarRegistrationError for webinar registration error codes
219
+ * Raises a handleJoinWebinarError for join webinar error codes
208
220
  * @param {any} err the error from the request
209
221
  * @returns {void}
210
222
  */
211
- handleWebinarRegistrationError = (err) => {
223
+ handleJoinWebinarError = (err) => {
212
224
  if (!err.body) {
213
225
  return;
214
226
  }
215
227
 
216
- if (WEBINAR_REGISTRATION_ERROR_CODES.includes(err.body?.code)) {
217
- Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.WEBINAR_REGISTRATION_ERROR, {
228
+ if (JOIN_WEBINAR_ERROR_CODES.includes(err.body?.code)) {
229
+ Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.JOIN_WEBINAR_ERROR, {
218
230
  code: err.body?.code,
219
231
  });
220
232
 
221
- throw new MeetingInfoV2WebinarRegistrationError(
233
+ throw new MeetingInfoV2JoinWebinarError(
222
234
  err.body?.code,
223
235
  err.body?.data?.meetingInfo,
224
236
  err.body?.message
@@ -286,7 +298,7 @@ export default class MeetingInfoV2 {
286
298
  })
287
299
  .catch((err) => {
288
300
  this.handlePolicyError(err);
289
- this.handleWebinarRegistrationError(err);
301
+ this.handleJoinWebinarError(err);
290
302
 
291
303
  Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.ADHOC_MEETING_FAILURE, {
292
304
  reason: err.message,
@@ -441,7 +453,7 @@ export default class MeetingInfoV2 {
441
453
 
442
454
  if (err?.statusCode === 403) {
443
455
  this.handlePolicyError(err);
444
- this.handleWebinarRegistrationError(err);
456
+ this.handleJoinWebinarError(err);
445
457
 
446
458
  Metrics.sendBehavioralMetric(BEHAVIORAL_METRICS.VERIFY_PASSWORD_ERROR, {
447
459
  reason: err.message,
@@ -56,7 +56,7 @@ import MeetingCollection from './collection';
56
56
  import {MEETING_KEY, INoiseReductionEffect, IVirtualBackgroundEffect} from './meetings.types';
57
57
  import MeetingsUtil from './util';
58
58
  import PermissionError from '../common/errors/permission';
59
- import WebinarRegistrationError from '../common/errors/webinar-registration-error';
59
+ import JoinWebinarError from '../common/errors/join-webinar-error';
60
60
  import {SpaceIDDeprecatedError} from '../common/errors/webex-errors';
61
61
  import NoMeetingInfoError from '../common/errors/no-meeting-info';
62
62
 
@@ -1412,7 +1412,7 @@ export default class Meetings extends WebexPlugin {
1412
1412
  !(err instanceof CaptchaError) &&
1413
1413
  !(err instanceof PasswordError) &&
1414
1414
  !(err instanceof PermissionError) &&
1415
- !(err instanceof WebinarRegistrationError)
1415
+ !(err instanceof JoinWebinarError)
1416
1416
  ) {
1417
1417
  LoggerProxy.logger.info(
1418
1418
  `Meetings:index#createMeeting --> Info Unable to fetch meeting info for ${destination}.`
@@ -70,7 +70,7 @@ const BEHAVIORAL_METRICS = {
70
70
  ROAP_HTTP_RESPONSE_MISSING: 'js_sdk_roap_http_response_missing',
71
71
  TURN_DISCOVERY_REQUIRES_OK: 'js_sdk_turn_discovery_requires_ok',
72
72
  REACHABILITY_COMPLETED: 'js_sdk_reachability_completed',
73
- WEBINAR_REGISTRATION_ERROR: 'js_sdk_webinar_registration_error',
73
+ JOIN_WEBINAR_ERROR: 'js_sdk_join_webinar_error',
74
74
  GUEST_ENTERED_LOBBY: 'js_sdk_guest_entered_lobby',
75
75
  GUEST_EXITED_LOBBY: 'js_sdk_guest_exited_lobby',
76
76
  };
@@ -196,12 +196,10 @@ const Webinar = WebexPlugin.extend({
196
196
  [HEADERS.CONTENT_TYPE]: HEADERS.CONTENT_TYPE_VALUE.APPLICATION_JSON,
197
197
  },
198
198
  body: {
199
- layout: {
200
- videoLayout: layout.videoLayout,
201
- contentLayout: layout.contentLayout,
202
- syncStageLayout: layout.syncStageLayout,
203
- syncStageInMeeting: layout.syncStageInMeeting,
204
- },
199
+ videoLayout: layout.videoLayout,
200
+ contentLayout: layout.contentLayout,
201
+ syncStageLayout: layout.syncStageLayout,
202
+ syncStageInMeeting: layout.syncStageInMeeting,
205
203
  },
206
204
  }).catch((error) => {
207
205
  LoggerProxy.logger.error('Meeting:webinar#updateWebcastLayout failed', error);
@@ -91,14 +91,14 @@ import ParameterError from '../../../../src/common/errors/parameter';
91
91
  import PasswordError from '../../../../src/common/errors/password-error';
92
92
  import CaptchaError from '../../../../src/common/errors/captcha-error';
93
93
  import PermissionError from '../../../../src/common/errors/permission';
94
- import WebinarRegistrationError from '../../../../src/common/errors/webinar-registration-error';
94
+ import JoinWebinarError from '../../../../src/common/errors/join-webinar-error';
95
95
  import IntentToJoinError from '../../../../src/common/errors/intent-to-join';
96
96
  import testUtils from '../../../utils/testUtils';
97
97
  import {
98
98
  MeetingInfoV2CaptchaError,
99
99
  MeetingInfoV2PasswordError,
100
100
  MeetingInfoV2PolicyError,
101
- MeetingInfoV2WebinarRegistrationError,
101
+ MeetingInfoV2JoinWebinarError,
102
102
  } from '../../../../src/meeting-info/meeting-info-v2';
103
103
  import {
104
104
  DTLS_HANDSHAKE_FAILED_CLIENT_CODE,
@@ -6330,29 +6330,74 @@ describe('plugin-meetings', () => {
6330
6330
  assert.equal(meeting.fetchMeetingInfoTimeoutId, undefined);
6331
6331
  });
6332
6332
 
6333
- it('handles meetingInfoProvider webinar need registration error', async () => {
6333
+ it('handles MeetingInfoV2JoinWebinarError webinar need registration', async () => {
6334
6334
  meeting.destination = FAKE_DESTINATION;
6335
6335
  meeting.destinationType = FAKE_TYPE;
6336
6336
  meeting.attrs.meetingInfoProvider = {
6337
6337
  fetchMeetingInfo: sinon
6338
6338
  .stub()
6339
6339
  .throws(
6340
- new MeetingInfoV2WebinarRegistrationError(403021, FAKE_MEETING_INFO, 'a message')
6340
+ new MeetingInfoV2JoinWebinarError(403021, FAKE_MEETING_INFO, 'a message')
6341
6341
  ),
6342
6342
  };
6343
6343
 
6344
6344
  await assert.isRejected(
6345
6345
  meeting.fetchMeetingInfo({sendCAevents: true}),
6346
- WebinarRegistrationError
6346
+ JoinWebinarError
6347
6347
  );
6348
6348
 
6349
6349
  assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
6350
- assert.equal(meeting.meetingInfoFailureCode, 403021);
6351
6350
  assert.equal(
6352
6351
  meeting.meetingInfoFailureReason,
6353
6352
  MEETING_INFO_FAILURE_REASON.WEBINAR_REGISTRATION
6354
6353
  );
6355
6354
  });
6355
+
6356
+ it('handles MeetingInfoV2JoinWebinarError webinar need join with webcast', async () => {
6357
+ meeting.destination = FAKE_DESTINATION;
6358
+ meeting.destinationType = FAKE_TYPE;
6359
+ meeting.attrs.meetingInfoProvider = {
6360
+ fetchMeetingInfo: sinon
6361
+ .stub()
6362
+ .throws(
6363
+ new MeetingInfoV2JoinWebinarError(403026, FAKE_MEETING_INFO, 'a message')
6364
+ ),
6365
+ };
6366
+
6367
+ await assert.isRejected(
6368
+ meeting.fetchMeetingInfo({sendCAevents: true}),
6369
+ JoinWebinarError
6370
+ );
6371
+
6372
+ assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
6373
+ assert.equal(
6374
+ meeting.meetingInfoFailureReason,
6375
+ MEETING_INFO_FAILURE_REASON.NEED_JOIN_WITH_WEBCAST
6376
+ );
6377
+ });
6378
+
6379
+ it('handles MeetingInfoV2JoinWebinarError webinar need registrationId', async () => {
6380
+ meeting.destination = FAKE_DESTINATION;
6381
+ meeting.destinationType = FAKE_TYPE;
6382
+ meeting.attrs.meetingInfoProvider = {
6383
+ fetchMeetingInfo: sinon
6384
+ .stub()
6385
+ .throws(
6386
+ new MeetingInfoV2JoinWebinarError(403037, FAKE_MEETING_INFO, 'a message')
6387
+ ),
6388
+ };
6389
+
6390
+ await assert.isRejected(
6391
+ meeting.fetchMeetingInfo({sendCAevents: true}),
6392
+ JoinWebinarError
6393
+ );
6394
+
6395
+ assert.deepEqual(meeting.meetingInfo, FAKE_MEETING_INFO);
6396
+ assert.equal(
6397
+ meeting.meetingInfoFailureReason,
6398
+ MEETING_INFO_FAILURE_REASON.WEBINAR_NEED_REGISTRATIONID
6399
+ );
6400
+ });
6356
6401
  });
6357
6402
 
6358
6403
  describe('#refreshPermissionToken', () => {