@webex/calling 3.0.0-next.20 → 3.0.0-next.21
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/CallingClient/calling/call.js +20 -2
- package/dist/CallingClient/calling/call.js.map +1 -1
- package/dist/CallingClient/calling/call.test.js +54 -1
- package/dist/CallingClient/calling/call.test.js.map +1 -1
- package/dist/CallingClient/calling/types.js.map +1 -1
- package/dist/module/CallingClient/calling/call.js +14 -1
- package/dist/types/CallingClient/calling/call.d.ts +1 -0
- package/dist/types/CallingClient/calling/call.d.ts.map +1 -1
- package/dist/types/CallingClient/calling/types.d.ts +1 -0
- package/dist/types/CallingClient/calling/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -427,7 +427,7 @@ describe('Call Tests', function () {
|
|
|
427
427
|
return (0, Utils.waitForMsecs)(50);
|
|
428
428
|
case 7:
|
|
429
429
|
expect(warnSpy).toBeCalledTimes(1);
|
|
430
|
-
expect(warnSpy).toBeCalledWith("Did not find a local track while
|
|
430
|
+
expect(warnSpy).toBeCalledWith("Did not find a local track while dialing the call ".concat(call.getCorrelationId()), {
|
|
431
431
|
file: 'call',
|
|
432
432
|
method: 'dial'
|
|
433
433
|
});
|
|
@@ -440,6 +440,59 @@ describe('Call Tests', function () {
|
|
|
440
440
|
}
|
|
441
441
|
}, _callee9);
|
|
442
442
|
})));
|
|
443
|
+
it('update media after call creation with valid stream', function () {
|
|
444
|
+
var callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
|
|
445
|
+
var mockStream = {
|
|
446
|
+
outputStream: {
|
|
447
|
+
getAudioTracks: jest.fn().mockReturnValue([mockTrack])
|
|
448
|
+
},
|
|
449
|
+
on: jest.fn()
|
|
450
|
+
};
|
|
451
|
+
var localAudioStream = mockStream;
|
|
452
|
+
var call = callManager.createCall(dest, _types3.CallDirection.OUTBOUND, deviceId, mockLineId);
|
|
453
|
+
call.dial(localAudioStream);
|
|
454
|
+
expect(mockTrack.enabled).toEqual(true);
|
|
455
|
+
var mockTrack2 = {
|
|
456
|
+
enabled: true
|
|
457
|
+
};
|
|
458
|
+
var mockStream2 = {
|
|
459
|
+
outputStream: {
|
|
460
|
+
getAudioTracks: jest.fn().mockReturnValue([mockTrack2])
|
|
461
|
+
},
|
|
462
|
+
on: jest.fn()
|
|
463
|
+
};
|
|
464
|
+
var localAudioStream2 = mockStream2;
|
|
465
|
+
call.updateMedia(localAudioStream2);
|
|
466
|
+
expect(call['mediaConnection'].updateLocalTracks).toBeCalledOnceWith({
|
|
467
|
+
audio: mockTrack2
|
|
468
|
+
});
|
|
469
|
+
});
|
|
470
|
+
it('update media with invalid stream', function () {
|
|
471
|
+
var callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);
|
|
472
|
+
var warnSpy = jest.spyOn(_Logger.default, 'warn');
|
|
473
|
+
var mockStream = {
|
|
474
|
+
outputStream: {
|
|
475
|
+
getAudioTracks: jest.fn().mockReturnValue([mockTrack])
|
|
476
|
+
},
|
|
477
|
+
on: jest.fn()
|
|
478
|
+
};
|
|
479
|
+
var localAudioStream = mockStream;
|
|
480
|
+
var call = callManager.createCall(dest, _types3.CallDirection.OUTBOUND, deviceId, mockLineId);
|
|
481
|
+
call.dial(localAudioStream);
|
|
482
|
+
expect(mockTrack.enabled).toEqual(true);
|
|
483
|
+
var errorStream = {
|
|
484
|
+
outputStream: {
|
|
485
|
+
getAudioTracks: jest.fn().mockReturnValue([])
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
var localAudioStream2 = errorStream;
|
|
489
|
+
call.updateMedia(localAudioStream2);
|
|
490
|
+
expect(call['mediaConnection'].updateLocalTracks).not.toBeCalled();
|
|
491
|
+
expect(warnSpy).toBeCalledOnceWith("Did not find a local track while updating media for call ".concat(call.getCorrelationId(), ". Will not update media"), {
|
|
492
|
+
file: 'call',
|
|
493
|
+
method: 'updateMedia'
|
|
494
|
+
});
|
|
495
|
+
});
|
|
443
496
|
});
|
|
444
497
|
describe('State Machine handler tests', function () {
|
|
445
498
|
var deviceId = '55dfb53f-bed2-36da-8e85-cee7f02aa68e';
|