@webex/plugin-meetings 3.7.0-next.56 → 3.7.0-next.57

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.
@@ -458,7 +458,7 @@ var Webinar = _webexCore.WebexPlugin.extend({
458
458
  }, _callee7);
459
459
  }))();
460
460
  },
461
- version: "3.7.0-next.56"
461
+ version: "3.7.0-next.57"
462
462
  });
463
463
  var _default = exports.default = Webinar;
464
464
  //# 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-meetings": "3.7.0-next.56",
46
+ "@webex/plugin-meetings": "3.7.0-next.57",
47
47
  "@webex/plugin-rooms": "3.7.0-next.22",
48
48
  "@webex/test-helper-chai": "3.7.0-next.16",
49
49
  "@webex/test-helper-mocha": "3.7.0-next.16",
@@ -71,7 +71,7 @@
71
71
  "@webex/internal-plugin-metrics": "3.7.0-next.16",
72
72
  "@webex/internal-plugin-support": "3.7.0-next.23",
73
73
  "@webex/internal-plugin-user": "3.7.0-next.16",
74
- "@webex/internal-plugin-voicea": "3.7.0-next.56",
74
+ "@webex/internal-plugin-voicea": "3.7.0-next.57",
75
75
  "@webex/media-helpers": "3.7.0-next.22",
76
76
  "@webex/plugin-people": "3.7.0-next.20",
77
77
  "@webex/plugin-rooms": "3.7.0-next.22",
@@ -92,5 +92,5 @@
92
92
  "//": [
93
93
  "TODO: upgrade jwt-decode when moving to node 18"
94
94
  ],
95
- "version": "3.7.0-next.56"
95
+ "version": "3.7.0-next.57"
96
96
  }
@@ -6099,9 +6099,12 @@ export default class Meeting extends StatelessWebexPlugin {
6099
6099
  * @returns {undefined}
6100
6100
  */
6101
6101
  public roapMessageReceived = (roapMessage: RoapMessage) => {
6102
- const mediaServer = MeetingsUtil.getMediaServer(roapMessage.sdp);
6102
+ const mediaServer =
6103
+ roapMessage.messageType === 'ANSWER'
6104
+ ? MeetingsUtil.getMediaServer(roapMessage.sdp)
6105
+ : undefined;
6103
6106
 
6104
- if (this.isMultistream && mediaServer !== 'homer') {
6107
+ if (this.isMultistream && mediaServer && mediaServer !== 'homer') {
6105
6108
  throw new MultistreamNotSupportedError(
6106
6109
  `Client asked for multistream backend (Homer), but got ${mediaServer} instead`
6107
6110
  );
@@ -13260,7 +13260,7 @@ describe('plugin-meetings', () => {
13260
13260
 
13261
13261
  describe('#roapMessageReceived', () => {
13262
13262
  it('calls roapMessageReceived on the webrtc media connection', () => {
13263
- const fakeMessage = {messageType: 'fake', sdp: 'fake sdp'};
13263
+ const fakeMessage = {messageType: 'ANSWER', sdp: 'fake sdp'};
13264
13264
 
13265
13265
  const getMediaServer = sinon.stub(MeetingsUtil, 'getMediaServer').returns('homer');
13266
13266
 
@@ -13298,5 +13298,26 @@ describe('plugin-meetings', () => {
13298
13298
 
13299
13299
  assert.notCalled(meeting.mediaProperties.webrtcMediaConnection.roapMessageReceived);
13300
13300
  });
13301
+
13302
+ it('does not call getMediaServer for a roap message other than ANSWER', async () => {
13303
+ const fakeMessage = {messageType: 'ERROR', sdp: 'fake sdp'};
13304
+
13305
+ meeting.isMultistream = true;
13306
+ meeting.mediaProperties.webrtcMediaConnection = {
13307
+ roapMessageReceived: sinon.stub(),
13308
+ };
13309
+ meeting.mediaProperties.webrtcMediaConnection.mediaServer = 'linus';
13310
+
13311
+ const getMediaServerStub = sinon.stub(MeetingsUtil, 'getMediaServer').returns('something');
13312
+
13313
+ meeting.roapMessageReceived(fakeMessage);
13314
+
13315
+ assert.calledOnceWithExactly(
13316
+ meeting.mediaProperties.webrtcMediaConnection.roapMessageReceived,
13317
+ fakeMessage
13318
+ );
13319
+ assert.notCalled(getMediaServerStub);
13320
+ assert.equal(meeting.mediaProperties.webrtcMediaConnection.mediaServer, 'linus'); // check that it hasn't been overwritten
13321
+ });
13301
13322
  });
13302
13323
  });