feat: mute screenshare audio independently + fix CI lint/prettier
- Add screenshareAudioMuted state to CallControlState and CallControl - setSound() now preserves screenshare audio mute when un-deafening - Add toggleScreenshareAudio() targeting audio[data-lk-source="screen_share_audio"] - Add ScreenshareAudioButton (volume icon, warns when muted) to controls bar - Fix unused prevScreenshare variable (ESLint error from prior commit) - Run Prettier on Controls.tsx and CallControl.ts (CI formatting failures) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -197,11 +197,41 @@ export function FullscreenButton({ isFullscreen, onToggle }: FullscreenButtonPro
|
||||
aria-pressed={isFullscreen}
|
||||
outlined
|
||||
>
|
||||
{isFullscreen ? (
|
||||
<ExitFullscreenIcon />
|
||||
) : (
|
||||
<FullscreenIcon />
|
||||
)}
|
||||
{isFullscreen ? <ExitFullscreenIcon /> : <FullscreenIcon />}
|
||||
</IconButton>
|
||||
)}
|
||||
</TooltipProvider>
|
||||
);
|
||||
}
|
||||
|
||||
type ScreenshareAudioButtonProps = {
|
||||
muted: boolean;
|
||||
onToggle: () => void;
|
||||
};
|
||||
export function ScreenshareAudioButton({ muted, onToggle }: ScreenshareAudioButtonProps) {
|
||||
return (
|
||||
<TooltipProvider
|
||||
position="Top"
|
||||
delay={500}
|
||||
tooltip={
|
||||
<Tooltip>
|
||||
<Text size="T200">{muted ? 'Unmute Screenshare Audio' : 'Mute Screenshare Audio'}</Text>
|
||||
</Tooltip>
|
||||
}
|
||||
>
|
||||
{(anchorRef) => (
|
||||
<IconButton
|
||||
ref={anchorRef}
|
||||
variant={muted ? 'Warning' : 'Surface'}
|
||||
fill="Soft"
|
||||
radii="400"
|
||||
size="400"
|
||||
onClick={onToggle}
|
||||
aria-label={muted ? 'Unmute Screenshare Audio' : 'Mute Screenshare Audio'}
|
||||
aria-pressed={muted}
|
||||
outlined
|
||||
>
|
||||
<Icon size="400" src={muted ? Icons.VolumeMute : Icons.VolumeHigh} filled={muted} />
|
||||
</IconButton>
|
||||
)}
|
||||
</TooltipProvider>
|
||||
|
||||
Reference in New Issue
Block a user