feat: mute screenshare audio independently + fix CI lint/prettier
CI / Build & Quality Checks (push) Successful in 10m41s

- 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:
2026-05-24 23:52:57 -04:00
parent b8f1cc3c08
commit 1c6df604b1
4 changed files with 83 additions and 12 deletions
+7 -3
View File
@@ -24,6 +24,7 @@ import {
FullscreenButton,
MicrophoneButton,
ScreenShareButton,
ScreenshareAudioButton,
SoundButton,
VideoButton,
} from './Controls';
@@ -67,9 +68,8 @@ export function CallControls({ callEmbed }: CallControlsProps) {
}
}, [callEmbedRef]);
const { microphone, video, sound, screenshare, spotlight } = useCallControlState(
callEmbed.control,
);
const { microphone, video, sound, screenshare, spotlight, screenshareAudioMuted } =
useCallControlState(callEmbed.control);
const [cords, setCords] = useState<RectCords>();
const [shareConfirm, setShareConfirm] = useState(false);
@@ -346,6 +346,10 @@ export function CallControls({ callEmbed }: CallControlsProps) {
onToggle={() => callEmbed.control.toggleMicrophone()}
/>
<SoundButton enabled={sound} onToggle={() => callEmbed.control.toggleSound()} />
<ScreenshareAudioButton
muted={screenshareAudioMuted}
onToggle={() => callEmbed.control.toggleScreenshareAudio()}
/>
</Box>
{!compact && <ControlDivider />}
<Box shrink="No" alignItems="Inherit" justifyContent="Inherit" gap="200">