@webex/plugin-meetings 3.0.0-beta.210 → 3.0.0-beta.211

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "3.0.0-beta.210",
3
+ "version": "3.0.0-beta.211",
4
4
  "description": "",
5
5
  "license": "Cisco EULA (https://www.cisco.com/c/en/us/products/end-user-license-agreement.html)",
6
6
  "contributors": [
@@ -32,12 +32,12 @@
32
32
  "build": "yarn run -T tsc --declaration true --declarationDir ./dist/types"
33
33
  },
34
34
  "devDependencies": {
35
- "@webex/plugin-meetings": "3.0.0-beta.210",
36
- "@webex/test-helper-chai": "3.0.0-beta.210",
37
- "@webex/test-helper-mocha": "3.0.0-beta.210",
38
- "@webex/test-helper-mock-webex": "3.0.0-beta.210",
39
- "@webex/test-helper-retry": "3.0.0-beta.210",
40
- "@webex/test-helper-test-users": "3.0.0-beta.210",
35
+ "@webex/plugin-meetings": "3.0.0-beta.211",
36
+ "@webex/test-helper-chai": "3.0.0-beta.211",
37
+ "@webex/test-helper-mocha": "3.0.0-beta.211",
38
+ "@webex/test-helper-mock-webex": "3.0.0-beta.211",
39
+ "@webex/test-helper-retry": "3.0.0-beta.211",
40
+ "@webex/test-helper-test-users": "3.0.0-beta.211",
41
41
  "chai": "^4.3.4",
42
42
  "chai-as-promised": "^7.1.1",
43
43
  "jsdom-global": "3.0.2",
@@ -46,19 +46,19 @@
46
46
  "typescript": "^4.7.4"
47
47
  },
48
48
  "dependencies": {
49
- "@webex/common": "3.0.0-beta.210",
49
+ "@webex/common": "3.0.0-beta.211",
50
50
  "@webex/internal-media-core": "1.39.1",
51
- "@webex/internal-plugin-conversation": "3.0.0-beta.210",
52
- "@webex/internal-plugin-device": "3.0.0-beta.210",
53
- "@webex/internal-plugin-llm": "3.0.0-beta.210",
54
- "@webex/internal-plugin-mercury": "3.0.0-beta.210",
55
- "@webex/internal-plugin-metrics": "3.0.0-beta.210",
56
- "@webex/internal-plugin-support": "3.0.0-beta.210",
57
- "@webex/internal-plugin-user": "3.0.0-beta.210",
58
- "@webex/media-helpers": "3.0.0-beta.210",
59
- "@webex/plugin-people": "3.0.0-beta.210",
60
- "@webex/plugin-rooms": "3.0.0-beta.210",
61
- "@webex/webex-core": "3.0.0-beta.210",
51
+ "@webex/internal-plugin-conversation": "3.0.0-beta.211",
52
+ "@webex/internal-plugin-device": "3.0.0-beta.211",
53
+ "@webex/internal-plugin-llm": "3.0.0-beta.211",
54
+ "@webex/internal-plugin-mercury": "3.0.0-beta.211",
55
+ "@webex/internal-plugin-metrics": "3.0.0-beta.211",
56
+ "@webex/internal-plugin-support": "3.0.0-beta.211",
57
+ "@webex/internal-plugin-user": "3.0.0-beta.211",
58
+ "@webex/media-helpers": "3.0.0-beta.211",
59
+ "@webex/plugin-people": "3.0.0-beta.211",
60
+ "@webex/plugin-rooms": "3.0.0-beta.211",
61
+ "@webex/webex-core": "3.0.0-beta.211",
62
62
  "ampersand-collection": "^2.0.2",
63
63
  "bowser": "^2.11.0",
64
64
  "btoa": "^1.2.1",
@@ -5915,20 +5915,25 @@ export default class Meeting extends StatelessWebexPlugin {
5915
5915
  /// @ts-ignore
5916
5916
  this.webex.internal.newMetrics.submitInternalEvent({name: 'internal.reset.join.latencies'});
5917
5917
 
5918
- // @ts-ignore
5919
- this.webex.internal.newMetrics.submitClientEvent({
5920
- name: 'client.call.leave',
5921
- payload: {
5922
- trigger: 'user-interaction',
5923
- canProceed: false,
5924
- leaveReason,
5925
- },
5926
- options: {meetingId: this.id},
5927
- });
5918
+ const submitLeaveMetric = (payload = {}) =>
5919
+ // @ts-ignore
5920
+ this.webex.internal.newMetrics.submitClientEvent({
5921
+ name: 'client.call.leave',
5922
+ payload: {
5923
+ trigger: 'user-interaction',
5924
+ canProceed: false,
5925
+ leaveReason,
5926
+ ...payload,
5927
+ },
5928
+ options: {meetingId: this.id},
5929
+ });
5928
5930
  LoggerProxy.logger.log('Meeting:index#leave --> Leaving a meeting');
5929
5931
 
5930
5932
  return MeetingUtil.leaveMeeting(this, options)
5931
5933
  .then((leave) => {
5934
+ // CA team recommends submitting this *after* locus /leave
5935
+ submitLeaveMetric();
5936
+
5932
5937
  this.meetingFiniteStateMachine.leave();
5933
5938
  this.clearMeetingData();
5934
5939
 
@@ -5964,6 +5969,20 @@ export default class Meeting extends StatelessWebexPlugin {
5964
5969
  return leave;
5965
5970
  })
5966
5971
  .catch((error) => {
5972
+ // CA team recommends submitting this *after* locus /leave
5973
+ submitLeaveMetric({
5974
+ errors: [
5975
+ {
5976
+ fatal: false,
5977
+ errorDescription: error.message,
5978
+ category: 'signaling',
5979
+ errorCode: 1000,
5980
+ name: 'client.leave',
5981
+ shownToUser: false,
5982
+ },
5983
+ ],
5984
+ });
5985
+
5967
5986
  this.meetingFiniteStateMachine.fail(error);
5968
5987
  LoggerProxy.logger.error('Meeting:index#leave --> Failed to leave ', error);
5969
5988
  // upload logs on leave irrespective of meeting delete
@@ -1779,7 +1779,12 @@ describe('plugin-meetings', () => {
1779
1779
  method: 'PUT',
1780
1780
  uri: `${meeting.selfUrl}/media`,
1781
1781
  body: {
1782
- device: {url: meeting.deviceUrl, deviceType: meeting.config.deviceType, regionCode: 'EU', countryCode: 'UK'},
1782
+ device: {
1783
+ url: meeting.deviceUrl,
1784
+ deviceType: meeting.config.deviceType,
1785
+ regionCode: 'EU',
1786
+ countryCode: 'UK',
1787
+ },
1783
1788
  correlationId: meeting.correlationId,
1784
1789
  localMedias: [
1785
1790
  {
@@ -1800,7 +1805,12 @@ describe('plugin-meetings', () => {
1800
1805
  method: 'PUT',
1801
1806
  uri: `${meeting.selfUrl}/media`,
1802
1807
  body: {
1803
- device: {url: meeting.deviceUrl, deviceType: meeting.config.deviceType, regionCode: 'EU', countryCode: 'UK'},
1808
+ device: {
1809
+ url: meeting.deviceUrl,
1810
+ deviceType: meeting.config.deviceType,
1811
+ regionCode: 'EU',
1812
+ countryCode: 'UK',
1813
+ },
1804
1814
  correlationId: meeting.correlationId,
1805
1815
  localMedias: [
1806
1816
  {
@@ -2342,6 +2352,7 @@ describe('plugin-meetings', () => {
2342
2352
  assert.calledOnce(meeting.meetingRequest.declineMeeting);
2343
2353
  });
2344
2354
  });
2355
+
2345
2356
  describe('#leave', () => {
2346
2357
  let sandbox;
2347
2358
 
@@ -2474,6 +2485,62 @@ describe('plugin-meetings', () => {
2474
2485
  reason: MEETING_REMOVED_REASON.CLIENT_LEAVE_REQUEST,
2475
2486
  });
2476
2487
  });
2488
+
2489
+ it('should send client.call.leave after meetingRequest.leaveMeeting', async () => {
2490
+ const leave = meeting.leave();
2491
+
2492
+ await leave;
2493
+
2494
+ assert.calledOnceWithExactly(webex.internal.newMetrics.submitClientEvent, {
2495
+ name: 'client.call.leave',
2496
+ payload: {
2497
+ trigger: 'user-interaction',
2498
+ canProceed: false,
2499
+ leaveReason: 'CLIENT_LEAVE_REQUEST',
2500
+ },
2501
+ options: {meetingId: meeting.id},
2502
+ });
2503
+
2504
+ assert(
2505
+ webex.internal.newMetrics.submitClientEvent.calledAfter(
2506
+ meeting.meetingRequest.leaveMeeting
2507
+ )
2508
+ );
2509
+ });
2510
+
2511
+ it('should send client.call.leave after meetingRequest.leaveMeeting when erroring', async () => {
2512
+ meeting.meetingRequest.leaveMeeting = sinon
2513
+ .stub()
2514
+ .returns(Promise.reject(new Error('forced')));
2515
+
2516
+ await assert.isRejected(meeting.leave());
2517
+
2518
+ assert.calledOnceWithExactly(webex.internal.newMetrics.submitClientEvent, {
2519
+ name: 'client.call.leave',
2520
+ payload: {
2521
+ trigger: 'user-interaction',
2522
+ canProceed: false,
2523
+ leaveReason: 'CLIENT_LEAVE_REQUEST',
2524
+ errors: [
2525
+ {
2526
+ fatal: false,
2527
+ errorDescription: 'forced',
2528
+ category: 'signaling',
2529
+ errorCode: 1000,
2530
+ name: 'client.leave',
2531
+ shownToUser: false,
2532
+ },
2533
+ ],
2534
+ },
2535
+ options: {meetingId: meeting.id},
2536
+ });
2537
+
2538
+ assert(
2539
+ webex.internal.newMetrics.submitClientEvent.calledAfter(
2540
+ meeting.meetingRequest.leaveMeeting
2541
+ )
2542
+ );
2543
+ });
2477
2544
  });
2478
2545
  describe('#requestScreenShareFloor', () => {
2479
2546
  it('should have #requestScreenShareFloor', () => {
@@ -5253,16 +5320,16 @@ describe('plugin-meetings', () => {
5253
5320
 
5254
5321
  assert.calledThrice(TriggerProxy.trigger);
5255
5322
  assert.calledWith(
5256
- TriggerProxy.trigger,
5257
- sinon.match.instanceOf(Meeting),
5258
- {
5259
- file: 'meeting/index',
5260
- function: 'setUpLocusSelfListener',
5261
- },
5262
- EVENT_TRIGGERS.MEETING_LOCUS_URL_UPDATE,
5263
- {'locusUrl': 'newLocusUrl/12345'}
5323
+ TriggerProxy.trigger,
5324
+ sinon.match.instanceOf(Meeting),
5325
+ {
5326
+ file: 'meeting/index',
5327
+ function: 'setUpLocusSelfListener',
5328
+ },
5329
+ EVENT_TRIGGERS.MEETING_LOCUS_URL_UPDATE,
5330
+ {locusUrl: 'newLocusUrl/12345'}
5264
5331
  );
5265
-
5332
+
5266
5333
  done();
5267
5334
  });
5268
5335
  });
@@ -6062,9 +6129,9 @@ describe('plugin-meetings', () => {
6062
6129
  meeting.userDisplayHints = requiredDisplayHints;
6063
6130
  meeting.selfUserPolicies = undefined;
6064
6131
 
6065
- if (requiredPolicies) {
6066
- meeting.selfUserPolicies = {};
6067
- }
6132
+ if (requiredPolicies) {
6133
+ meeting.selfUserPolicies = {};
6134
+ }
6068
6135
  meeting.meetingInfo = isUndefined(meetingInfo) ? {some: 'info'} : meetingInfo;
6069
6136
 
6070
6137
  meeting.updateMeetingActions();
@@ -6074,7 +6141,6 @@ describe('plugin-meetings', () => {
6074
6141
  }
6075
6142
  );
6076
6143
 
6077
-
6078
6144
  forEach(
6079
6145
  [
6080
6146
  {