Audio/Video indicators are getting closer
This commit is contained in:
parent
f4fe180fb1
commit
1e5e2c682c
@ -44,7 +44,7 @@
|
|||||||
height: 3.75rem;
|
height: 3.75rem;
|
||||||
min-width: 3.5rem;
|
min-width: 3.5rem;
|
||||||
min-height: 1.8725rem;
|
min-height: 1.8725rem;
|
||||||
z-index: 1200;
|
z-index: 12000; /* Above Hand and other MUI elements */
|
||||||
border-radius: 0.25rem;
|
border-radius: 0.25rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,6 +78,7 @@
|
|||||||
z-index: 1251; /* Above the Indicators but below active move handles */
|
z-index: 1251; /* Above the Indicators but below active move handles */
|
||||||
background-color: rgba(64, 64, 64, 64);
|
background-color: rgba(64, 64, 64, 64);
|
||||||
backdrop-filter: blur(5px);
|
backdrop-filter: blur(5px);
|
||||||
|
opacity: 0.85;
|
||||||
}
|
}
|
||||||
|
|
||||||
.MediaControl:hover .Controls {
|
.MediaControl:hover .Controls {
|
||||||
@ -97,6 +98,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
pointer-events: none; /* non-interactive */
|
pointer-events: none; /* non-interactive */
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Indicators .IndicatorRow {
|
.Indicators .IndicatorRow {
|
||||||
@ -108,7 +110,7 @@
|
|||||||
background: rgba(0, 0, 0, 0.45);
|
background: rgba(0, 0, 0, 0.45);
|
||||||
padding: 0.12rem;
|
padding: 0.12rem;
|
||||||
border-radius: 999px;
|
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;
|
color: white;
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@ -143,6 +145,31 @@
|
|||||||
cursor: pointer;
|
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 {
|
.moveable-control-box {
|
||||||
border: none;
|
border: none;
|
||||||
--moveable-color: unset !important;
|
--moveable-color: unset !important;
|
||||||
|
@ -1753,42 +1753,40 @@ const MediaControl: React.FC<MediaControlProps> = ({
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
{muted ? <VolumeOff color={colorAudio} /> : <VolumeUp color={colorAudio} />}
|
{muted ? <VolumeOff /> : <VolumeUp />}
|
||||||
{remoteAudioMuted && <MicOff />}
|
|
||||||
{videoOn ? <Videocam /> : <VideocamOff />}
|
{videoOn ? <Videocam /> : <VideocamOff />}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
{!isSelf && (
|
||||||
|
<>
|
||||||
|
{remoteAudioMuted && <MicOff color="warning" />}
|
||||||
|
{remoteVideoOff && <VideocamOff color="warning" />}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
{/* Interactive controls: rendered inside target but referenced separately */}
|
{/* Interactive controls: rendered inside target but referenced separately */}
|
||||||
<Box className="Controls" ref={controlsRef}>
|
<Box
|
||||||
{isSelf ? (
|
className="Controls"
|
||||||
<IconButton onClick={toggleMute}>
|
ref={controlsRef}
|
||||||
{muted ? <MicOff color={colorAudio} /> : <Mic color={colorAudio} />}
|
sx={{ display: "flex", flexDirection: "row", justifyItems: "center" }}
|
||||||
</IconButton>
|
>
|
||||||
) : (
|
<IconButton onClick={toggleMute}>
|
||||||
<Box sx={{ display: "flex", flexDirection: "row", gap: 0, alignItems: "center", p: 0, m: 0 }}>
|
{isSelf ? (
|
||||||
<IconButton onClick={toggleMute}>
|
muted ? (
|
||||||
{muted ? <VolumeOff color={colorAudio} /> : <VolumeUp color={colorAudio} />}
|
<MicOff color={colorAudio} />
|
||||||
</IconButton>
|
) : (
|
||||||
{remoteAudioMuted && <MicOff color="warning" />}
|
<Mic color={colorAudio} />
|
||||||
</Box>
|
)
|
||||||
)}
|
) : muted ? (
|
||||||
<Box
|
<VolumeOff color={colorAudio} />
|
||||||
sx={{
|
) : (
|
||||||
display: "flex",
|
<VolumeUp color={colorAudio} />
|
||||||
flexDirection: "row",
|
)}
|
||||||
gap: 0,
|
</IconButton>
|
||||||
alignItems: "center",
|
<IconButton onClick={toggleVideo}>
|
||||||
p: 0,
|
{videoOn ? <Videocam color={colorVideo} /> : <VideocamOff color={colorVideo} />}
|
||||||
m: 0,
|
</IconButton>
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconButton onClick={toggleVideo}>
|
|
||||||
{videoOn ? <Videocam color={colorVideo} /> : <VideocamOff color={colorVideo} />}
|
|
||||||
</IconButton>
|
|
||||||
{!isSelf && remoteVideoOff && <VideocamOff color="warning" />}
|
|
||||||
</Box>
|
|
||||||
</Box>
|
</Box>
|
||||||
{isValid ? (
|
{isValid ? (
|
||||||
peer.attributes?.srcObject && (
|
peer.attributes?.srcObject && (
|
||||||
|
@ -51,6 +51,9 @@ const NameSetter: React.FC<NameSetterProps> = ({ onNameSet, initialName = "", in
|
|||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
if (passwordInputRef.current) {
|
if (passwordInputRef.current) {
|
||||||
passwordInputRef.current.focus();
|
passwordInputRef.current.focus();
|
||||||
|
} else {
|
||||||
|
// No password input present — submit the name directly
|
||||||
|
handleSubmit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -195,7 +195,6 @@ const PlayerList: React.FC = () => {
|
|||||||
{player.name && player.live && peerObj && (player.local || player.has_media !== false) ? (
|
{player.name && player.live && peerObj && (player.local || player.has_media !== false) ? (
|
||||||
<>
|
<>
|
||||||
<MediaControl
|
<MediaControl
|
||||||
sx={{ border: "3px solid blue" }}
|
|
||||||
className="Medium"
|
className="Medium"
|
||||||
key={player.session_id}
|
key={player.session_id}
|
||||||
peer={peerObj}
|
peer={peerObj}
|
||||||
|
@ -93,7 +93,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
width: 25rem;
|
width: 25rem;
|
||||||
max-width: 25rem;
|
max-width: 25rem;
|
||||||
z-index: 5000;
|
z-index: 11500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.RoomView .Sidebar .Chat {
|
.RoomView .Sidebar .Chat {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user