livekit-client 1.9.6 → 1.9.7

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.
@@ -14010,7 +14010,7 @@ let browserDetails;
14010
14010
  */
14011
14011
  function getBrowser(userAgent) {
14012
14012
  let force = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
14013
- if (userAgent === undefined && (typeof document !== 'undefined' || typeof navigator === 'undefined')) {
14013
+ if (typeof userAgent === 'undefined' && typeof navigator === 'undefined') {
14014
14014
  return;
14015
14015
  }
14016
14016
  const ua = (userAgent !== null && userAgent !== void 0 ? userAgent : navigator.userAgent).toLowerCase();
@@ -14060,7 +14060,7 @@ function getMatch(exp, ua) {
14060
14060
  return match && match.length >= id && match[id] || '';
14061
14061
  }
14062
14062
 
14063
- var version$1 = "1.9.6";
14063
+ var version$1 = "1.9.7";
14064
14064
 
14065
14065
  const version = version$1;
14066
14066
  const protocolVersion = 9;
@@ -20665,6 +20665,29 @@ function encodingsFromPresets(width, height, presets) {
20665
20665
  }
20666
20666
  encodings.push(encoding);
20667
20667
  });
20668
+ // RN ios simulcast requires all same framerates.
20669
+ if (isReactNative() && getReactNativeOs() === 'ios') {
20670
+ let topFramerate = undefined;
20671
+ encodings.forEach(encoding => {
20672
+ if (!topFramerate) {
20673
+ topFramerate = encoding.maxFramerate;
20674
+ } else if (encoding.maxFramerate && encoding.maxFramerate > topFramerate) {
20675
+ topFramerate = encoding.maxFramerate;
20676
+ }
20677
+ });
20678
+ let notifyOnce = true;
20679
+ encodings.forEach(encoding => {
20680
+ var _a;
20681
+ if (encoding.maxFramerate != topFramerate) {
20682
+ if (notifyOnce) {
20683
+ notifyOnce = false;
20684
+ livekitLogger.info("Simulcast on iOS React-Native requires all encodings to share the same framerate.");
20685
+ }
20686
+ livekitLogger.info("Setting framerate of encoding \"".concat((_a = encoding.rid) !== null && _a !== void 0 ? _a : '', "\" to ").concat(topFramerate));
20687
+ encoding.maxFramerate = topFramerate;
20688
+ }
20689
+ });
20690
+ }
20668
20691
  return encodings;
20669
20692
  }
20670
20693
  /** @internal */