@webex/plugin-meetings 1.157.0 → 1.157.1

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/README.md CHANGED
@@ -30,8 +30,8 @@ This is a plugin for the Cisco Webex JS SDK . Please see our [developer portal](
30
30
 
31
31
  ## API Docs and Sample App
32
32
  API Docs: https://webex.github.io/webex-js-sdk/api/
33
- Hosted Sample App: https://js.samples.s4d.io/browser-plugin-meetings/
34
- See https://github.com/webex/webex-js-sdk/tree/master/packages/node_modules/samples/browser-plugin-meetings for the sample app code vs the readme
33
+ Hosted Sample App: https://webex.github.io/webex-js-sdk/samples/browser-plugin-meetings/
34
+ See https://github.com/webex/webex-js-sdk/tree/master/docs/samples/browser-plugin-meetings for the sample app code vs the readme
35
35
 
36
36
  #### Device Registration
37
37
 
@@ -1386,7 +1386,7 @@ There are several events submitted by this package that you can subscribe to.
1386
1386
 
1387
1387
  To use `webpack-dev-server` to load this package, run `npm run samples:serve`.
1388
1388
 
1389
- Files placed in the `packages/node_modules/samples/browser-plugin-meetings` folder will be served statically.
1389
+ Files placed in the `docs/samples/browser-plugin-meetings` folder will be served statically.
1390
1390
 
1391
1391
  Files in the `src` folder will be compiled, bundled, and served as a static asset at `bundle.js` inside that directory.
1392
1392
 
package/browsers.js CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  /* eslint camelcase: [0] */
9
9
  module.exports = function createBrowsers() {
10
- if (process.env.SC_TUNNEL_IDENTIFIER || process.env.CI || process.env.CIRCLECI || process.env.SAUCE) {
10
+ if (process.env.SC_TUNNEL_IDENTIFIER || process.env.SAUCE) {
11
11
  return {
12
12
  sl_chrome_latest_macOS_Catalina: {
13
13
  base: 'SauceLabs',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "1.157.0",
3
+ "version": "1.157.1",
4
4
  "description": "",
5
5
  "license": "MIT",
6
6
  "contributors": [
@@ -24,18 +24,18 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@babel/runtime-corejs2": "^7.14.8",
27
- "@webex/webex-core": "1.157.0",
28
- "@webex/internal-plugin-mercury": "1.157.0",
27
+ "@webex/webex-core": "1.157.1",
28
+ "@webex/internal-plugin-mercury": "1.157.1",
29
29
  "webrtc-adapter": "^7.7.0",
30
30
  "lodash": "^4.17.21",
31
31
  "uuid": "^3.3.2",
32
32
  "global": "^4.4.0",
33
33
  "ip-anonymize": "^0.1.0",
34
- "@webex/common": "1.157.0",
34
+ "@webex/common": "1.157.1",
35
35
  "bowser": "^2.11.0",
36
36
  "sdp-transform": "^2.12.0",
37
37
  "readable-stream": "^3.6.0",
38
- "@webex/common-timers": "1.157.0",
38
+ "@webex/common-timers": "1.157.1",
39
39
  "btoa": "^1.2.1",
40
40
  "javascript-state-machine": "^3.1.0",
41
41
  "envify": "^4.1.0"
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import {assert} from '@webex/test-helper-chai';
2
3
  import BrowserDetection from
3
4
  '@webex/plugin-meetings/src/common/browser-detection';
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import sinon from 'sinon';
2
3
  import {cloneDeep} from 'lodash';
3
4
  import {assert} from '@webex/test-helper-chai';
@@ -16,7 +17,6 @@ import {
16
17
 
17
18
  import {self, selfWithInactivity} from './selfConstant';
18
19
 
19
-
20
20
  describe('plugin-meetings', () => {
21
21
  describe('LocusInfo index', () => {
22
22
  const updateMeeting = () => {};
@@ -1,6 +1,7 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
+ import 'jsdom-global/register';
4
5
  import {cloneDeep, isEqual} from 'lodash';
5
6
  import sinon from 'sinon';
6
7
  import StateMachine from 'javascript-state-machine';
@@ -37,7 +38,7 @@ import {
37
38
  EVENT_TRIGGERS,
38
39
  _SIP_URI_
39
40
  } from '@webex/plugin-meetings/src/constants';
40
- import {BEHAVIORAL_METRICS} from '@webex/plugin-meetings/src/metrics/constants';
41
+ import BEHAVIORAL_METRICS from '@webex/plugin-meetings/src/metrics/constants';
41
42
 
42
43
  import {
43
44
  UserNotJoinedError,
@@ -72,6 +73,23 @@ describe('plugin-meetings', () => {
72
73
  };
73
74
 
74
75
  before(() => {
76
+ const MediaStream = {
77
+ getVideoTracks: () => [{
78
+ applyConstraints: () => { }
79
+ }]
80
+ };
81
+
82
+ Object.defineProperty(global.window.navigator, 'mediaDevices', {
83
+ writable: true,
84
+ value: {
85
+ getDisplayMedia: sinon.stub().returns(Promise.resolve(MediaStream))
86
+ }
87
+ });
88
+
89
+ Object.defineProperty(global.window, 'MediaStream', {
90
+ writable: true,
91
+ value: MediaStream
92
+ });
75
93
  LoggerConfig.set({verboseEvents: true, enable: false});
76
94
  LoggerProxy.set(logger);
77
95
  });
@@ -108,6 +126,9 @@ describe('plugin-meetings', () => {
108
126
  metrics: {},
109
127
  stats: {},
110
128
  experimental: {enableUnifiedMeetings: true}
129
+ },
130
+ metrics: {
131
+ type: ['behavioral']
111
132
  }
112
133
  }
113
134
  });
@@ -1,7 +1,7 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
-
4
+ import 'jsdom-global/register';
5
5
  import {assert} from '@webex/test-helper-chai';
6
6
  import sinon from 'sinon';
7
7
  import MockWebex from '@webex/test-helper-mock-webex';
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
4
 
5
+ import 'jsdom-global/register';
5
6
  import sinon from 'sinon';
6
7
  import uuid from 'uuid';
7
8
  import chai from 'chai';
@@ -1,21 +1,15 @@
1
1
  /*!
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
- /* globals window */
4
+ import 'jsdom-global/register';
5
5
  import sinon from 'sinon';
6
6
  import Metrics from '@webex/internal-plugin-metrics';
7
- import metrics from '@webex/plugin-meetings/src/metrics';
8
- import BrowserDetection from '@webex/plugin-meetings/src/common/browser-detection';
9
7
  import MockWebex from '@webex/test-helper-mock-webex';
10
8
  import {browserOnly} from '@webex/test-helper-mocha';
11
9
  import {assert} from '@webex/test-helper-chai';
12
10
 
13
- const {
14
- getBrowserName,
15
- getBrowserVersion,
16
- getOSName,
17
- getOSVersion
18
- } = BrowserDetection();
11
+ import metrics from '@webex/plugin-meetings/src/metrics';
12
+
19
13
 
20
14
  /**
21
15
  * Meeting can only run in a browser, so we can only send metrics for
@@ -48,6 +42,7 @@ browserOnly(describe)('Meeting metrics', () => {
48
42
  clientId: 'mock-client-id'
49
43
  }
50
44
  };
45
+ webex.config.metrics.type = ['behavioral'];
51
46
  webex.internal.metrics.submitClientMetrics = mockSubmitMetric;
52
47
  metrics.initialSetup({}, webex);
53
48
  });
@@ -98,10 +93,10 @@ browserOnly(describe)('Meeting metrics', () => {
98
93
  });
99
94
 
100
95
  it('adds environment information to metric', () => {
101
- const data = {value: 567};
102
- const metadata = {test: true};
96
+ const fields = {value: 567};
97
+ const metricTags = {test: true};
103
98
 
104
- metrics.sendBehavioralMetric('myMetric', data, metadata);
99
+ metrics.sendBehavioralMetric('myMetric', fields, metricTags);
105
100
 
106
101
  assert.calledWithMatch(
107
102
  mockSubmitMetric,
@@ -109,27 +104,13 @@ browserOnly(describe)('Meeting metrics', () => {
109
104
  {
110
105
  type: ['behavioral'],
111
106
  fields: {
112
- browser_version: getBrowserVersion(),
113
- os_version: getOSVersion(),
114
- sdk_version: '1.2.3',
115
107
  value: 567
116
108
  },
117
109
  tags: {
118
- org_id: '7890',
119
- os: getOSName(),
120
- browser: getBrowserName(),
121
- domain: window.location.hostname,
122
110
  test: true
123
111
  }
124
112
  }
125
113
  );
126
114
  });
127
-
128
- it('throws error if no metric name is given', () => {
129
- assert.throws(
130
- () => metrics.sendBehavioralMetric(),
131
- 'Missing behavioral metric name. Please provide one'
132
- );
133
- });
134
115
  });
135
116
  });
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import chai from 'chai';
2
3
  import chaiAsPromised from 'chai-as-promised';
3
4
  import sinon from 'sinon';
@@ -1,4 +1,4 @@
1
-
1
+ import 'jsdom-global/register';
2
2
  import {assert} from '@webex/test-helper-chai';
3
3
  import sinon from 'sinon';
4
4
  import PeerConnectionManager from '@webex/plugin-meetings/src/peer-connection-manager/index';
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) 2015-2020 Cisco Systems, Inc. See LICENSE file.
3
3
  */
4
4
 
5
+ import 'jsdom-global/register';
5
6
  import {assert} from '@webex/test-helper-chai';
6
7
  import sinon from 'sinon';
7
8
  import {
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import chai from 'chai';
2
3
  import chaiAsPromised from 'chai-as-promised';
3
4
  import sinon from 'sinon';
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import {assert} from '@webex/test-helper-chai';
2
3
  import RoapUtil from '@webex/plugin-meetings/src/roap/util';
3
4
  import PeerConnectionManager from '@webex/plugin-meetings/src/peer-connection-manager/index.js';
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import chai from 'chai';
2
3
  import chaiAsPromised from 'chai-as-promised';
3
4
  import sinon from 'sinon';
@@ -1,3 +1,4 @@
1
+ import 'jsdom-global/register';
1
2
  import {assert} from '@webex/test-helper-chai';
2
3
  import sinon from 'sinon';
3
4
  import Transcription from '@webex/plugin-meetings/src/transcription';