feat: conditionally show bitrate slider based on instance allowCustomBitrate
This commit is contained in:
@@ -217,13 +217,13 @@ export function ScreenShareSettingsPopover({ open, onClose, anchorRef }: ScreenS
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Bitrate Override */}
|
||||
{/* Bitrate */}
|
||||
<div>
|
||||
<div className="flex items-center justify-between mb-1.5">
|
||||
<div className="text-[11px] text-txt-tertiary font-semibold uppercase tracking-wider">
|
||||
Bitrate
|
||||
</div>
|
||||
{config.customBitrateKbps != null && (
|
||||
{limits?.allowCustomBitrate !== false && config.customBitrateKbps != null && (
|
||||
<button
|
||||
onClick={() => setConfig({ customBitrateKbps: null })}
|
||||
className="text-[11px] text-accent-primary hover:text-accent-lavender font-medium transition-colors"
|
||||
@@ -232,6 +232,7 @@ export function ScreenShareSettingsPopover({ open, onClose, anchorRef }: ScreenS
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
{limits?.allowCustomBitrate !== false ? (
|
||||
<div className="flex items-center gap-2">
|
||||
<input
|
||||
type="range"
|
||||
@@ -255,6 +256,16 @@ export function ScreenShareSettingsPopover({ open, onClose, anchorRef }: ScreenS
|
||||
: `Auto`}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<div>
|
||||
<div className="text-[12px] text-txt-secondary font-medium">
|
||||
{formatKbps(Math.round(result.publish.videoEncoding.maxBitrate / 1000))}
|
||||
</div>
|
||||
<div className="text-[10px] text-txt-tertiary mt-0.5">
|
||||
Custom bitrate disabled by administrator
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* System Audio */}
|
||||
|
||||
Reference in New Issue
Block a user