1
0

Audio/Video indicators are getting closer

This commit is contained in:
James Ketr 2025-10-11 00:24:07 -07:00
parent f4fe180fb1
commit 1e5e2c682c
5 changed files with 61 additions and 34 deletions

View File

@ -44,7 +44,7 @@
height: 3.75rem;
min-width: 3.5rem;
min-height: 1.8725rem;
z-index: 1200;
z-index: 12000; /* Above Hand and other MUI elements */
border-radius: 0.25rem;
}
@ -78,6 +78,7 @@
z-index: 1251; /* Above the Indicators but below active move handles */
background-color: rgba(64, 64, 64, 64);
backdrop-filter: blur(5px);
opacity: 0.85;
}
.MediaControl:hover .Controls {
@ -97,6 +98,7 @@
flex-direction: column;
pointer-events: none; /* non-interactive */
align-items: flex-start;
opacity: 0.5;
}
.Indicators .IndicatorRow {
@ -108,7 +110,7 @@
background: rgba(0, 0, 0, 0.45);
padding: 0.12rem;
border-radius: 999px;
box-shadow: 0 1px 3px rgba(0,0,0,0.35);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
color: white;
display: inline-flex;
align-items: center;
@ -143,6 +145,31 @@
cursor: pointer;
}
/* Invert highlight behavior for control buttons:
- Buttons are transparent by default so they don't visually obscure the video when not hovered.
- On hover/focus (keyboard or pointer) they show a light background to indicate interactivity.
- Scope to MUI IconButton root class to avoid affecting other controls.
*/
.MediaControl .Controls .MuiIconButton-root {
background: transparent;
transition: background-color 120ms ease, color 120ms ease;
padding: 0.25rem;
margin: 0.08rem;
}
.MediaControl .Controls .MuiIconButton-root:hover,
.MediaControl .Controls .MuiIconButton-root:focus {
background: rgba(255,255,255,0.5); /* subtle light highlight on hover/focus */
}
.MediaControl .Controls .MuiIconButton-root:active {
background: rgba(255,255,255,0.18);
}
/* Ensure accessible focus indicator for keyboard users */
.MediaControl .Controls .MuiIconButton-root:focus-visible {
outline: 2px solid rgba(255,255,255,0.22);
outline-offset: 2px;
}
.moveable-control-box {
border: none;
--moveable-color: unset !important;

View File

@ -1753,42 +1753,40 @@ const MediaControl: React.FC<MediaControlProps> = ({
</>
) : (
<>
{muted ? <VolumeOff color={colorAudio} /> : <VolumeUp color={colorAudio} />}
{remoteAudioMuted && <MicOff />}
{muted ? <VolumeOff /> : <VolumeUp />}
{videoOn ? <Videocam /> : <VideocamOff />}
</>
)}
{!isSelf && (
<>
{remoteAudioMuted && <MicOff color="warning" />}
{remoteVideoOff && <VideocamOff color="warning" />}
</>
)}
</Box>
{/* Interactive controls: rendered inside target but referenced separately */}
<Box className="Controls" ref={controlsRef}>
{isSelf ? (
<IconButton onClick={toggleMute}>
{muted ? <MicOff color={colorAudio} /> : <Mic color={colorAudio} />}
</IconButton>
) : (
<Box sx={{ display: "flex", flexDirection: "row", gap: 0, alignItems: "center", p: 0, m: 0 }}>
<IconButton onClick={toggleMute}>
{muted ? <VolumeOff color={colorAudio} /> : <VolumeUp color={colorAudio} />}
</IconButton>
{remoteAudioMuted && <MicOff color="warning" />}
</Box>
)}
<Box
sx={{
display: "flex",
flexDirection: "row",
gap: 0,
alignItems: "center",
p: 0,
m: 0,
}}
>
<IconButton onClick={toggleVideo}>
{videoOn ? <Videocam color={colorVideo} /> : <VideocamOff color={colorVideo} />}
</IconButton>
{!isSelf && remoteVideoOff && <VideocamOff color="warning" />}
</Box>
<Box
className="Controls"
ref={controlsRef}
sx={{ display: "flex", flexDirection: "row", justifyItems: "center" }}
>
<IconButton onClick={toggleMute}>
{isSelf ? (
muted ? (
<MicOff color={colorAudio} />
) : (
<Mic color={colorAudio} />
)
) : muted ? (
<VolumeOff color={colorAudio} />
) : (
<VolumeUp color={colorAudio} />
)}
</IconButton>
<IconButton onClick={toggleVideo}>
{videoOn ? <Videocam color={colorVideo} /> : <VideocamOff color={colorVideo} />}
</IconButton>
</Box>
{isValid ? (
peer.attributes?.srcObject && (

View File

@ -51,6 +51,9 @@ const NameSetter: React.FC<NameSetterProps> = ({ onNameSet, initialName = "", in
event.preventDefault();
if (passwordInputRef.current) {
passwordInputRef.current.focus();
} else {
// No password input present — submit the name directly
handleSubmit();
}
}
};

View File

@ -195,7 +195,6 @@ const PlayerList: React.FC = () => {
{player.name && player.live && peerObj && (player.local || player.has_media !== false) ? (
<>
<MediaControl
sx={{ border: "3px solid blue" }}
className="Medium"
key={player.session_id}
peer={peerObj}

View File

@ -93,7 +93,7 @@
justify-content: space-between;
width: 25rem;
max-width: 25rem;
z-index: 5000;
z-index: 11500;
}
.RoomView .Sidebar .Chat {