From f0104d19b70d736604c694a7da33489506182a6c Mon Sep 17 00:00:00 2001 From: Jannis Braun <151788261+TheZwiss@users.noreply.github.com> Date: Wed, 25 Mar 2026 04:09:18 +0100 Subject: [PATCH] feat: conditionally show bitrate slider based on instance allowCustomBitrate --- .../voice/ScreenShareSettingsPopover.tsx | 61 +++++++++++-------- 1 file changed, 36 insertions(+), 25 deletions(-) diff --git a/packages/web/src/components/voice/ScreenShareSettingsPopover.tsx b/packages/web/src/components/voice/ScreenShareSettingsPopover.tsx index a97084f9..4b8e799b 100644 --- a/packages/web/src/components/voice/ScreenShareSettingsPopover.tsx +++ b/packages/web/src/components/voice/ScreenShareSettingsPopover.tsx @@ -217,13 +217,13 @@ export function ScreenShareSettingsPopover({ open, onClose, anchorRef }: ScreenS )} - {/* Bitrate Override */} + {/* Bitrate */}
Bitrate
- {config.customBitrateKbps != null && ( + {limits?.allowCustomBitrate !== false && config.customBitrateKbps != null && ( )}
-
- setConfig({ customBitrateKbps: Number(e.target.value) })} - className="flex-1 h-1.5 accent-accent-primary cursor-pointer appearance-none bg-interactive-muted rounded-full - [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3.5 [&::-webkit-slider-thumb]:h-3.5 - [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white [&::-webkit-slider-thumb]:shadow-md - [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:border-0 - [&::-moz-range-thumb]:w-3.5 [&::-moz-range-thumb]:h-3.5 [&::-moz-range-thumb]:rounded-full - [&::-moz-range-thumb]:bg-white [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer" - /> - - {config.customBitrateKbps != null - ? formatKbps(config.customBitrateKbps) - : `Auto`} - -
+ {limits?.allowCustomBitrate !== false ? ( +
+ setConfig({ customBitrateKbps: Number(e.target.value) })} + className="flex-1 h-1.5 accent-accent-primary cursor-pointer appearance-none bg-interactive-muted rounded-full + [&::-webkit-slider-thumb]:appearance-none [&::-webkit-slider-thumb]:w-3.5 [&::-webkit-slider-thumb]:h-3.5 + [&::-webkit-slider-thumb]:rounded-full [&::-webkit-slider-thumb]:bg-white [&::-webkit-slider-thumb]:shadow-md + [&::-webkit-slider-thumb]:cursor-pointer [&::-webkit-slider-thumb]:border-0 + [&::-moz-range-thumb]:w-3.5 [&::-moz-range-thumb]:h-3.5 [&::-moz-range-thumb]:rounded-full + [&::-moz-range-thumb]:bg-white [&::-moz-range-thumb]:border-0 [&::-moz-range-thumb]:cursor-pointer" + /> + + {config.customBitrateKbps != null + ? formatKbps(config.customBitrateKbps) + : `Auto`} + +
+ ) : ( +
+
+ {formatKbps(Math.round(result.publish.videoEncoding.maxBitrate / 1000))} +
+
+ Custom bitrate disabled by administrator +
+
+ )}
{/* System Audio */}