@webex/plugin-meetings 3.10.0-next.16 → 3.10.0-next.17

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.
@@ -448,7 +448,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
448
448
  }, _callee7);
449
449
  }))();
450
450
  },
451
- version: "3.10.0-next.16"
451
+ version: "3.10.0-next.17"
452
452
  });
453
453
  var _default = exports.default = Webinar;
454
454
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -43,7 +43,7 @@
43
43
  "@webex/eslint-config-legacy": "0.0.0",
44
44
  "@webex/jest-config-legacy": "0.0.0",
45
45
  "@webex/legacy-tools": "0.0.0",
46
- "@webex/plugin-rooms": "3.10.0-next.7",
46
+ "@webex/plugin-rooms": "3.10.0-next.8",
47
47
  "@webex/test-helper-chai": "3.10.0-next.1",
48
48
  "@webex/test-helper-mocha": "3.10.0-next.1",
49
49
  "@webex/test-helper-mock-webex": "3.10.0-next.1",
@@ -63,20 +63,20 @@
63
63
  "@webex/common": "3.10.0-next.1",
64
64
  "@webex/event-dictionary-ts": "^1.0.1930",
65
65
  "@webex/internal-media-core": "2.20.3",
66
- "@webex/internal-plugin-conversation": "3.10.0-next.7",
67
- "@webex/internal-plugin-device": "3.10.0-next.7",
68
- "@webex/internal-plugin-llm": "3.10.0-next.7",
69
- "@webex/internal-plugin-mercury": "3.10.0-next.7",
70
- "@webex/internal-plugin-metrics": "3.10.0-next.7",
71
- "@webex/internal-plugin-support": "3.10.0-next.7",
72
- "@webex/internal-plugin-user": "3.10.0-next.7",
73
- "@webex/internal-plugin-voicea": "3.10.0-next.9",
66
+ "@webex/internal-plugin-conversation": "3.10.0-next.8",
67
+ "@webex/internal-plugin-device": "3.10.0-next.8",
68
+ "@webex/internal-plugin-llm": "3.10.0-next.8",
69
+ "@webex/internal-plugin-mercury": "3.10.0-next.8",
70
+ "@webex/internal-plugin-metrics": "3.10.0-next.8",
71
+ "@webex/internal-plugin-support": "3.10.0-next.8",
72
+ "@webex/internal-plugin-user": "3.10.0-next.8",
73
+ "@webex/internal-plugin-voicea": "3.10.0-next.10",
74
74
  "@webex/media-helpers": "3.10.0-next.3",
75
- "@webex/plugin-people": "3.10.0-next.7",
76
- "@webex/plugin-rooms": "3.10.0-next.7",
75
+ "@webex/plugin-people": "3.10.0-next.8",
76
+ "@webex/plugin-rooms": "3.10.0-next.8",
77
77
  "@webex/ts-sdp": "^1.8.1",
78
78
  "@webex/web-capabilities": "^1.7.1",
79
- "@webex/webex-core": "3.10.0-next.7",
79
+ "@webex/webex-core": "3.10.0-next.8",
80
80
  "ampersand-collection": "^2.0.2",
81
81
  "bowser": "^2.11.0",
82
82
  "btoa": "^1.2.1",
@@ -93,5 +93,5 @@
93
93
  "//": [
94
94
  "TODO: upgrade jwt-decode when moving to node 18"
95
95
  ],
96
- "version": "3.10.0-next.16"
96
+ "version": "3.10.0-next.17"
97
97
  }
@@ -1,5 +1,5 @@
1
1
  import uuid from 'uuid';
2
- import {cloneDeep, isEqual, isEmpty} from 'lodash';
2
+ import {cloneDeep, isEqual, isEmpty, merge} from 'lodash';
3
3
  import jwtDecode from 'jwt-decode';
4
4
  // @ts-ignore - Fix this
5
5
  import {StatelessWebexPlugin} from '@webex/webex-core';
@@ -50,6 +50,11 @@ import {
50
50
  type MeetingTranscriptPayload,
51
51
  } from '@webex/internal-plugin-voicea';
52
52
 
53
+ import {
54
+ getBrowserMediaErrorCode,
55
+ isBrowserMediaError,
56
+ isBrowserMediaErrorName,
57
+ } from '@webex/internal-plugin-metrics/src/call-diagnostic/call-diagnostic-metrics.util';
53
58
  import {processNewCaptions} from './voicea-meeting';
54
59
 
55
60
  import {
@@ -5440,6 +5445,20 @@ export default class Meeting extends StatelessWebexPlugin {
5440
5445
  shouldRetry = false;
5441
5446
  }
5442
5447
 
5448
+ if (CallDiagnosticUtils.isBrowserMediaError(error)) {
5449
+ shouldRetry = false;
5450
+ // eslint-disable-next-line no-ex-assign
5451
+ error = merge({
5452
+ error: {
5453
+ body: {
5454
+ errorCode: CallDiagnosticUtils.getBrowserMediaErrorCode(error),
5455
+ message: error?.message,
5456
+ name: error?.name,
5457
+ },
5458
+ },
5459
+ });
5460
+ }
5461
+
5443
5462
  // we only want to call leave if join was successful and this was a retry or we won't be doing any more retries
5444
5463
  if (joined && (isRetry || !shouldRetry)) {
5445
5464
  try {
@@ -1003,6 +1003,35 @@ describe('plugin-meetings', () => {
1003
1003
  );
1004
1004
  });
1005
1005
 
1006
+ it('should call leave() if addMediaInternal() fails ', async () => {
1007
+ const addMediaError = new Error('fake addMedia error');
1008
+ addMediaError.name = 'TypeError';
1009
+
1010
+ const rejectError = {
1011
+ error: {
1012
+ body: {
1013
+ errorCode: 2729,
1014
+ message: 'fake addMedia error',
1015
+ name: 'TypeError'
1016
+ }
1017
+ }
1018
+ };
1019
+ meeting.addMediaInternal.rejects(addMediaError);
1020
+ sinon.stub(meeting, 'leave').resolves();
1021
+
1022
+ await assert.isRejected(
1023
+ meeting.joinWithMedia({
1024
+ joinOptions,
1025
+ mediaOptions,
1026
+ }),
1027
+ rejectError
1028
+ );
1029
+
1030
+ assert.calledOnce(meeting.join);
1031
+ assert.calledOnce(meeting.addMediaInternal);
1032
+ assert.calledOnce(Metrics.sendBehavioralMetric);
1033
+ });
1034
+
1006
1035
  it('should not call leave() if addMediaInternal() fails the first time and succeeds the second time and should only call join() once', async () => {
1007
1036
  const addMediaError = new Error('fake addMedia error');
1008
1037
  const leaveStub = sinon.stub(meeting, 'leave');