@webex/web-client-media-engine 1.38.0 → 1.38.2

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/dist/cjs/index.js CHANGED
@@ -5780,7 +5780,7 @@ class JmpSession extends events$2.EventEmitter {
5780
5780
  this.logger.info(`Received invalid Active Speaker Notification:`, activeSpeakerNotification);
5781
5781
  return;
5782
5782
  }
5783
- this.logger.info(`Received Active Speaker Notification:`, activeSpeakerNotification);
5783
+ this.logger.debug(`Received Active Speaker Notification:`, activeSpeakerNotification);
5784
5784
  this.emit(JmpSessionEvents.ActiveSpeaker, activeSpeakerNotification);
5785
5785
  }
5786
5786
  else if (payload.msgType === JmpMsgType.SourceIndication) {
@@ -9564,9 +9564,14 @@ const logger = Logger.get(DEFAULT_LOGGER_NAME);
9564
9564
  logger.setLevel(Logger.DEBUG);
9565
9565
  function setLogLevel(level) {
9566
9566
  logger.setLevel(level);
9567
+ Logger$1.setLevel(level);
9567
9568
  }
9568
9569
  function getLogLevel() {
9569
9570
  return logger.getLevel();
9571
+ }
9572
+ function setLogHandler(logHandler) {
9573
+ Logger.setHandler(logHandler);
9574
+ Logger$1.setHandler(logHandler);
9570
9575
  }
9571
9576
 
9572
9577
  function toMediaStreamTrackKind(mediaType) {
@@ -9593,6 +9598,7 @@ const defaultMultistreamConnectionOptions = {
9593
9598
  streamSignalingMode: 'SSRC',
9594
9599
  bundlePolicy: 'max-compat',
9595
9600
  iceServers: undefined,
9601
+ disableContentSimulcast: true,
9596
9602
  };
9597
9603
  class MultistreamConnection extends EventEmitter {
9598
9604
  constructor(userOptions = {}) {
@@ -9613,11 +9619,11 @@ class MultistreamConnection extends EventEmitter {
9613
9619
  this.overuseStateManager.start();
9614
9620
  this.statsManager = new StatsManager(() => this.pc.getStats(), (stats) => this.preProcessStats(stats));
9615
9621
  const mainSceneId = generateSceneId();
9616
- const videoMainEncodingOptions = this.getVideoEncodingOptions();
9622
+ const videoMainEncodingOptions = this.getVideoEncodingOptions(MediaContent.Main);
9617
9623
  this.createSendTransceiver(MediaType.VideoMain, mainSceneId, videoMainEncodingOptions);
9618
9624
  this.createSendTransceiver(MediaType.AudioMain, mainSceneId);
9619
9625
  if (this.options.floorControlledPresentation) {
9620
- const videoPresentationEncodingOptions = this.getVideoEncodingOptions();
9626
+ const videoPresentationEncodingOptions = this.getVideoEncodingOptions(MediaContent.Slides);
9621
9627
  const contentSceneId = generateSceneId();
9622
9628
  this.createSendTransceiver(MediaType.VideoSlides, contentSceneId, videoPresentationEncodingOptions);
9623
9629
  this.createSendTransceiver(MediaType.AudioSlides, contentSceneId);
@@ -9647,8 +9653,11 @@ class MultistreamConnection extends EventEmitter {
9647
9653
  getConnectionState() {
9648
9654
  return this.pc.getConnectionState();
9649
9655
  }
9650
- getVideoEncodingOptions() {
9651
- return !this.options.disableSimulcast
9656
+ getVideoEncodingOptions(content) {
9657
+ const enabledSimulcast = content === MediaContent.Main
9658
+ ? !this.options.disableSimulcast
9659
+ : !this.options.disableContentSimulcast;
9660
+ return enabledSimulcast
9652
9661
  ? [
9653
9662
  { scaleResolutionDownBy: 4, active: false },
9654
9663
  { scaleResolutionDownBy: 2, active: false },
@@ -9839,7 +9848,7 @@ class MultistreamConnection extends EventEmitter {
9839
9848
  logger.error(`Error parsing datachannel JSON: ${err}`);
9840
9849
  return;
9841
9850
  }
9842
- logger.info('DataChannel got msg: ', parsed);
9851
+ logger.debug('DataChannel got msg: ', parsed);
9843
9852
  const homerMsg = HomerMsg.fromJson(parsed);
9844
9853
  if (!homerMsg) {
9845
9854
  logger.error(`Received invalid datachannel message: ${e}`);
@@ -10085,7 +10094,7 @@ class MultistreamConnection extends EventEmitter {
10085
10094
  .filter((av) => av.direction === 'sendrecv')
10086
10095
  .forEach((av) => {
10087
10096
  const egressSignaler = this.streamSignalerManager.getOrCreateEgressStreamSignaler(av.mid);
10088
- const simulcastEnabled = av.type === 'video' ? !this.options.disableSimulcast : false;
10097
+ const simulcastEnabled = !!av.simulcast;
10089
10098
  const rtxEnabled = av.type === 'video';
10090
10099
  egressSignaler.signalStreams(simulcastEnabled, rtxEnabled, av);
10091
10100
  if (av.type === 'video') {
@@ -10185,7 +10194,7 @@ class MultistreamConnection extends EventEmitter {
10185
10194
  transceiver.replaceTransceiver(this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
10186
10195
  direction: 'sendrecv',
10187
10196
  sendEncodings: getMediaFamily(mediaType) === MediaFamily.Video
10188
- ? this.getVideoEncodingOptions()
10197
+ ? this.getVideoEncodingOptions(getMediaContent(mediaType))
10189
10198
  : undefined,
10190
10199
  }));
10191
10200
  transceiver.csi = generateCsi(getMediaFamily(mediaType), mainSceneId);
@@ -10280,6 +10289,7 @@ class MultistreamConnection extends EventEmitter {
10280
10289
  }
10281
10290
  }
10282
10291
 
10292
+ exports.JMPLogger = Logger$1;
10283
10293
  exports.LocalCameraTrack = LocalCameraTrack;
10284
10294
  exports.LocalDisplayTrack = LocalDisplayTrack;
10285
10295
  exports.LocalMicrophoneTrack = LocalMicrophoneTrack;
@@ -10301,6 +10311,7 @@ exports.getLogLevel = getLogLevel;
10301
10311
  exports.getRecommendedMaxBitrateForFrameSize = getRecommendedMaxBitrateForFrameSize;
10302
10312
  exports.getVideoInputDevices = getVideoInputDevices;
10303
10313
  exports.logger = logger;
10314
+ exports.setLogHandler = setLogHandler;
10304
10315
  exports.setLogLevel = setLogLevel;
10305
10316
  exports.setOnDeviceChangeHandler = setOnDeviceChangeHandler;
10306
10317
  //# sourceMappingURL=index.js.map