@webex/plugin-meetings 1.153.3 → 1.154.2
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/constants.js +13 -8
- package/dist/constants.js.map +1 -1
- package/dist/meeting/index.js +54 -41
- package/dist/meeting/index.js.map +1 -1
- package/dist/meeting/request.js +24 -20
- package/dist/meeting/request.js.map +1 -1
- package/dist/meeting/util.js +2 -1
- package/dist/meeting/util.js.map +1 -1
- package/dist/meetings/index.js +8 -1
- package/dist/meetings/index.js.map +1 -1
- package/dist/metrics/config.js +3 -1
- package/dist/metrics/config.js.map +1 -1
- package/dist/metrics/index.js +23 -9
- package/dist/metrics/index.js.map +1 -1
- package/dist/peer-connection-manager/index.js +22 -10
- package/dist/peer-connection-manager/index.js.map +1 -1
- package/dist/reconnection-manager/index.js +1 -1
- package/dist/reconnection-manager/index.js.map +1 -1
- package/dist/roap/handler.js +4 -4
- package/dist/roap/handler.js.map +1 -1
- package/package.json +5 -5
- package/src/constants.js +12 -6
- package/src/meeting/index.js +85 -68
- package/src/meeting/request.js +10 -5
- package/src/meeting/util.js +2 -1
- package/src/meetings/index.js +14 -3
- package/src/metrics/config.js +1 -0
- package/src/metrics/index.js +23 -9
- package/src/peer-connection-manager/index.js +29 -13
- package/src/reconnection-manager/index.js +3 -3
- package/src/roap/handler.js +5 -5
- package/test/unit/spec/meeting/index.js +20 -7
- package/test/unit/spec/meeting/request.js +53 -1
- package/test/unit/spec/meeting/utils.js +41 -0
- package/test/unit/spec/meetings/index.js +3 -1
- package/test/unit/spec/metrics/index.js +6 -6
- package/test/unit/spec/peerconnection-manager/index.js +5 -5
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
OFFER,
|
|
22
22
|
QUALITY_LEVELS,
|
|
23
23
|
MAX_FRAMESIZES,
|
|
24
|
-
|
|
24
|
+
BEHAVIORAL_METRICS
|
|
25
25
|
} from '../constants';
|
|
26
26
|
import {error, eventType} from '../metrics/config';
|
|
27
27
|
import MediaError from '../common/errors/media';
|
|
@@ -324,6 +324,11 @@ pc.setRemoteSessionDetails = (
|
|
|
324
324
|
if (peerConnection.signalingState === SDP.HAVE_LOCAL_OFFER || (peerConnection.signalingState === SDP.STABLE && typeStr === SDP.OFFER)) {
|
|
325
325
|
sdp = setStartBitrateOnRemoteSdp(sdp);
|
|
326
326
|
|
|
327
|
+
if (!peerConnection.enableExtmap) {
|
|
328
|
+
sdp = sdp.replace(/\na=extmap.*/g, '');
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
|
|
327
332
|
return peerConnection.setRemoteDescription(
|
|
328
333
|
new window.RTCSessionDescription({
|
|
329
334
|
type: typeStr,
|
|
@@ -342,7 +347,7 @@ pc.setRemoteSessionDetails = (
|
|
|
342
347
|
LoggerProxy.logger.error(`Peer-connection-manager:index#setRemoteDescription --> ${error} missing remotesdp`);
|
|
343
348
|
|
|
344
349
|
|
|
345
|
-
const metricName =
|
|
350
|
+
const metricName = BEHAVIORAL_METRICS.PEERCONNECTION_FAILURE;
|
|
346
351
|
const data = {
|
|
347
352
|
correlation_id: meetingId,
|
|
348
353
|
reason: error.message,
|
|
@@ -352,7 +357,7 @@ pc.setRemoteSessionDetails = (
|
|
|
352
357
|
type: error.name
|
|
353
358
|
};
|
|
354
359
|
|
|
355
|
-
Metrics.
|
|
360
|
+
Metrics.sendBehavioralMetric(metricName, data, metadata);
|
|
356
361
|
|
|
357
362
|
return Metrics.postEvent({
|
|
358
363
|
event: eventType.REMOTE_SDP_RECEIVED,
|
|
@@ -387,6 +392,10 @@ pc.createOffer = (peerConnection, {
|
|
|
387
392
|
}) => {
|
|
388
393
|
LoggerProxy.logger.log('PeerConnectionManager:index#createOffer --> creating a new offer');
|
|
389
394
|
|
|
395
|
+
// saving the extMap State to use in setRemoteDescription
|
|
396
|
+
|
|
397
|
+
peerConnection.enableExtmap = enableExtmap;
|
|
398
|
+
|
|
390
399
|
return peerConnection
|
|
391
400
|
.createOffer()
|
|
392
401
|
.then((description) => {
|
|
@@ -423,8 +432,8 @@ pc.createOffer = (peerConnection, {
|
|
|
423
432
|
.catch((error) => {
|
|
424
433
|
LoggerProxy.logger.error(`Peer-connection-manager:index#createOffer --> ${error}`);
|
|
425
434
|
if (error instanceof InvalidSdpError) {
|
|
426
|
-
Metrics.
|
|
427
|
-
|
|
435
|
+
Metrics.sendBehavioralMetric(
|
|
436
|
+
BEHAVIORAL_METRICS.INVALID_ICE_CANDIDATE,
|
|
428
437
|
{
|
|
429
438
|
correlation_id: meetingId,
|
|
430
439
|
code: error.code,
|
|
@@ -433,7 +442,7 @@ pc.createOffer = (peerConnection, {
|
|
|
433
442
|
);
|
|
434
443
|
}
|
|
435
444
|
else {
|
|
436
|
-
const metricName =
|
|
445
|
+
const metricName = BEHAVIORAL_METRICS.PEERCONNECTION_FAILURE;
|
|
437
446
|
const data = {
|
|
438
447
|
correlation_id: meetingId,
|
|
439
448
|
reason: error.message,
|
|
@@ -443,7 +452,7 @@ pc.createOffer = (peerConnection, {
|
|
|
443
452
|
type: error.name
|
|
444
453
|
};
|
|
445
454
|
|
|
446
|
-
Metrics.
|
|
455
|
+
Metrics.sendBehavioralMetric(metricName, data, metadata);
|
|
447
456
|
}
|
|
448
457
|
|
|
449
458
|
Metrics.postEvent({
|
|
@@ -538,15 +547,15 @@ pc.createAnswer = (params, {meetingId, remoteQualityLevel}) => {
|
|
|
538
547
|
})
|
|
539
548
|
.catch((error) => {
|
|
540
549
|
if (error instanceof InvalidSdpError) {
|
|
541
|
-
Metrics.
|
|
542
|
-
|
|
550
|
+
Metrics.sendBehavioralMetric(
|
|
551
|
+
BEHAVIORAL_METRICS.INVALID_ICE_CANDIDATE,
|
|
543
552
|
{
|
|
544
553
|
correlation_id: meetingId
|
|
545
554
|
}
|
|
546
555
|
);
|
|
547
556
|
}
|
|
548
557
|
else {
|
|
549
|
-
const metricName =
|
|
558
|
+
const metricName = BEHAVIORAL_METRICS.PEERCONNECTION_FAILURE;
|
|
550
559
|
const data = {
|
|
551
560
|
correlation_id: meetingId,
|
|
552
561
|
reason: error.message,
|
|
@@ -556,7 +565,7 @@ pc.createAnswer = (params, {meetingId, remoteQualityLevel}) => {
|
|
|
556
565
|
type: error.name
|
|
557
566
|
};
|
|
558
567
|
|
|
559
|
-
Metrics.
|
|
568
|
+
Metrics.sendBehavioralMetric(metricName, data, metadata);
|
|
560
569
|
}
|
|
561
570
|
|
|
562
571
|
LoggerProxy.logger.error(`PeerConnectionManager:index#setRemoteSessionDetails --> Error creating remote session, error: ${error}`);
|
|
@@ -619,8 +628,8 @@ pc.setPeerConnectionEvents = (meeting) => {
|
|
|
619
628
|
function: 'connectionFailed'
|
|
620
629
|
});
|
|
621
630
|
|
|
622
|
-
Metrics.
|
|
623
|
-
|
|
631
|
+
Metrics.sendBehavioralMetric(
|
|
632
|
+
BEHAVIORAL_METRICS.CONNECTION_FAILURE,
|
|
624
633
|
{
|
|
625
634
|
correlation_id: meeting.correlationId,
|
|
626
635
|
locus_id: meeting.locusId
|
|
@@ -642,6 +651,13 @@ pc.setPeerConnectionEvents = (meeting) => {
|
|
|
642
651
|
// Ice connection state goes to connected when both client and server sends STUN packets and
|
|
643
652
|
// Established connected between them. Firefox does not trigger COMPLETED and only trigger CONNECTED
|
|
644
653
|
Metrics.postEvent({event: eventType.ICE_END, meeting});
|
|
654
|
+
Metrics.sendBehavioralMetric(
|
|
655
|
+
BEHAVIORAL_METRICS.CONNECTION_SUCCESS,
|
|
656
|
+
{
|
|
657
|
+
correlation_id: meeting.correlationId,
|
|
658
|
+
locus_id: meeting.locusId
|
|
659
|
+
}
|
|
660
|
+
);
|
|
645
661
|
meeting.setNetworkStatus(NETWORK_STATUS.CONNECTED);
|
|
646
662
|
meeting.reconnectionManager.iceReconnected();
|
|
647
663
|
LoggerProxy.logger.info('PeerConnectionManager:index#setPeerConnectionEvents --> ICE STATE CONNECTED.');
|
|
@@ -8,7 +8,7 @@ import LoggerProxy from '../common/logs/logger-proxy';
|
|
|
8
8
|
import Trigger from '../common/events/trigger-proxy';
|
|
9
9
|
import {
|
|
10
10
|
EVENT_TRIGGERS,
|
|
11
|
-
|
|
11
|
+
BEHAVIORAL_METRICS,
|
|
12
12
|
RECONNECTION,
|
|
13
13
|
SHARE_STATUS,
|
|
14
14
|
SHARE_STOPPED_REASON,
|
|
@@ -424,8 +424,8 @@ export default class ReconnectionManager {
|
|
|
424
424
|
}
|
|
425
425
|
else {
|
|
426
426
|
LoggerProxy.logger.error('ReconnectionManager:index#rejoinMeeting --> Unable to rejoin meeting after max attempts.', joinError);
|
|
427
|
-
Metrics.
|
|
428
|
-
|
|
427
|
+
Metrics.sendBehavioralMetric(
|
|
428
|
+
BEHAVIORAL_METRICS.MEETING_MAX_REJOIN_FAILURE,
|
|
429
429
|
{
|
|
430
430
|
locus_id: this.meeting.locusUrl.split('/').pop(),
|
|
431
431
|
reason: joinError.message,
|
package/src/roap/handler.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {StatelessWebexPlugin} from '@webex/webex-core';
|
|
3
3
|
|
|
4
4
|
import LoggerProxy from '../common/logs/logger-proxy';
|
|
5
|
-
import {ROAP, _OFFER_,
|
|
5
|
+
import {ROAP, _OFFER_, BEHAVIORAL_METRICS} from '../constants';
|
|
6
6
|
import Metrics from '../metrics';
|
|
7
7
|
|
|
8
8
|
import RoapUtil from './util';
|
|
@@ -44,14 +44,14 @@ const handleSessionStep = ({
|
|
|
44
44
|
if (session.OFFER && messageType === _OFFER_) {
|
|
45
45
|
session.GLARE_OFFER = roap.msg;
|
|
46
46
|
session.GLARE_OFFER.remote = !!roap.remote;
|
|
47
|
-
const metricName =
|
|
47
|
+
const metricName = BEHAVIORAL_METRICS.ROAP_GLARE_CONDITION;
|
|
48
48
|
const data = {
|
|
49
49
|
correlation_id: correlationId,
|
|
50
50
|
locus_id: locusUrl.split('/').pop(),
|
|
51
51
|
sequence: sequenceId
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
-
Metrics.
|
|
54
|
+
Metrics.sendBehavioralMetric(metricName, data);
|
|
55
55
|
|
|
56
56
|
LoggerProxy.logger.warn(`Roap:handler#handleSessionStep --> Glare condition occurred with new mercury event, sequenceId: ${sequenceId}`);
|
|
57
57
|
}
|
|
@@ -112,7 +112,7 @@ export default class RoapHandler extends StatelessWebexPlugin {
|
|
|
112
112
|
});
|
|
113
113
|
})
|
|
114
114
|
.catch((error) => {
|
|
115
|
-
const metricName =
|
|
115
|
+
const metricName = BEHAVIORAL_METRICS.ROAP_ANSWER_FAILURE;
|
|
116
116
|
const data = {
|
|
117
117
|
correlation_id: meeting.correlationId,
|
|
118
118
|
locus_id: meeting.locusUrl.split('/').pop(),
|
|
@@ -123,7 +123,7 @@ export default class RoapHandler extends StatelessWebexPlugin {
|
|
|
123
123
|
type: error.name
|
|
124
124
|
};
|
|
125
125
|
|
|
126
|
-
Metrics.
|
|
126
|
+
Metrics.sendBehavioralMetric(metricName, data, metadata);
|
|
127
127
|
LoggerProxy.logger.error(`Roap:handler#perform --> Error occured during wait receive answer, continuing, ${error}`);
|
|
128
128
|
});
|
|
129
129
|
}
|
|
@@ -30,7 +30,7 @@ import Metrics from '@webex/plugin-meetings/src/metrics';
|
|
|
30
30
|
import {
|
|
31
31
|
FLOOR_ACTION,
|
|
32
32
|
SHARE_STATUS,
|
|
33
|
-
|
|
33
|
+
BEHAVIORAL_METRICS,
|
|
34
34
|
MEETING_INFO_FAILURE_REASON,
|
|
35
35
|
PASSWORD_STATUS,
|
|
36
36
|
EVENTS,
|
|
@@ -610,6 +610,17 @@ describe('plugin-meetings', () => {
|
|
|
610
610
|
});
|
|
611
611
|
});
|
|
612
612
|
describe('#join', () => {
|
|
613
|
+
let sandbox = null;
|
|
614
|
+
|
|
615
|
+
beforeEach(() => {
|
|
616
|
+
sandbox = sinon.createSandbox();
|
|
617
|
+
});
|
|
618
|
+
|
|
619
|
+
afterEach(() => {
|
|
620
|
+
sandbox.restore();
|
|
621
|
+
sandbox = null;
|
|
622
|
+
});
|
|
623
|
+
|
|
613
624
|
it('should have #join', () => {
|
|
614
625
|
assert.exists(meeting.join);
|
|
615
626
|
});
|
|
@@ -619,8 +630,9 @@ describe('plugin-meetings', () => {
|
|
|
619
630
|
});
|
|
620
631
|
describe('successful', () => {
|
|
621
632
|
beforeEach(() => {
|
|
622
|
-
|
|
633
|
+
sandbox.stub(MeetingUtil, 'joinMeeting').returns(Promise.resolve());
|
|
623
634
|
});
|
|
635
|
+
|
|
624
636
|
it('should join the meeting and return promise', async () => {
|
|
625
637
|
const join = meeting.join();
|
|
626
638
|
|
|
@@ -650,9 +662,10 @@ describe('plugin-meetings', () => {
|
|
|
650
662
|
});
|
|
651
663
|
describe('failure', () => {
|
|
652
664
|
beforeEach(() => {
|
|
653
|
-
|
|
665
|
+
sandbox.stub(MeetingUtil, 'joinMeeting').returns(Promise.reject());
|
|
654
666
|
meeting.logger.log = sinon.stub().returns(true);
|
|
655
667
|
});
|
|
668
|
+
|
|
656
669
|
describe('guest join', () => {
|
|
657
670
|
beforeEach(() => {
|
|
658
671
|
MeetingUtil.isPinOrGuest = sinon.stub().returns(true);
|
|
@@ -2420,12 +2433,12 @@ describe('plugin-meetings', () => {
|
|
|
2420
2433
|
});
|
|
2421
2434
|
|
|
2422
2435
|
it('should send metrics on reconnect failure', async () => {
|
|
2423
|
-
sandbox.stub(Metrics, '
|
|
2436
|
+
sandbox.stub(Metrics, 'sendBehavioralMetric');
|
|
2424
2437
|
await assert.isRejected(meeting.reconnect());
|
|
2425
|
-
assert(Metrics.
|
|
2438
|
+
assert(Metrics.sendBehavioralMetric.calledOnce);
|
|
2426
2439
|
assert.calledWith(
|
|
2427
|
-
Metrics.
|
|
2428
|
-
|
|
2440
|
+
Metrics.sendBehavioralMetric,
|
|
2441
|
+
BEHAVIORAL_METRICS.MEETING_RECONNECT_FAILURE,
|
|
2429
2442
|
{
|
|
2430
2443
|
correlation_id: meeting.correlationId,
|
|
2431
2444
|
locus_id: meeting.locusUrl.split('/').pop(),
|
|
@@ -19,10 +19,18 @@ describe('plugin-meetings', () => {
|
|
|
19
19
|
regionCode: 'WEST-COAST'
|
|
20
20
|
};
|
|
21
21
|
|
|
22
|
+
webex.internal = {
|
|
23
|
+
services: {
|
|
24
|
+
get: sinon.mock().returns('locusUrl'),
|
|
25
|
+
waitForCatalog: sinon.mock().returns(Promise.resolve({}))
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
|
|
22
29
|
meetingsRequest = new MeetingRequest({}, {
|
|
23
30
|
parent: webex
|
|
24
31
|
});
|
|
25
32
|
|
|
33
|
+
|
|
26
34
|
meetingsRequest.request = sinon.mock().returns(Promise.resolve({}));
|
|
27
35
|
});
|
|
28
36
|
|
|
@@ -112,12 +120,15 @@ describe('plugin-meetings', () => {
|
|
|
112
120
|
const deviceUrl = 'deviceUrl';
|
|
113
121
|
const correlationId = 'random-uuid';
|
|
114
122
|
const roapMessage = 'roap-message';
|
|
123
|
+
const permissionToken = 'permission-token';
|
|
115
124
|
|
|
116
125
|
await meetingsRequest.joinMeeting({
|
|
117
126
|
locusUrl,
|
|
118
127
|
deviceUrl,
|
|
119
128
|
correlationId,
|
|
120
|
-
roapMessage
|
|
129
|
+
roapMessage,
|
|
130
|
+
permissionToken
|
|
131
|
+
|
|
121
132
|
});
|
|
122
133
|
const requestParams = meetingsRequest.request.getCall(0).args[0];
|
|
123
134
|
|
|
@@ -125,8 +136,49 @@ describe('plugin-meetings', () => {
|
|
|
125
136
|
assert.equal(requestParams.uri, `${locusUrl}/participant?alternateRedirect=true`);
|
|
126
137
|
assert.equal(requestParams.body.device.url, deviceUrl);
|
|
127
138
|
assert.equal(requestParams.body.device.countryCode, 'US');
|
|
139
|
+
assert.equal(requestParams.body.permissionToken, 'permission-token');
|
|
128
140
|
assert.equal(requestParams.body.device.regionCode, 'WEST-COAST');
|
|
129
141
|
});
|
|
142
|
+
|
|
143
|
+
it('sends /call with meetingNumber if inviteeAddress does not exist', async () => {
|
|
144
|
+
const deviceUrl = 'deviceUrl';
|
|
145
|
+
const correlationId = 'random-uuid';
|
|
146
|
+
const roapMessage = 'roap-message';
|
|
147
|
+
const meetingNumber = 'meetingNumber';
|
|
148
|
+
|
|
149
|
+
await meetingsRequest.joinMeeting({
|
|
150
|
+
deviceUrl,
|
|
151
|
+
correlationId,
|
|
152
|
+
roapMessage,
|
|
153
|
+
meetingNumber
|
|
154
|
+
});
|
|
155
|
+
const requestParams = meetingsRequest.request.getCall(0).args[0];
|
|
156
|
+
|
|
157
|
+
assert.equal(requestParams.method, 'POST');
|
|
158
|
+
assert.equal(requestParams.uri, 'locusUrl/loci/call?alternateRedirect=true');
|
|
159
|
+
assert.equal(requestParams.body.invitee.address, 'wbxmn:meetingNumber');
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it('sends /call with inviteeAddress over meetingNumber as preference', async () => {
|
|
163
|
+
const deviceUrl = 'deviceUrl';
|
|
164
|
+
const correlationId = 'random-uuid';
|
|
165
|
+
const roapMessage = 'roap-message';
|
|
166
|
+
const meetingNumber = 'meetingNumber';
|
|
167
|
+
const inviteeAddress = 'sipUrl';
|
|
168
|
+
|
|
169
|
+
await meetingsRequest.joinMeeting({
|
|
170
|
+
deviceUrl,
|
|
171
|
+
correlationId,
|
|
172
|
+
roapMessage,
|
|
173
|
+
meetingNumber,
|
|
174
|
+
inviteeAddress
|
|
175
|
+
});
|
|
176
|
+
const requestParams = meetingsRequest.request.getCall(0).args[0];
|
|
177
|
+
|
|
178
|
+
assert.equal(requestParams.method, 'POST');
|
|
179
|
+
assert.equal(requestParams.uri, 'locusUrl/loci/call?alternateRedirect=true');
|
|
180
|
+
assert.equal(requestParams.body.invitee.address, 'sipUrl');
|
|
181
|
+
});
|
|
130
182
|
});
|
|
131
183
|
|
|
132
184
|
describe('#pstn', () => {
|
|
@@ -4,6 +4,7 @@ import MeetingUtil from '@webex/plugin-meetings/src/meeting/util';
|
|
|
4
4
|
import LoggerProxy from '@webex/plugin-meetings/src/common/logs/logger-proxy';
|
|
5
5
|
import LoggerConfig
|
|
6
6
|
from '@webex/plugin-meetings/src/common/logs/logger-config';
|
|
7
|
+
import Metrics from '@webex/plugin-meetings/src/metrics/index';
|
|
7
8
|
|
|
8
9
|
describe('plugin-meetings', () => {
|
|
9
10
|
describe('Meeting utils function', () => {
|
|
@@ -11,6 +12,7 @@ describe('plugin-meetings', () => {
|
|
|
11
12
|
const meeting = {};
|
|
12
13
|
|
|
13
14
|
beforeEach(() => {
|
|
15
|
+
Metrics.postEvent = sinon.stub();
|
|
14
16
|
const logger = {
|
|
15
17
|
info: sandbox.stub(),
|
|
16
18
|
log: sandbox.stub(),
|
|
@@ -132,6 +134,45 @@ describe('plugin-meetings', () => {
|
|
|
132
134
|
});
|
|
133
135
|
});
|
|
134
136
|
});
|
|
137
|
+
|
|
138
|
+
describe('joinMeeting', () => {
|
|
139
|
+
it('#Should call `meetingRequest.joinMeeting', async () => {
|
|
140
|
+
const meeting = {meetingJoinUrl: 'meetingJoinUrl', locusUrl: 'locusUrl', meetingRequest: {joinMeeting: sinon.stub().returns(Promise.resolve({body: {}, headers: {}}))}};
|
|
141
|
+
|
|
142
|
+
MeetingUtil.parseLocusJoin = sinon.stub();
|
|
143
|
+
await MeetingUtil.joinMeeting(meeting, {});
|
|
144
|
+
|
|
145
|
+
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
146
|
+
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
|
|
147
|
+
|
|
148
|
+
assert.equal(parameter.inviteeAddress, 'meetingJoinUrl');
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
it('#Should fallback sipUrl if meetingJoinUrl does not exists', async () => {
|
|
152
|
+
const meeting = {sipUri: 'sipUri', locusUrl: 'locusUrl', meetingRequest: {joinMeeting: sinon.stub().returns(Promise.resolve({body: {}, headers: {}}))}};
|
|
153
|
+
|
|
154
|
+
MeetingUtil.parseLocusJoin = sinon.stub();
|
|
155
|
+
await MeetingUtil.joinMeeting(meeting, {});
|
|
156
|
+
|
|
157
|
+
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
158
|
+
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
|
|
159
|
+
|
|
160
|
+
assert.equal(parameter.inviteeAddress, 'sipUri');
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
it('#Should fallback to meetingNumber if meetingJoinUrl/sipUrl does not exists', async () => {
|
|
164
|
+
const meeting = {meetingNumber: 'meetingNumber', locusUrl: 'locusUrl', meetingRequest: {joinMeeting: sinon.stub().returns(Promise.resolve({body: {}, headers: {}}))}};
|
|
165
|
+
|
|
166
|
+
MeetingUtil.parseLocusJoin = sinon.stub();
|
|
167
|
+
await MeetingUtil.joinMeeting(meeting, {});
|
|
168
|
+
|
|
169
|
+
assert.calledOnce(meeting.meetingRequest.joinMeeting);
|
|
170
|
+
const parameter = meeting.meetingRequest.joinMeeting.getCall(0).args[0];
|
|
171
|
+
|
|
172
|
+
assert.isUndefined(parameter.inviteeAddress);
|
|
173
|
+
assert.equal(parameter.meetingNumber, 'meetingNumber');
|
|
174
|
+
});
|
|
175
|
+
});
|
|
135
176
|
});
|
|
136
177
|
});
|
|
137
178
|
|
|
@@ -468,7 +468,7 @@ skipInBrowser(describe)('plugin-meetings', () => {
|
|
|
468
468
|
});
|
|
469
469
|
describe('successful MeetingInfo.#fetchMeetingInfo', () => {
|
|
470
470
|
beforeEach(() => {
|
|
471
|
-
webex.meetings.meetingInfo.fetchMeetingInfo = sinon.stub().returns(Promise.resolve(
|
|
471
|
+
webex.meetings.meetingInfo.fetchMeetingInfo = sinon.stub().returns(Promise.resolve({body: {permissionToken: 'PT', meetingJoinUrl: 'meetingJoinUrl'}}));
|
|
472
472
|
});
|
|
473
473
|
it('creates the meeting from a successful meeting info fetch promise testing', async () => {
|
|
474
474
|
const meeting = webex.meetings.createMeeting('test', 'test');
|
|
@@ -482,6 +482,8 @@ skipInBrowser(describe)('plugin-meetings', () => {
|
|
|
482
482
|
assert.calledWith(webex.meetings.meetingInfo.fetchMeetingInfo, 'test');
|
|
483
483
|
assert.calledWith(MeetingsUtil.extractDestination, 'test', 'test');
|
|
484
484
|
assert.calledWith(MeetingsUtil.getMeetingAddedType, 'test');
|
|
485
|
+
assert.equal(meeting.permissionToken, 'PT');
|
|
486
|
+
assert.equal(meeting.meetingJoinUrl, 'meetingJoinUrl');
|
|
485
487
|
});
|
|
486
488
|
|
|
487
489
|
it('creates the meeting from a successful meeting info fetch meeting resolve testing', async () => {
|
|
@@ -90,9 +90,9 @@ browserOnly(describe)('Meeting metrics', () => {
|
|
|
90
90
|
});
|
|
91
91
|
});
|
|
92
92
|
|
|
93
|
-
describe('#
|
|
93
|
+
describe('#sendBehavioralMetric', () => {
|
|
94
94
|
it('sends client metric via Metrics plugin', () => {
|
|
95
|
-
metrics.
|
|
95
|
+
metrics.sendBehavioralMetric('myMetric');
|
|
96
96
|
|
|
97
97
|
assert.calledOnce(mockSubmitMetric);
|
|
98
98
|
});
|
|
@@ -101,13 +101,13 @@ browserOnly(describe)('Meeting metrics', () => {
|
|
|
101
101
|
const data = {value: 567};
|
|
102
102
|
const metadata = {test: true};
|
|
103
103
|
|
|
104
|
-
metrics.
|
|
104
|
+
metrics.sendBehavioralMetric('myMetric', data, metadata);
|
|
105
105
|
|
|
106
106
|
assert.calledWithMatch(
|
|
107
107
|
mockSubmitMetric,
|
|
108
108
|
'myMetric',
|
|
109
109
|
{
|
|
110
|
-
type: ['
|
|
110
|
+
type: ['behavioral'],
|
|
111
111
|
fields: {
|
|
112
112
|
browser_version: getBrowserVersion(),
|
|
113
113
|
os_version: getOSVersion(),
|
|
@@ -127,8 +127,8 @@ browserOnly(describe)('Meeting metrics', () => {
|
|
|
127
127
|
|
|
128
128
|
it('throws error if no metric name is given', () => {
|
|
129
129
|
assert.throws(
|
|
130
|
-
() => metrics.
|
|
131
|
-
'Missing
|
|
130
|
+
() => metrics.sendBehavioralMetric(),
|
|
131
|
+
'Missing behavioral metric name. Please provide one'
|
|
132
132
|
);
|
|
133
133
|
});
|
|
134
134
|
});
|
|
@@ -21,7 +21,7 @@ describe('Peerconnection Manager', () => {
|
|
|
21
21
|
};
|
|
22
22
|
});
|
|
23
23
|
describe('setRemoteSessionDetails', () => {
|
|
24
|
-
it('change the start bitrate on remoteSDP', async () => {
|
|
24
|
+
it('change the start bitrate on remoteSDP and remove extmap', async () => {
|
|
25
25
|
StaticConfig.set({bandwidth: {audio: 50, video: 500, startBitrate: 2000}});
|
|
26
26
|
let result = null;
|
|
27
27
|
const setRemoteDescription = sinon.stub().callsFake((args) => {
|
|
@@ -33,17 +33,18 @@ describe('Peerconnection Manager', () => {
|
|
|
33
33
|
'm=video 5004 UDP/TLS/RTP/SAVPF 102 127 97 99\r\n' +
|
|
34
34
|
'a=fmtp:102 profile-level-id=42e016;packetization-mode=1;max-mbps=244800;max-fs=8160;max-fps=3000;max-dpb=12240;max-rcmd-nalu-size=196608;level-asymmetry-allowed=1\r\n' +
|
|
35
35
|
'a=rtpmap:127 H264/90000\r\n' +
|
|
36
|
+
'a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\n' +
|
|
36
37
|
'a=fmtp:127 profile-level-id=42e016;max-mbps=244800;max-fs=8160;max-fps=3000;max-dpb=12240;max-rcmd-nalu-size=196608;level-asymmetry-allowed=1\r\n';
|
|
37
38
|
|
|
38
39
|
const resultSdp = 'v=0\r\n' +
|
|
39
40
|
'm=video 5004 UDP/TLS/RTP/SAVPF 102 127 97 99\r\n' +
|
|
40
41
|
'a=fmtp:102 profile-level-id=42e016;packetization-mode=1;max-mbps=244800;max-fs=8160;max-fps=3000;max-dpb=12240;max-rcmd-nalu-size=196608;level-asymmetry-allowed=1;x-google-start-bitrate=2000\r\n' +
|
|
41
|
-
'a=rtpmap:127 H264/90000\r\n' +
|
|
42
|
+
'a=rtpmap:127 H264/90000\r\r\n' +
|
|
42
43
|
'a=fmtp:127 profile-level-id=42e016;max-mbps=244800;max-fs=8160;max-fps=3000;max-dpb=12240;max-rcmd-nalu-size=196608;level-asymmetry-allowed=1;x-google-start-bitrate=2000\r\n';
|
|
43
44
|
const peerConnection = {
|
|
44
45
|
signalingState: 'have-local-offer',
|
|
45
|
-
setRemoteDescription
|
|
46
|
-
|
|
46
|
+
setRemoteDescription,
|
|
47
|
+
enableExtmap: false
|
|
47
48
|
};
|
|
48
49
|
|
|
49
50
|
await PeerConnectionManager.setRemoteSessionDetails(peerConnection, 'answer', remoteSdp, {});
|
|
@@ -68,7 +69,6 @@ describe('Peerconnection Manager', () => {
|
|
|
68
69
|
const peerConnection = {
|
|
69
70
|
signalingState: 'have-local-offer',
|
|
70
71
|
setRemoteDescription
|
|
71
|
-
|
|
72
72
|
};
|
|
73
73
|
|
|
74
74
|
await PeerConnectionManager.setRemoteSessionDetails(peerConnection, 'answer', remoteSdp, {});
|