@webex/plugin-meetings 3.0.0-beta.313 → 3.0.0-beta.314

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.
@@ -62,7 +62,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
62
62
  updateCanManageWebcast: function updateCanManageWebcast(canManageWebcast) {
63
63
  this.set('canManageWebcast', canManageWebcast);
64
64
  },
65
- version: "3.0.0-beta.313"
65
+ version: "3.0.0-beta.314"
66
66
  });
67
67
  var _default = Webinar;
68
68
  exports.default = _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webex/plugin-meetings",
3
- "version": "3.0.0-beta.313",
3
+ "version": "3.0.0-beta.314",
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.313",
36
- "@webex/test-helper-chai": "3.0.0-beta.313",
37
- "@webex/test-helper-mocha": "3.0.0-beta.313",
38
- "@webex/test-helper-mock-webex": "3.0.0-beta.313",
39
- "@webex/test-helper-retry": "3.0.0-beta.313",
40
- "@webex/test-helper-test-users": "3.0.0-beta.313",
35
+ "@webex/plugin-meetings": "3.0.0-beta.314",
36
+ "@webex/test-helper-chai": "3.0.0-beta.314",
37
+ "@webex/test-helper-mocha": "3.0.0-beta.314",
38
+ "@webex/test-helper-mock-webex": "3.0.0-beta.314",
39
+ "@webex/test-helper-retry": "3.0.0-beta.314",
40
+ "@webex/test-helper-test-users": "3.0.0-beta.314",
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.313",
49
+ "@webex/common": "3.0.0-beta.314",
50
50
  "@webex/internal-media-core": "2.2.1",
51
- "@webex/internal-plugin-conversation": "3.0.0-beta.313",
52
- "@webex/internal-plugin-device": "3.0.0-beta.313",
53
- "@webex/internal-plugin-llm": "3.0.0-beta.313",
54
- "@webex/internal-plugin-mercury": "3.0.0-beta.313",
55
- "@webex/internal-plugin-metrics": "3.0.0-beta.313",
56
- "@webex/internal-plugin-support": "3.0.0-beta.313",
57
- "@webex/internal-plugin-user": "3.0.0-beta.313",
58
- "@webex/media-helpers": "3.0.0-beta.313",
59
- "@webex/plugin-people": "3.0.0-beta.313",
60
- "@webex/plugin-rooms": "3.0.0-beta.313",
61
- "@webex/webex-core": "3.0.0-beta.313",
51
+ "@webex/internal-plugin-conversation": "3.0.0-beta.314",
52
+ "@webex/internal-plugin-device": "3.0.0-beta.314",
53
+ "@webex/internal-plugin-llm": "3.0.0-beta.314",
54
+ "@webex/internal-plugin-mercury": "3.0.0-beta.314",
55
+ "@webex/internal-plugin-metrics": "3.0.0-beta.314",
56
+ "@webex/internal-plugin-support": "3.0.0-beta.314",
57
+ "@webex/internal-plugin-user": "3.0.0-beta.314",
58
+ "@webex/media-helpers": "3.0.0-beta.314",
59
+ "@webex/plugin-people": "3.0.0-beta.314",
60
+ "@webex/plugin-rooms": "3.0.0-beta.314",
61
+ "@webex/webex-core": "3.0.0-beta.314",
62
62
  "ampersand-collection": "^2.0.2",
63
63
  "bowser": "^2.11.0",
64
64
  "btoa": "^1.2.1",
@@ -5924,9 +5924,17 @@ export default class Meeting extends StatelessWebexPlugin {
5924
5924
  bundlePolicy?: BundlePolicy
5925
5925
  ): Promise<void> {
5926
5926
  this.retriedWithTurnServer = true;
5927
+ const LOG_HEADER = 'Meeting:index#addMedia():retryWithForcedTurnDiscovery -->';
5927
5928
 
5928
5929
  await this.cleanUpBeforeRetryWithTurnServer();
5929
5930
 
5931
+ if (this.state === MEETING_STATE.STATES.LEFT) {
5932
+ LoggerProxy.logger.info(
5933
+ `${LOG_HEADER} meeting state was LEFT after first attempt to establish media connection. Attempting to rejoin. `
5934
+ );
5935
+ await this.join({rejoin: true});
5936
+ }
5937
+
5930
5938
  await this.retryEstablishMediaConnectionWithForcedTurnDiscovery(
5931
5939
  remoteMediaManagerConfig,
5932
5940
  bundlePolicy
@@ -1992,6 +1992,90 @@ describe('plugin-meetings', () => {
1992
1992
  assert.isNotOk(errorThrown);
1993
1993
  });
1994
1994
 
1995
+ it('should call join if state is LEFT after first media connection attempt', async () => {
1996
+ const FAKE_TURN_URL = 'turns:webex.com:3478';
1997
+ const FAKE_TURN_USER = 'some-turn-username';
1998
+ const FAKE_TURN_PASSWORD = 'some-password';
1999
+ let errorThrown = undefined;
2000
+
2001
+ meeting.meetingState = 'ACTIVE';
2002
+ meeting.state = 'LEFT';
2003
+ meeting.roap.doTurnDiscovery = sinon.stub().onFirstCall().returns({
2004
+ turnServerInfo: undefined,
2005
+ turnDiscoverySkippedReason: 'reachability',
2006
+ }).onSecondCall().returns({
2007
+ turnServerInfo: {
2008
+ url: FAKE_TURN_URL,
2009
+ username: FAKE_TURN_USER,
2010
+ password: FAKE_TURN_PASSWORD,
2011
+ },
2012
+ turnDiscoverySkippedReason: undefined,
2013
+ });
2014
+ meeting.mediaProperties.waitForMediaConnectionConnected = sinon.stub().onFirstCall().rejects().onSecondCall().resolves();
2015
+ meeting.join = sinon.stub().resolves();
2016
+
2017
+ const closeMediaConnectionStub = sinon.stub();
2018
+ Media.createMediaConnection = sinon.stub().returns({
2019
+ close: closeMediaConnectionStub,
2020
+ getConnectionState: sinon.stub().returns(ConnectionState.Connected),
2021
+ initiateOffer: sinon.stub().resolves({}),
2022
+ on: sinon.stub(),
2023
+ });
2024
+
2025
+ await meeting
2026
+ .addMedia({
2027
+ mediaSettings: {},
2028
+ })
2029
+ .catch((err) => {
2030
+ errorThrown = err;
2031
+ });
2032
+
2033
+ assert.isNotOk(errorThrown);
2034
+ assert.calledOnceWithExactly(meeting.join, {rejoin: true});
2035
+ });
2036
+
2037
+ it('should reject if join attempt fails if state is LEFT after first media connection attempt', async () => {
2038
+ const FAKE_TURN_URL = 'turns:webex.com:3478';
2039
+ const FAKE_TURN_USER = 'some-turn-username';
2040
+ const FAKE_TURN_PASSWORD = 'some-password';
2041
+ let errorThrown = undefined;
2042
+
2043
+ meeting.meetingState = 'ACTIVE';
2044
+ meeting.state = 'LEFT';
2045
+ meeting.roap.doTurnDiscovery = sinon.stub().onFirstCall().returns({
2046
+ turnServerInfo: undefined,
2047
+ turnDiscoverySkippedReason: 'reachability',
2048
+ }).onSecondCall().returns({
2049
+ turnServerInfo: {
2050
+ url: FAKE_TURN_URL,
2051
+ username: FAKE_TURN_USER,
2052
+ password: FAKE_TURN_PASSWORD,
2053
+ },
2054
+ turnDiscoverySkippedReason: undefined,
2055
+ });
2056
+ meeting.mediaProperties.waitForMediaConnectionConnected = sinon.stub().onFirstCall().rejects().onSecondCall().resolves();
2057
+ meeting.join = sinon.stub().rejects();
2058
+
2059
+ const closeMediaConnectionStub = sinon.stub();
2060
+ Media.createMediaConnection = sinon.stub().returns({
2061
+ close: closeMediaConnectionStub,
2062
+ getConnectionState: sinon.stub().returns(ConnectionState.Connected),
2063
+ initiateOffer: sinon.stub().resolves({}),
2064
+ on: sinon.stub(),
2065
+ });
2066
+
2067
+ await meeting
2068
+ .addMedia({
2069
+ mediaSettings: {},
2070
+ })
2071
+ .catch((err) => {
2072
+ errorThrown = err;
2073
+ });
2074
+
2075
+ assert.isOk(errorThrown);
2076
+ assert.calledOnceWithExactly(meeting.join, {rejoin: true});
2077
+ });
2078
+
1995
2079
  it('should send ADD_MEDIA_SUCCESS metrics', async () => {
1996
2080
  meeting.meetingState = 'ACTIVE';
1997
2081
  meeting.webex.meetings.reachability = {