@webex/plugin-meetings 3.7.0-next.13 → 3.7.0-next.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/breakouts/breakout.js +1 -1
- package/dist/breakouts/index.js +1 -1
- package/dist/common/errors/{webinar-registration-error.js → join-webinar-error.js} +12 -12
- package/dist/common/errors/join-webinar-error.js.map +1 -0
- package/dist/constants.js +10 -4
- package/dist/constants.js.map +1 -1
- package/dist/index.js +7 -7
- package/dist/index.js.map +1 -1
- package/dist/interpretation/index.js +1 -1
- package/dist/interpretation/siLanguage.js +1 -1
- package/dist/meeting/index.js +18 -13
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +29 -17
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meetings/index.js +2 -2
- package/dist/meetings/index.js.map +1 -1
- package/dist/metrics/constants.js +1 -1
- package/dist/metrics/constants.js.map +1 -1
- package/dist/multistream/remoteMedia.js +30 -15
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/types/common/errors/{webinar-registration-error.d.ts → join-webinar-error.d.ts} +2 -2
- package/dist/types/constants.d.ts +5 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/meeting-info/meeting-info-v2.d.ts +4 -4
- package/dist/types/metrics/constants.d.ts +1 -1
- package/dist/webinar/index.js +1 -1
- package/package.json +3 -3
- package/src/common/errors/join-webinar-error.ts +24 -0
- package/src/constants.ts +7 -3
- package/src/index.ts +2 -2
- package/src/meeting/index.ts +11 -4
- package/src/meeting-info/meeting-info-v2.ts +23 -11
- package/src/meetings/index.ts +2 -2
- package/src/metrics/constants.ts +1 -1
- package/src/multistream/remoteMedia.ts +28 -15
- package/test/unit/spec/meeting/index.js +51 -6
- package/test/unit/spec/meeting-info/meetinginfov2.js +9 -4
- package/test/unit/spec/multistream/remoteMedia.ts +11 -7
- package/dist/common/errors/webinar-registration-error.js.map +0 -1
- package/src/common/errors/webinar-registration-error.ts +0 -27
|
@@ -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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
-
|
|
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', () => {
|
|
@@ -18,7 +18,7 @@ import MeetingInfo, {
|
|
|
18
18
|
MeetingInfoV2CaptchaError,
|
|
19
19
|
MeetingInfoV2AdhocMeetingError,
|
|
20
20
|
MeetingInfoV2PolicyError,
|
|
21
|
-
|
|
21
|
+
MeetingInfoV2JoinWebinarError,
|
|
22
22
|
} from '@webex/plugin-meetings/src/meeting-info/meeting-info-v2';
|
|
23
23
|
import MeetingInfoUtil from '@webex/plugin-meetings/src/meeting-info/utilv2';
|
|
24
24
|
import Metrics from '@webex/plugin-meetings/src/metrics';
|
|
@@ -895,9 +895,14 @@ describe('plugin-meetings', () => {
|
|
|
895
895
|
{errorCode: 403021},
|
|
896
896
|
{errorCode: 403022},
|
|
897
897
|
{errorCode: 403024},
|
|
898
|
+
{errorCode: 403137},
|
|
899
|
+
{errorCode: 423007},
|
|
900
|
+
{errorCode: 403026},
|
|
901
|
+
{errorCode: 403037},
|
|
902
|
+
{errorCode: 403137},
|
|
898
903
|
],
|
|
899
904
|
({errorCode}) => {
|
|
900
|
-
it(`should throw a
|
|
905
|
+
it(`should throw a MeetingInfoV2JoinWebinarError for error code ${errorCode}`, async () => {
|
|
901
906
|
const message = 'a message';
|
|
902
907
|
const meetingInfoData = {meetingInfo: {registrationUrl: 'registrationUrl'}};
|
|
903
908
|
|
|
@@ -909,7 +914,7 @@ describe('plugin-meetings', () => {
|
|
|
909
914
|
await meetingInfo.createAdhocSpaceMeeting(conversationUrl, installedOrgID);
|
|
910
915
|
assert.fail('createAdhocSpaceMeeting should have thrown, but has not done that');
|
|
911
916
|
} catch (err) {
|
|
912
|
-
assert.instanceOf(err,
|
|
917
|
+
assert.instanceOf(err, MeetingInfoV2JoinWebinarError);
|
|
913
918
|
assert.deepEqual(err.message, `${message}, code=${errorCode}`);
|
|
914
919
|
assert.equal(err.wbxAppApiCode, errorCode);
|
|
915
920
|
assert.deepEqual(err.meetingInfo, meetingInfoData);
|
|
@@ -917,7 +922,7 @@ describe('plugin-meetings', () => {
|
|
|
917
922
|
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
918
923
|
assert.calledWith(
|
|
919
924
|
Metrics.sendBehavioralMetric,
|
|
920
|
-
BEHAVIORAL_METRICS.
|
|
925
|
+
BEHAVIORAL_METRICS.JOIN_WEBINAR_ERROR,
|
|
921
926
|
{code: errorCode}
|
|
922
927
|
);
|
|
923
928
|
|
|
@@ -249,14 +249,18 @@ describe('RemoteMedia', () => {
|
|
|
249
249
|
|
|
250
250
|
forEach(
|
|
251
251
|
[
|
|
252
|
-
{height:
|
|
253
|
-
{height:
|
|
254
|
-
{height:
|
|
255
|
-
{height:
|
|
256
|
-
{height:
|
|
257
|
-
{height:
|
|
252
|
+
{height: 90, fs: 60}, // 90p
|
|
253
|
+
{height: 98, fs: 60},
|
|
254
|
+
{height: 99, fs: 240}, // 180p
|
|
255
|
+
{height: 180, fs: 240},
|
|
256
|
+
{height: 197, fs: 240},
|
|
257
|
+
{height: 198, fs: 920}, // 360p
|
|
258
|
+
{height: 360, fs: 920},
|
|
259
|
+
{height: 395, fs: 920},
|
|
260
|
+
{height: 396, fs: 3600}, // 720p
|
|
258
261
|
{height: 720, fs: 3600},
|
|
259
|
-
{height: 721, fs: 8192},
|
|
262
|
+
{height: 721, fs: 8192}, // 1080p
|
|
263
|
+
{height: 1080, fs: 8192},
|
|
260
264
|
],
|
|
261
265
|
({height, fs}) => {
|
|
262
266
|
it(`sets the max fs to ${fs} correctly when height is ${height}`, () => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_constants","require","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf2","default","result","NewTarget","constructor","_Reflect$construct","arguments","apply","_possibleConstructorReturn2","Reflect","sham","Proxy","Boolean","prototype","valueOf","call","e","WebinarRegistrationError","exports","_Error","_inherits2","_super","_this","message","length","undefined","ERROR_DICTIONARY","MESSAGE","error","_classCallCheck2","_defineProperty2","_assertThisInitialized2","name","NAME","sdkMessage","stack","Error","code","CODE","_createClass2","_wrapNativeSuper2"],"sources":["webinar-registration-error.ts"],"sourcesContent":["import {ERROR_DICTIONARY} from '../../constants';\n\n/**\n * Error occurred while the webinar required registration\n */\nexport default class WebinarRegistrationError extends Error {\n code: number;\n error: any;\n sdkMessage: string;\n\n /**\n * @constructor\n * @param {String} [message]\n * @param {Object} [error]\n */\n constructor(\n message: string = ERROR_DICTIONARY.WebinarRegistrationError.MESSAGE,\n error: any = null\n ) {\n super(message);\n this.name = ERROR_DICTIONARY.WebinarRegistrationError.NAME;\n this.sdkMessage = ERROR_DICTIONARY.WebinarRegistrationError.MESSAGE;\n this.error = error;\n this.stack = error ? error.stack : new Error().stack;\n this.code = ERROR_DICTIONARY.WebinarRegistrationError.CODE;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAiD,SAAAC,aAAAC,OAAA,QAAAC,yBAAA,GAAAC,yBAAA,oBAAAC,qBAAA,QAAAC,KAAA,OAAAC,gBAAA,CAAAC,OAAA,EAAAN,OAAA,GAAAO,MAAA,MAAAN,yBAAA,QAAAO,SAAA,OAAAH,gBAAA,CAAAC,OAAA,QAAAG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IAAI,GAAGN,2BAAgB,CAACT,wBAAwB,CAACgB,IAAI;IAC1DX,KAAA,CAAKY,UAAU,GAAGR,2BAAgB,CAACT,wBAAwB,CAACU,OAAO;IACnEL,KAAA,CAAKM,KAAK,GAAGA,KAAK;IAClBN,KAAA,CAAKa,KAAK,GAAGP,KAAK,GAAGA,KAAK,CAACO,KAAK,GAAG,IAAIC,KAAK,CAAC,CAAC,CAACD,KAAK;IACpDb,KAAA,CAAKe,IAAI,GAAGX,2BAAgB,CAACT,wBAAwB,CAACqB,IAAI;IAAC,OAAAhB,KAAA;EAC7D;EAAC,WAAAiB,aAAA,CAAAtC,OAAA,EAAAgB,wBAAA;AAAA,oBAAAuB,iBAAA,CAAAvC,OAAA,EApBmDmC,KAAK"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {ERROR_DICTIONARY} from '../../constants';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Error occurred while the webinar required registration
|
|
5
|
-
*/
|
|
6
|
-
export default class WebinarRegistrationError 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(
|
|
17
|
-
message: string = ERROR_DICTIONARY.WebinarRegistrationError.MESSAGE,
|
|
18
|
-
error: any = null
|
|
19
|
-
) {
|
|
20
|
-
super(message);
|
|
21
|
-
this.name = ERROR_DICTIONARY.WebinarRegistrationError.NAME;
|
|
22
|
-
this.sdkMessage = ERROR_DICTIONARY.WebinarRegistrationError.MESSAGE;
|
|
23
|
-
this.error = error;
|
|
24
|
-
this.stack = error ? error.stack : new Error().stack;
|
|
25
|
-
this.code = ERROR_DICTIONARY.WebinarRegistrationError.CODE;
|
|
26
|
-
}
|
|
27
|
-
}
|