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>
|
</div>
|
||||||
|
|
||||||
{/* Bitrate Override */}
|
{/* Bitrate */}
|
||||||
<div>
|
<div>
|
||||||
<div className="flex items-center justify-between mb-1.5">
|
<div className="flex items-center justify-between mb-1.5">
|
||||||
<div className="text-[11px] text-txt-tertiary font-semibold uppercase tracking-wider">
|
<div className="text-[11px] text-txt-tertiary font-semibold uppercase tracking-wider">
|
||||||
Bitrate
|
Bitrate
|
||||||
</div>
|
</div>
|
||||||
{config.customBitrateKbps != null && (
|
{limits?.allowCustomBitrate !== false && config.customBitrateKbps != null && (
|
||||||
<button
|
<button
|
||||||
onClick={() => setConfig({ customBitrateKbps: null })}
|
onClick={() => setConfig({ customBitrateKbps: null })}
|
||||||
className="text-[11px] text-accent-primary hover:text-accent-lavender font-medium transition-colors"
|
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>
|
</button>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{limits?.allowCustomBitrate !== false ? (
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<input
|
<input
|
||||||
type="range"
|
type="range"
|
||||||
@@ -255,6 +256,16 @@ export function ScreenShareSettingsPopover({ open, onClose, anchorRef }: ScreenS
|
|||||||
: `Auto`}
|
: `Auto`}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</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>
|
</div>
|
||||||
|
|
||||||
{/* System Audio */}
|
{/* System Audio */}
|
||||||
|
|||||||
Reference in New Issue
Block a user