Hook for managing media controls (audio, video, screen share).
This hook extracts media control logic from ControlBar, providing:
The hook automatically syncs with client events to handle:
const { isAudioMuted, isVideoMuted, isScreenSharing, toggleAudio, toggleVideo, toggleScreenShare,} = useMediaControls({ client, localUserId, contextAudioMuted, contextVideoMuted,}); Copy
const { isAudioMuted, isVideoMuted, isScreenSharing, toggleAudio, toggleVideo, toggleScreenShare,} = useMediaControls({ client, localUserId, contextAudioMuted, contextVideoMuted,});
Hook for managing media controls (audio, video, screen share).