@webex/plugin-meetings 3.0.0-beta.97 → 3.0.0-beta.99
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/meeting/index.js +3 -3
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting-info/meeting-info-v2.js +16 -12
- package/dist/meeting-info/meeting-info-v2.js.map +1 -1
- package/dist/meeting-info/utilv2.js +3 -2
- package/dist/meeting-info/utilv2.js.map +1 -1
- package/dist/meetings/index.js +28 -19
- package/dist/meetings/index.js.map +1 -1
- package/dist/multistream/mediaRequestManager.js +17 -17
- package/dist/multistream/mediaRequestManager.js.map +1 -1
- package/dist/multistream/receiveSlot.js.map +1 -1
- package/dist/multistream/remoteMedia.js.map +1 -1
- package/dist/types/meeting/index.d.ts +2 -1
- package/dist/types/meeting-info/meeting-info-v2.d.ts +2 -1
- package/dist/types/meetings/index.d.ts +3 -1
- package/dist/types/multistream/mediaRequestManager.d.ts +10 -10
- package/dist/types/multistream/receiveSlot.d.ts +3 -3
- package/dist/types/multistream/remoteMedia.d.ts +2 -2
- package/package.json +20 -20
- package/src/meeting/index.ts +4 -1
- package/src/meeting-info/meeting-info-v2.ts +4 -1
- package/src/meeting-info/utilv2.ts +5 -2
- package/src/meetings/index.ts +56 -45
- package/src/multistream/mediaRequestManager.ts +24 -24
- package/src/multistream/receiveSlot.ts +4 -4
- package/src/multistream/remoteMedia.ts +2 -2
- package/test/unit/spec/meeting/index.js +9 -2
- package/test/unit/spec/meeting-info/meetinginfov2.js +27 -0
- package/test/unit/spec/meeting-info/utilv2.js +21 -0
- package/test/unit/spec/meetings/index.js +124 -101
|
@@ -3010,6 +3010,7 @@ describe('plugin-meetings', () => {
|
|
|
3010
3010
|
const FAKE_CAPTCHA_AUDIO_URL = 'http://captchaaudio';
|
|
3011
3011
|
const FAKE_CAPTCHA_REFRESH_URL = 'http://captcharefresh';
|
|
3012
3012
|
const FAKE_INSTALLED_ORG_ID = '123456';
|
|
3013
|
+
const FAKE_EXTRA_PARAMS = {mtid: 'm9fe0afd8c435e892afcce9ea25b97046', joinTXId: 'TSmrX61wNF'};
|
|
3013
3014
|
const FAKE_MEETING_INFO = {
|
|
3014
3015
|
conversationUrl: 'some_convo_url',
|
|
3015
3016
|
locusUrl: 'some_locus_url',
|
|
@@ -3043,6 +3044,7 @@ describe('plugin-meetings', () => {
|
|
|
3043
3044
|
await meeting.fetchMeetingInfo({
|
|
3044
3045
|
password: FAKE_PASSWORD,
|
|
3045
3046
|
captchaCode: FAKE_CAPTCHA_CODE,
|
|
3047
|
+
extraParams: FAKE_EXTRA_PARAMS,
|
|
3046
3048
|
});
|
|
3047
3049
|
|
|
3048
3050
|
assert.calledWith(
|
|
@@ -3051,7 +3053,9 @@ describe('plugin-meetings', () => {
|
|
|
3051
3053
|
FAKE_TYPE,
|
|
3052
3054
|
FAKE_PASSWORD,
|
|
3053
3055
|
{code: FAKE_CAPTCHA_CODE, id: FAKE_CAPTCHA_ID},
|
|
3054
|
-
FAKE_INSTALLED_ORG_ID
|
|
3056
|
+
FAKE_INSTALLED_ORG_ID,
|
|
3057
|
+
meeting.locusId,
|
|
3058
|
+
FAKE_EXTRA_PARAMS
|
|
3055
3059
|
);
|
|
3056
3060
|
|
|
3057
3061
|
assert.calledWith(meeting.parseMeetingInfo, {body: FAKE_MEETING_INFO}, FAKE_DESTINATION);
|
|
@@ -3093,7 +3097,10 @@ describe('plugin-meetings', () => {
|
|
|
3093
3097
|
FAKE_DESTINATION,
|
|
3094
3098
|
FAKE_TYPE,
|
|
3095
3099
|
null,
|
|
3096
|
-
null
|
|
3100
|
+
null,
|
|
3101
|
+
undefined,
|
|
3102
|
+
meeting.locusId,
|
|
3103
|
+
{}
|
|
3097
3104
|
);
|
|
3098
3105
|
|
|
3099
3106
|
// parseMeeting info
|
|
@@ -268,6 +268,33 @@ describe('plugin-meetings', () => {
|
|
|
268
268
|
);
|
|
269
269
|
});
|
|
270
270
|
|
|
271
|
+
it('should fetch meeting info with provided extraParams', async () => {
|
|
272
|
+
const requestResponse = {statusCode: 200, body: {meetingKey: '1234323'}};
|
|
273
|
+
const extraParams = {mtid: 'm9fe0afd8c435e892afcce9ea25b97046', joinTXId: 'TSmrX61wNF'}
|
|
274
|
+
|
|
275
|
+
webex.request.resolves(requestResponse);
|
|
276
|
+
|
|
277
|
+
const result = await meetingInfo.fetchMeetingInfo('1234323', _MEETING_ID_, null, null, null, null, extraParams);
|
|
278
|
+
|
|
279
|
+
assert.calledWith(webex.request, {
|
|
280
|
+
method: 'POST',
|
|
281
|
+
service: WBXAPPAPI_SERVICE,
|
|
282
|
+
resource: 'meetingInfo',
|
|
283
|
+
body: {
|
|
284
|
+
supportHostKey: true,
|
|
285
|
+
supportCountryList: true,
|
|
286
|
+
meetingKey: '1234323',
|
|
287
|
+
...extraParams,
|
|
288
|
+
},
|
|
289
|
+
});
|
|
290
|
+
assert.deepEqual(result, requestResponse);
|
|
291
|
+
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
292
|
+
assert.calledWith(
|
|
293
|
+
Metrics.sendBehavioralMetric,
|
|
294
|
+
BEHAVIORAL_METRICS.FETCH_MEETING_INFO_V1_SUCCESS
|
|
295
|
+
);
|
|
296
|
+
});
|
|
297
|
+
|
|
271
298
|
it('create adhoc meeting when conversationUrl passed with enableAdhocMeetings toggle', async () => {
|
|
272
299
|
sinon.stub(meetingInfo, 'createAdhocSpaceMeeting').returns(Promise.resolve());
|
|
273
300
|
await meetingInfo.fetchMeetingInfo('conversationUrl', _CONVERSATION_URL_);
|
|
@@ -150,6 +150,7 @@ describe('plugin-meetings', () => {
|
|
|
150
150
|
});
|
|
151
151
|
|
|
152
152
|
describe('#getRequestBody', () => {
|
|
153
|
+
|
|
153
154
|
it('for _PERSONAL_ROOM_', () => {
|
|
154
155
|
const res = MeetingInfoUtil.getRequestBody({
|
|
155
156
|
type: _PERSONAL_ROOM_,
|
|
@@ -219,6 +220,26 @@ describe('plugin-meetings', () => {
|
|
|
219
220
|
'https://conv-a.wbx2.com/conversation/api/v1/conversations/bfb49280'
|
|
220
221
|
);
|
|
221
222
|
});
|
|
223
|
+
|
|
224
|
+
it('allows for extra params to be provided', () => {
|
|
225
|
+
const extraParams = {mtid: 'm9fe0afd8c435e892afcce9ea25b97046', joinTXId: 'TSmrX61wNF'}
|
|
226
|
+
|
|
227
|
+
const res = MeetingInfoUtil.getRequestBody({
|
|
228
|
+
type: _CONVERSATION_URL_,
|
|
229
|
+
destination: 'https://conv-a.wbx2.com/conversation/api/v1/conversations/bfb49281',
|
|
230
|
+
extraParams,
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
assert.deepEqual(
|
|
234
|
+
res,
|
|
235
|
+
{
|
|
236
|
+
conversationUrl: 'https://conv-a.wbx2.com/conversation/api/v1/conversations/bfb49281',
|
|
237
|
+
supportHostKey: true,
|
|
238
|
+
supportCountryList: true,
|
|
239
|
+
...extraParams,
|
|
240
|
+
}
|
|
241
|
+
);
|
|
242
|
+
});
|
|
222
243
|
});
|
|
223
244
|
|
|
224
245
|
describe('#getWebexSite', () => {
|
|
@@ -589,7 +589,18 @@ describe('plugin-meetings', () => {
|
|
|
589
589
|
assert.exists(create.then);
|
|
590
590
|
await create;
|
|
591
591
|
assert.calledOnce(webex.meetings.createMeeting);
|
|
592
|
-
assert.calledWith(webex.meetings.createMeeting, test1, test2, FAKE_USE_RANDOM_DELAY);
|
|
592
|
+
assert.calledWith(webex.meetings.createMeeting, test1, test2, FAKE_USE_RANDOM_DELAY, {});
|
|
593
|
+
});
|
|
594
|
+
|
|
595
|
+
it('calls createMeeting with extra info params and returns its promise', async () => {
|
|
596
|
+
const FAKE_USE_RANDOM_DELAY = false;
|
|
597
|
+
const FAKE_INFO_EXTRA_PARAMS = {mtid: 'm9fe0afd8c435e892afcce9ea25b97046', joinTXId: 'TSmrX61wNF'};
|
|
598
|
+
const create = webex.meetings.create(test1, test2, FAKE_USE_RANDOM_DELAY, FAKE_INFO_EXTRA_PARAMS);
|
|
599
|
+
|
|
600
|
+
assert.exists(create.then);
|
|
601
|
+
await create;
|
|
602
|
+
assert.calledOnce(webex.meetings.createMeeting);
|
|
603
|
+
assert.calledWith(webex.meetings.createMeeting, test1, test2, FAKE_USE_RANDOM_DELAY, FAKE_INFO_EXTRA_PARAMS);
|
|
593
604
|
});
|
|
594
605
|
|
|
595
606
|
it('creates a new meeting when a scheduled meeting exists in the conversation', async () => {
|
|
@@ -909,6 +920,7 @@ describe('plugin-meetings', () => {
|
|
|
909
920
|
});
|
|
910
921
|
describe('successful MeetingInfo.#fetchMeetingInfo', () => {
|
|
911
922
|
let clock, setTimeoutSpy, fakeMeetingStartTimeString, FAKE_TIME_TO_START;
|
|
923
|
+
const FAKE_INFO_EXTRA_PARAMS = {mtid: 'm9fe0afd8c435e892afcce9ea25b97046', joinTXId: 'TSmrX61wNF'};
|
|
912
924
|
|
|
913
925
|
beforeEach(() => {
|
|
914
926
|
clock = sinon.useFakeTimers();
|
|
@@ -938,13 +950,14 @@ describe('plugin-meetings', () => {
|
|
|
938
950
|
meeting,
|
|
939
951
|
destination,
|
|
940
952
|
type,
|
|
953
|
+
extraParams = {},
|
|
941
954
|
expectedMeetingData = {}
|
|
942
955
|
) => {
|
|
943
956
|
assert.calledOnce(webex.meetings.meetingInfo.fetchMeetingInfo);
|
|
944
957
|
assert.calledOnce(MeetingsUtil.getMeetingAddedType);
|
|
945
958
|
assert.notCalled(setTimeoutSpy);
|
|
946
959
|
assert.calledThrice(TriggerProxy.trigger);
|
|
947
|
-
assert.calledWith(webex.meetings.meetingInfo.fetchMeetingInfo, destination, type);
|
|
960
|
+
assert.calledWith(webex.meetings.meetingInfo.fetchMeetingInfo, destination, type, null, null, undefined, undefined, extraParams);
|
|
948
961
|
assert.calledWith(MeetingsUtil.getMeetingAddedType, 'test type');
|
|
949
962
|
|
|
950
963
|
if (expectedMeetingData.permissionToken) {
|
|
@@ -975,7 +988,7 @@ describe('plugin-meetings', () => {
|
|
|
975
988
|
'meeting:meetingInfoAvailable'
|
|
976
989
|
);
|
|
977
990
|
};
|
|
978
|
-
|
|
991
|
+
|
|
979
992
|
it('creates the meeting from a successful meeting info fetch promise testing', async () => {
|
|
980
993
|
const meeting = await webex.meetings.createMeeting('test destination', 'test type');
|
|
981
994
|
|
|
@@ -984,106 +997,116 @@ describe('plugin-meetings', () => {
|
|
|
984
997
|
meetingJoinUrl: 'meetingJoinUrl',
|
|
985
998
|
};
|
|
986
999
|
|
|
987
|
-
checkCreateWithoutDelay(meeting, 'test destination', 'test type', expectedMeetingData);
|
|
1000
|
+
checkCreateWithoutDelay(meeting, 'test destination', 'test type', {}, expectedMeetingData);
|
|
988
1001
|
});
|
|
989
1002
|
|
|
990
|
-
|
|
991
|
-
const
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
meeting,
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1003
|
+
[undefined, FAKE_INFO_EXTRA_PARAMS].forEach((infoExtraParams) => {
|
|
1004
|
+
const infoExtraParamsProvided = infoExtraParams !== undefined;
|
|
1005
|
+
|
|
1006
|
+
it(`creates the meeting from a successful meeting info fetch meeting resolve testing${infoExtraParamsProvided ? ' with infoExtraParams' : ''}`, async () => {
|
|
1007
|
+
const meeting = await webex.meetings.createMeeting('test destination', 'test type', false, infoExtraParams);
|
|
1008
|
+
const expectedMeetingData = {
|
|
1009
|
+
permissionToken: 'PT',
|
|
1010
|
+
meetingJoinUrl: 'meetingJoinUrl',
|
|
1011
|
+
};
|
|
1012
|
+
|
|
1013
|
+
assert.instanceOf(
|
|
1014
|
+
meeting,
|
|
1015
|
+
Meeting,
|
|
1016
|
+
'createMeeting should eventually resolve to a Meeting Object'
|
|
1017
|
+
);
|
|
1018
|
+
checkCreateWithoutDelay(meeting, 'test destination', 'test type', infoExtraParamsProvided ? infoExtraParams : {}, expectedMeetingData);
|
|
1019
|
+
});
|
|
1020
|
+
|
|
1021
|
+
it(`creates the meeting from a successful meeting info fetch with random delay${infoExtraParamsProvided ? ' with infoExtraParams' : ''}`, async () => {
|
|
1022
|
+
const FAKE_LOCUS_MEETING = {
|
|
1023
|
+
conversationUrl: 'locusConvURL',
|
|
1024
|
+
url: 'locusUrl',
|
|
1025
|
+
info: {
|
|
1026
|
+
webExMeetingId: 'locusMeetingId',
|
|
1027
|
+
sipUri: 'locusSipUri',
|
|
1028
|
+
owner: 'locusOwner',
|
|
1029
|
+
},
|
|
1030
|
+
meeting: {
|
|
1031
|
+
startTime: fakeMeetingStartTimeString,
|
|
1032
|
+
},
|
|
1033
|
+
fullState: {
|
|
1034
|
+
active: false,
|
|
1035
|
+
},
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
const meeting = await webex.meetings.createMeeting(
|
|
1039
|
+
FAKE_LOCUS_MEETING,
|
|
1040
|
+
'test type',
|
|
1041
|
+
true,
|
|
1042
|
+
infoExtraParams
|
|
1043
|
+
);
|
|
1044
|
+
|
|
1045
|
+
assert.instanceOf(
|
|
1046
|
+
meeting,
|
|
1047
|
+
Meeting,
|
|
1048
|
+
'createMeeting should eventually resolve to a Meeting Object'
|
|
1049
|
+
);
|
|
1050
|
+
assert.notCalled(webex.meetings.meetingInfo.fetchMeetingInfo);
|
|
1051
|
+
assert.calledOnce(setTimeoutSpy);
|
|
1052
|
+
|
|
1053
|
+
// Parse meeting info with locus object
|
|
1054
|
+
assert.equal(meeting.conversationUrl, 'locusConvURL');
|
|
1055
|
+
assert.equal(meeting.locusUrl, 'locusUrl');
|
|
1056
|
+
assert.equal(meeting.sipUri, 'locusSipUri');
|
|
1057
|
+
assert.equal(meeting.meetingNumber, 'locusMeetingId');
|
|
1058
|
+
assert.isUndefined(meeting.meetingJoinUrl);
|
|
1059
|
+
assert.equal(meeting.owner, 'locusOwner');
|
|
1060
|
+
assert.isUndefined(meeting.permissionToken);
|
|
1061
|
+
|
|
1062
|
+
// Add meeting and send trigger
|
|
1063
|
+
assert.calledWith(MeetingsUtil.getMeetingAddedType, 'test type');
|
|
1064
|
+
assert.calledTwice(TriggerProxy.trigger);
|
|
1065
|
+
assert.calledWith(
|
|
1066
|
+
TriggerProxy.trigger,
|
|
1067
|
+
sinon.match.instanceOf(Meetings),
|
|
1068
|
+
{
|
|
1069
|
+
file: 'meetings',
|
|
1070
|
+
function: 'createMeeting',
|
|
1071
|
+
},
|
|
1072
|
+
'meeting:added',
|
|
1073
|
+
{
|
|
1074
|
+
meeting: sinon.match.instanceOf(Meeting),
|
|
1075
|
+
type: 'test meeting added type',
|
|
1076
|
+
}
|
|
1077
|
+
);
|
|
1078
|
+
|
|
1079
|
+
// When timer expires
|
|
1080
|
+
clock.tick(FAKE_TIME_TO_START);
|
|
1081
|
+
assert.calledWith(
|
|
1082
|
+
webex.meetings.meetingInfo.fetchMeetingInfo,
|
|
1083
|
+
FAKE_LOCUS_MEETING,
|
|
1084
|
+
'test type',
|
|
1085
|
+
null,
|
|
1086
|
+
null,
|
|
1087
|
+
undefined,
|
|
1088
|
+
undefined,
|
|
1089
|
+
infoExtraParamsProvided ? infoExtraParams : {}
|
|
1090
|
+
);
|
|
1091
|
+
|
|
1092
|
+
// Parse meeting info is called again with new meeting info
|
|
1093
|
+
await testUtils.flushPromises();
|
|
1094
|
+
assert.equal(meeting.conversationUrl, 'locusConvURL');
|
|
1095
|
+
assert.equal(meeting.locusUrl, 'locusUrl');
|
|
1096
|
+
assert.equal(meeting.sipUri, 'locusSipUri');
|
|
1097
|
+
assert.equal(meeting.meetingNumber, 'locusMeetingId');
|
|
1098
|
+
assert.equal(meeting.meetingJoinUrl, 'meetingJoinUrl');
|
|
1099
|
+
assert.equal(meeting.owner, 'locusOwner');
|
|
1100
|
+
assert.equal(meeting.permissionToken, 'PT');
|
|
1101
|
+
|
|
1102
|
+
assert.calledWith(
|
|
1103
|
+
TriggerProxy.trigger,
|
|
1104
|
+
meeting,
|
|
1105
|
+
{file: 'meetings', function: 'fetchMeetingInfo'},
|
|
1106
|
+
'meeting:meetingInfoAvailable'
|
|
1107
|
+
);
|
|
1108
|
+
});
|
|
1109
|
+
})
|
|
1087
1110
|
|
|
1088
1111
|
it('creates the meeting from a successful meeting info fetch that has no random delay because it is active', async () => {
|
|
1089
1112
|
const FAKE_LOCUS_MEETING = {
|