@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/esm/index.js CHANGED
@@ -5776,7 +5776,7 @@ class JmpSession extends EventEmitter$3 {
5776
5776
  this.logger.info(`Received invalid Active Speaker Notification:`, activeSpeakerNotification);
5777
5777
  return;
5778
5778
  }
5779
- this.logger.info(`Received Active Speaker Notification:`, activeSpeakerNotification);
5779
+ this.logger.debug(`Received Active Speaker Notification:`, activeSpeakerNotification);
5780
5780
  this.emit(JmpSessionEvents.ActiveSpeaker, activeSpeakerNotification);
5781
5781
  }
5782
5782
  else if (payload.msgType === JmpMsgType.SourceIndication) {
@@ -9560,9 +9560,14 @@ const logger = Logger.get(DEFAULT_LOGGER_NAME);
9560
9560
  logger.setLevel(Logger.DEBUG);
9561
9561
  function setLogLevel(level) {
9562
9562
  logger.setLevel(level);
9563
+ Logger$1.setLevel(level);
9563
9564
  }
9564
9565
  function getLogLevel() {
9565
9566
  return logger.getLevel();
9567
+ }
9568
+ function setLogHandler(logHandler) {
9569
+ Logger.setHandler(logHandler);
9570
+ Logger$1.setHandler(logHandler);
9566
9571
  }
9567
9572
 
9568
9573
  function toMediaStreamTrackKind(mediaType) {
@@ -9589,6 +9594,7 @@ const defaultMultistreamConnectionOptions = {
9589
9594
  streamSignalingMode: 'SSRC',
9590
9595
  bundlePolicy: 'max-compat',
9591
9596
  iceServers: undefined,
9597
+ disableContentSimulcast: true,
9592
9598
  };
9593
9599
  class MultistreamConnection extends EventEmitter {
9594
9600
  constructor(userOptions = {}) {
@@ -9609,11 +9615,11 @@ class MultistreamConnection extends EventEmitter {
9609
9615
  this.overuseStateManager.start();
9610
9616
  this.statsManager = new StatsManager(() => this.pc.getStats(), (stats) => this.preProcessStats(stats));
9611
9617
  const mainSceneId = generateSceneId();
9612
- const videoMainEncodingOptions = this.getVideoEncodingOptions();
9618
+ const videoMainEncodingOptions = this.getVideoEncodingOptions(MediaContent.Main);
9613
9619
  this.createSendTransceiver(MediaType.VideoMain, mainSceneId, videoMainEncodingOptions);
9614
9620
  this.createSendTransceiver(MediaType.AudioMain, mainSceneId);
9615
9621
  if (this.options.floorControlledPresentation) {
9616
- const videoPresentationEncodingOptions = this.getVideoEncodingOptions();
9622
+ const videoPresentationEncodingOptions = this.getVideoEncodingOptions(MediaContent.Slides);
9617
9623
  const contentSceneId = generateSceneId();
9618
9624
  this.createSendTransceiver(MediaType.VideoSlides, contentSceneId, videoPresentationEncodingOptions);
9619
9625
  this.createSendTransceiver(MediaType.AudioSlides, contentSceneId);
@@ -9643,8 +9649,11 @@ class MultistreamConnection extends EventEmitter {
9643
9649
  getConnectionState() {
9644
9650
  return this.pc.getConnectionState();
9645
9651
  }
9646
- getVideoEncodingOptions() {
9647
- return !this.options.disableSimulcast
9652
+ getVideoEncodingOptions(content) {
9653
+ const enabledSimulcast = content === MediaContent.Main
9654
+ ? !this.options.disableSimulcast
9655
+ : !this.options.disableContentSimulcast;
9656
+ return enabledSimulcast
9648
9657
  ? [
9649
9658
  { scaleResolutionDownBy: 4, active: false },
9650
9659
  { scaleResolutionDownBy: 2, active: false },
@@ -9835,7 +9844,7 @@ class MultistreamConnection extends EventEmitter {
9835
9844
  logger.error(`Error parsing datachannel JSON: ${err}`);
9836
9845
  return;
9837
9846
  }
9838
- logger.info('DataChannel got msg: ', parsed);
9847
+ logger.debug('DataChannel got msg: ', parsed);
9839
9848
  const homerMsg = HomerMsg.fromJson(parsed);
9840
9849
  if (!homerMsg) {
9841
9850
  logger.error(`Received invalid datachannel message: ${e}`);
@@ -10081,7 +10090,7 @@ class MultistreamConnection extends EventEmitter {
10081
10090
  .filter((av) => av.direction === 'sendrecv')
10082
10091
  .forEach((av) => {
10083
10092
  const egressSignaler = this.streamSignalerManager.getOrCreateEgressStreamSignaler(av.mid);
10084
- const simulcastEnabled = av.type === 'video' ? !this.options.disableSimulcast : false;
10093
+ const simulcastEnabled = !!av.simulcast;
10085
10094
  const rtxEnabled = av.type === 'video';
10086
10095
  egressSignaler.signalStreams(simulcastEnabled, rtxEnabled, av);
10087
10096
  if (av.type === 'video') {
@@ -10181,7 +10190,7 @@ class MultistreamConnection extends EventEmitter {
10181
10190
  transceiver.replaceTransceiver(this.pc.addTransceiver(toMediaStreamTrackKind(mediaType), {
10182
10191
  direction: 'sendrecv',
10183
10192
  sendEncodings: getMediaFamily(mediaType) === MediaFamily.Video
10184
- ? this.getVideoEncodingOptions()
10193
+ ? this.getVideoEncodingOptions(getMediaContent(mediaType))
10185
10194
  : undefined,
10186
10195
  }));
10187
10196
  transceiver.csi = generateCsi(getMediaFamily(mediaType), mainSceneId);
@@ -10276,5 +10285,5 @@ class MultistreamConnection extends EventEmitter {
10276
10285
  }
10277
10286
  }
10278
10287
 
10279
- export { ConnectionState, LocalCameraTrack, LocalDisplayTrack, LocalMicrophoneTrack, LocalTrack, LocalTrackEvents, Logger, MediaCodecMimeType, MediaRequest, MultistreamConnection, MultistreamConnectionEventNames, ReceiveSlot, ReceiveSlotEvents, RecommendedOpusBitrates, SendOnlyTransceiver, WcmeError, compareReceiveSlotIds, createCameraTrack, createDisplayTrack, createMicrophoneTrack, getAudioInputDevices, getAudioOutputDevices, getDevices, getLogLevel, getRecommendedMaxBitrateForFrameSize, getVideoInputDevices, logger, setLogLevel, setOnDeviceChangeHandler };
10288
+ export { ConnectionState, Logger$1 as JMPLogger, LocalCameraTrack, LocalDisplayTrack, LocalMicrophoneTrack, LocalTrack, LocalTrackEvents, Logger, MediaCodecMimeType, MediaRequest, MultistreamConnection, MultistreamConnectionEventNames, ReceiveSlot, ReceiveSlotEvents, RecommendedOpusBitrates, SendOnlyTransceiver, WcmeError, compareReceiveSlotIds, createCameraTrack, createDisplayTrack, createMicrophoneTrack, getAudioInputDevices, getAudioOutputDevices, getDevices, getLogLevel, getRecommendedMaxBitrateForFrameSize, getVideoInputDevices, logger, setLogHandler, setLogLevel, setOnDeviceChangeHandler };
10280
10289
  //# sourceMappingURL=index.js.map