@webex/plugin-meetings 3.4.0-next.15 → 3.4.0-next.16

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.
@@ -1295,6 +1295,8 @@ export default class Meeting extends StatelessWebexPlugin {
1295
1295
  *
1296
1296
  * @private
1297
1297
  * @static
1298
+ * @param {boolean} isAudioEnabled
1299
+ * @param {boolean} isVideoEnabled
1298
1300
  * @returns {Promise<void>}
1299
1301
  */
1300
1302
  private static handleDeviceLogging;
@@ -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.4.0-next.15"
65
+ version: "3.4.0-next.16"
66
66
  });
67
67
  var _default = exports.default = Webinar;
68
68
  //# 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.4.0-next.15",
46
+ "@webex/plugin-meetings": "3.4.0-next.16",
47
47
  "@webex/plugin-rooms": "3.4.0-next.6",
48
48
  "@webex/test-helper-chai": "3.4.0-next.6",
49
49
  "@webex/test-helper-mocha": "3.4.0-next.6",
@@ -70,7 +70,7 @@
70
70
  "@webex/internal-plugin-metrics": "3.4.0-next.6",
71
71
  "@webex/internal-plugin-support": "3.4.0-next.6",
72
72
  "@webex/internal-plugin-user": "3.4.0-next.6",
73
- "@webex/internal-plugin-voicea": "3.4.0-next.15",
73
+ "@webex/internal-plugin-voicea": "3.4.0-next.16",
74
74
  "@webex/media-helpers": "3.4.0-next.9",
75
75
  "@webex/plugin-people": "3.4.0-next.6",
76
76
  "@webex/plugin-rooms": "3.4.0-next.6",
@@ -91,5 +91,5 @@
91
91
  "//": [
92
92
  "TODO: upgrade jwt-decode when moving to node 18"
93
93
  ],
94
- "version": "3.4.0-next.15"
94
+ "version": "3.4.0-next.16"
95
95
  }
@@ -6521,12 +6521,21 @@ export default class Meeting extends StatelessWebexPlugin {
6521
6521
  *
6522
6522
  * @private
6523
6523
  * @static
6524
+ * @param {boolean} isAudioEnabled
6525
+ * @param {boolean} isVideoEnabled
6524
6526
  * @returns {Promise<void>}
6525
6527
  */
6526
- private static async handleDeviceLogging(): Promise<void> {
6527
- try {
6528
- const devices = await getDevices();
6529
6528
 
6529
+ private static async handleDeviceLogging(isAudioEnabled, isVideoEnabled): Promise<void> {
6530
+ try {
6531
+ let devices = [];
6532
+ if (isVideoEnabled && isAudioEnabled) {
6533
+ devices = await getDevices();
6534
+ } else if (isVideoEnabled) {
6535
+ devices = await getDevices(Media.DeviceKind.VIDEO_INPUT);
6536
+ } else if (isAudioEnabled) {
6537
+ devices = await getDevices(Media.DeviceKind.AUDIO_INPUT);
6538
+ }
6530
6539
  MeetingUtil.handleDeviceLogging(devices);
6531
6540
  } catch {
6532
6541
  // getDevices may fail if we don't have browser permissions, that's ok, we still can have a media connection
@@ -7019,7 +7028,7 @@ export default class Meeting extends StatelessWebexPlugin {
7019
7028
  );
7020
7029
 
7021
7030
  if (audioEnabled || videoEnabled) {
7022
- await Meeting.handleDeviceLogging();
7031
+ await Meeting.handleDeviceLogging(audioEnabled, videoEnabled);
7023
7032
  } else {
7024
7033
  LoggerProxy.logger.info(`${LOG_HEADER} device logging not required`);
7025
7034
  }
@@ -4279,6 +4279,20 @@ describe('plugin-meetings', () => {
4279
4279
  assert.calledTwice(locusMediaRequestStub);
4280
4280
  });
4281
4281
 
4282
+ it('addMedia() works correctly when media is disabled with no streams to publish', async () => {
4283
+ const handleDeviceLoggingSpy = sinon.spy(Meeting, 'handleDeviceLogging');
4284
+ await meeting.addMedia({audioEnabled: false});
4285
+ //calling handleDeviceLogging with audioEnaled as true adn videoEnabled as false
4286
+ assert.calledWith(handleDeviceLoggingSpy,false,true);
4287
+ });
4288
+
4289
+ it('addMedia() works correctly when video is disabled with no streams to publish', async () => {
4290
+ const handleDeviceLoggingSpy = sinon.spy(Meeting, 'handleDeviceLogging');
4291
+ await meeting.addMedia({videoEnabled: false});
4292
+ //calling handleDeviceLogging audioEnabled as true videoEnabled as false
4293
+ assert.calledWith(handleDeviceLoggingSpy,true,false);
4294
+ });
4295
+
4282
4296
  it('addMedia() works correctly when video is disabled with no streams to publish', async () => {
4283
4297
  await meeting.addMedia({videoEnabled: false});
4284
4298
  await simulateRoapOffer();
@@ -4345,6 +4359,14 @@ describe('plugin-meetings', () => {
4345
4359
  assert.calledTwice(locusMediaRequestStub);
4346
4360
  });
4347
4361
 
4362
+
4363
+ it('addMedia() works correctly when both shareAudio and shareVideo is disabled with no streams publish', async () => {
4364
+ const handleDeviceLoggingSpy = sinon.spy(Meeting, 'handleDeviceLogging');
4365
+ await meeting.addMedia({shareAudioEnabled: false, shareVideoEnabled: false});
4366
+ //calling handleDeviceLogging with audioEnabled true and videoEnabled as true
4367
+ assert.calledWith(handleDeviceLoggingSpy,true,true);
4368
+ });
4369
+
4348
4370
  describe('publishStreams()/unpublishStreams() calls', () => {
4349
4371
  [
4350
4372
  {mediaEnabled: true, expected: {direction: 'sendrecv', localMuteSentValue: false}},