@webex/calling 3.3.1-next.21 → 3.3.1-next.23

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.
@@ -10,7 +10,7 @@ var _keys = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/objec
10
10
  var _promise = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/promise"));
11
11
  var _stringify = _interopRequireDefault(require("@babel/runtime-corejs2/core-js/json/stringify"));
12
12
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime-corejs2/helpers/asyncToGenerator"));
13
- var MediaSDK = _interopRequireWildcard(require("@webex/internal-media-core"));
13
+ var InternalMediaCoreModule = _interopRequireWildcard(require("@webex/internal-media-core"));
14
14
  var _webMediaEffects = require("@webex/web-media-effects");
15
15
  var _types = require("../../Errors/types");
16
16
  var _Utils = _interopRequireWildcard(require("../../common/Utils"));
@@ -33,7 +33,7 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
33
33
 
34
34
  jest.mock('@webex/internal-media-core');
35
35
  var webex = (0, _testUtil.getTestUtilsWebex)();
36
- var mockMediaSDK = MediaSDK;
36
+ var mockInternalMediaCoreModule = InternalMediaCoreModule;
37
37
  var defaultServiceIndicator = _types3.ServiceIndicator.CALLING;
38
38
  var activeUrl = 'FakeActiveUrl';
39
39
  var mockLineId = 'e4e8ee2a-a154-4e52-8f11-ef4cde2dce72';
@@ -348,7 +348,7 @@ describe('Call Tests', function () {
348
348
  bnrMetricSpy = jest.spyOn(call['metricManager'], 'submitBNRMetric');
349
349
  call.dial(localAudioStream);
350
350
  expect(mockTrack.enabled).toEqual(true);
351
- expect(mockMediaSDK.RoapMediaConnection).toBeCalledOnceWith(roapMediaConnectionConfig, roapMediaConnectionOptions, expect.any(String));
351
+ expect(mockInternalMediaCoreModule.RoapMediaConnection).toBeCalledOnceWith(roapMediaConnectionConfig, roapMediaConnectionOptions, expect.any(String));
352
352
  expect(call['mediaStateMachine'].state.value).toBe('S_SEND_ROAP_OFFER');
353
353
  expect(bnrMetricSpy).toBeCalledOnceWith(_types4.METRIC_EVENT.BNR_ENABLED, _types4.METRIC_TYPE.BEHAVIORAL, call.getCallId(), call.getCorrelationId());
354
354
 
@@ -387,7 +387,7 @@ describe('Call Tests', function () {
387
387
  bnrMetricSpy = jest.spyOn(call['metricManager'], 'submitBNRMetric');
388
388
  call.answer(localAudioStream);
389
389
  expect(mockTrack.enabled).toEqual(true);
390
- expect(mockMediaSDK.RoapMediaConnection).toBeCalledOnceWith(roapMediaConnectionConfig, roapMediaConnectionOptions, expect.any(String));
390
+ expect(mockInternalMediaCoreModule.RoapMediaConnection).toBeCalledOnceWith(roapMediaConnectionConfig, roapMediaConnectionOptions, expect.any(String));
391
391
  expect(call['callStateMachine'].state.value).toBe('S_IDLE');
392
392
  expect(warnSpy).toBeCalledOnceWith("Call cannot be answered because the state is : S_IDLE", {
393
393
  file: 'call',
@@ -426,7 +426,7 @@ describe('Call Tests', function () {
426
426
  call = (0, _call.createCall)(activeUrl, webex, dest, _types3.CallDirection.OUTBOUND, deviceId, mockLineId, deleteCallFromCollection, defaultServiceIndicator);
427
427
  call.dial(localAudioStream);
428
428
  expect(mockTrack.enabled).toEqual(true);
429
- expect(mockMediaSDK.RoapMediaConnection).toBeCalledOnceWith(roapMediaConnectionConfig, roapMediaConnectionOptions, expect.any(String));
429
+ expect(mockInternalMediaCoreModule.RoapMediaConnection).toBeCalledOnceWith(roapMediaConnectionConfig, roapMediaConnectionOptions, expect.any(String));
430
430
  expect(call['mediaStateMachine'].state.value).toBe('S_SEND_ROAP_OFFER');
431
431
  updateLocalTracksSpy = jest.spyOn(call['mediaConnection'], 'updateLocalTracks');
432
432
  bnrMetricSpy = jest.spyOn(call['metricManager'], 'submitBNRMetric');
@@ -435,8 +435,8 @@ describe('Call Tests', function () {
435
435
 
436
436
  /* Checking if listeners on the localAudioStream have been registered */
437
437
  expect(onStreamSpy).toBeCalledTimes(2);
438
- expect(onStreamSpy).toBeCalledWith(MediaSDK.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
439
- expect(onStreamSpy).toBeCalledWith(MediaSDK.LocalStreamEventNames.EffectAdded, expect.any(Function));
438
+ expect(onStreamSpy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
439
+ expect(onStreamSpy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
440
440
  bnrMetricSpy.mockClear();
441
441
  /* Invoking the callback function to trigger EffectAdded event to simulate adding effect to the stream */
442
442
  onStreamSpy.mock.calls[1][1](mockEffect);
@@ -469,8 +469,8 @@ describe('Call Tests', function () {
469
469
  case 35:
470
470
  /* Checks for switching off the listeners on call disconnect */
471
471
  expect(offStreamSpy).toBeCalledTimes(2);
472
- expect(offStreamSpy).toBeCalledWith(MediaSDK.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
473
- expect(offStreamSpy).toBeCalledWith(MediaSDK.LocalStreamEventNames.EffectAdded, expect.any(Function));
472
+ expect(offStreamSpy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
473
+ expect(offStreamSpy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
474
474
  expect(offEffectSpy).toBeCalledWith(_webMediaEffects.EffectEvent.Enabled, expect.any(Function));
475
475
  expect(offEffectSpy).toBeCalledWith(_webMediaEffects.EffectEvent.Disabled, expect.any(Function));
476
476
  case 40:
@@ -574,8 +574,8 @@ describe('Call Tests', function () {
574
574
  call.dial(localAudioStream);
575
575
  expect(mockTrack.enabled).toEqual(true);
576
576
  expect(onStream1Spy).toBeCalledTimes(2);
577
- expect(onStream1Spy).toBeCalledWith(MediaSDK.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
578
- expect(onStream1Spy).toBeCalledWith(MediaSDK.LocalStreamEventNames.EffectAdded, expect.any(Function));
577
+ expect(onStream1Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
578
+ expect(onStream1Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
579
579
  var mockTrack2 = {
580
580
  enabled: true
581
581
  };
@@ -593,9 +593,9 @@ describe('Call Tests', function () {
593
593
  audio: mockTrack2
594
594
  });
595
595
  expect(call['localAudioStream']).toEqual(localAudioStream2);
596
- expect(offStream1Spy).toBeCalledWith(MediaSDK.LocalStreamEventNames.EffectAdded, expect.any(Function));
597
- expect(onStream2Spy).toBeCalledWith(MediaSDK.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
598
- expect(onStream2Spy).toBeCalledWith(MediaSDK.LocalStreamEventNames.EffectAdded, expect.any(Function));
596
+ expect(offStream1Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
597
+ expect(onStream2Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.OutputTrackChange, expect.any(Function));
598
+ expect(onStream2Spy).toBeCalledWith(InternalMediaCoreModule.LocalStreamEventNames.EffectAdded, expect.any(Function));
599
599
  });
600
600
  it('update media with invalid stream', function () {
601
601
  var callManager = (0, _callManager.getCallManager)(webex, defaultServiceIndicator);