Skip to content

Commit

Permalink
Add missing id's
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafaboleken committed Dec 18, 2024
1 parent e29d239 commit 2fdeb90
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 17 deletions.
9 changes: 6 additions & 3 deletions react/src/Components/Cards/VideoCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ function VideoCard(props) {



const OverlayButton = ({ title, icon, color, onClick }) => (
const OverlayButton = ({ title, icon, color, onClick, label }) => (
<Tooltip title={title} placement="top">
<Fab onClick={onClick} color={color} aria-label="add" size="small">
<Fab onClick={onClick} color={color} aria-label={label} size="small">
<SvgIcon size={36} name={icon} color={theme.palette?.iconColor?.primary} />
</Fab>
</Tooltip>
Expand Down Expand Up @@ -106,13 +106,15 @@ function VideoCard(props) {
title={`Camera ${useAvatar ? "off" : "on"} ${props.name}`}
icon={useAvatar ? "camera-off" : "camera"}
color={useAvatar ? "error" : "primary"}
label={useAvatar ? "turn-on-camera" : "turn-off-camera"}
onClick={handleToggleCam}
/>
)}
<OverlayButton
title={`Microphone ${micMuted ? "on" : "off"} ${props.name}`}
icon={micMuted ? "muted-microphone" : "microphone"}
color={micMuted ? "error" : "primary"}
label={micMuted ? "unmute" : "mute"}
onClick={handleToggleMic}
/>
</>
Expand All @@ -124,6 +126,7 @@ function VideoCard(props) {
title={`${props.pinned ? t("unpin") : t("pin")} ${props.name}`}
icon={props.pinned ? "unpin" : "pin"}
color="primary"
label={props.pinned ? "unpin" : "pin"}
onClick={() => props?.pinVideo(props.trackAssignment.streamId)}
/>
);
Expand Down Expand Up @@ -162,7 +165,7 @@ function VideoCard(props) {
>
{!isMobile && !isTablet && <PinButton props={props} />}
{isAdministrativeButtonsVisible && (
<AdministrativeButtons props={props} micMuted={micMuted} />
<AdministrativeButtons props={props} micMuted={micMuted} useAvatar={useAvatar}/>
)}
</Grid>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ function GeneralSettingsDialog({
<Grid item xs={10}>
<Select
fullWidth
id="language-select"
variant="outlined"
value={currentLanguage}
onChange={(e) => switchLanguage(e.target.value)}
Expand All @@ -89,6 +90,7 @@ function GeneralSettingsDialog({
<Grid item xs={10}>
<Select
fullWidth
id="theme-select"
variant="outlined"
value={currentTheme}
onChange={(e) => switchTheme(e.target.value)}
Expand Down
10 changes: 2 additions & 8 deletions react/src/Components/Footer/Components/LayoutSettingsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,8 @@ export function LayoutSettingsDialog(props) {
}
});
} else if (mode === "sidebar") {
const participants = document.querySelectorAll(
".single-video-container.not-pinned video"
);
const firstParticipant =
participants.length > 1 ? participants[1] : participants[0];

//pin the first participant
props?.pinVideo(firstParticipant?.id ? firstParticipant.streamId : "localVideo");
//pins your video
props?.pinVideo(props?.videoTrackAssignments[0]?.streamId);
}
};
const radioLabel = (label, icon) => {
Expand Down
13 changes: 10 additions & 3 deletions react/src/Components/Footer/Components/SettingsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default function SettingsDialog(props) {
}, [props?.devices]);

return (
<Dialog onClose={handleClose} open={props?.open} fullScreen={fullScreen} maxWidth={'sm'}>
<Dialog onClose={handleClose} open={props?.open} fullScreen={fullScreen} maxWidth={'sm'} id="settings-dialog">
<AntDialogTitle onClose={handleClose}>{t('Set Camera and Microphone')}</AntDialogTitle>
<DialogContent>
<Box component="form" sx={{ display: 'flex', flexWrap: 'wrap' }}>
Expand All @@ -76,7 +76,7 @@ export default function SettingsDialog(props) {
<Select
autoFocus={props?.selectFocus === 'camera'}
fullWidth
id="demo-dialog-native"
id="setting-dialog-camera-select"
variant="outlined"
value={props?.selectedCamera}
onChange={e => switchVideoMode(e.target.value)}
Expand Down Expand Up @@ -104,7 +104,14 @@ export default function SettingsDialog(props) {
</Grid>
<Grid container alignItems={'center'} spacing={2}>
<Grid item xs={10}>
<Select variant="outlined" fullWidth value={props?.videoSendResolution} onChange={e => props?.setVideoSendResolution(e.target.value)} sx={{ color: '#fff' }}>
<Select
variant="outlined"
fullWidth
value={props?.videoSendResolution}
onChange={e => props?.setVideoSendResolution(e.target.value)}
sx={{ color: '#fff' }}
id="setting-dialog-resolution-select"
>
<MenuItem key="auto" value="auto">
{t('Auto')}
</MenuItem>
Expand Down
7 changes: 5 additions & 2 deletions react/src/pages/MeetingRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {isComponentMode} from "../utils";
import BecomePublisherConfirmationDialog from "../Components/BecomePublisherConfirmationDialog";
import RecordingButton from "../Components/RecordingButton";
import TalkingIndicator from "../Components/TalkingIndicator";
import {Container} from "@mui/material";

function debounce(fn, ms) {
let timer;
Expand Down Expand Up @@ -104,7 +105,9 @@ const MeetingRoom = React.memo((props) => {
const pinLayout = (typeof firstPinnedParticipant !== "undefined");

return (
<>
<Container
id="meeting-room"
>
{props?.isRecordPluginActive === true ?
<RecordingButton/> : null
}
Expand Down Expand Up @@ -272,7 +275,7 @@ const MeetingRoom = React.memo((props) => {
handleEffectsOpen={props?.handleEffectsOpen}
globals={props?.globals}
/>
</>
</Container>
);
});

Expand Down
5 changes: 4 additions & 1 deletion react/src/pages/WaitingRoom.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,9 @@ function WaitingRoom(props) {
}

return (
<Container>
<Container
id="waiting-room"
>
<SettingsDialog
open={dialogOpen}
onClose={handleDialogClose}
Expand Down Expand Up @@ -386,6 +388,7 @@ function WaitingRoom(props) {
color="secondary"
sx={roundStyle}
onClick={() => handleDialogOpen()}

Check warning on line 390 in react/src/pages/WaitingRoom.js

View check run for this annotation

Codecov / codecov/patch

react/src/pages/WaitingRoom.js#L390

Added line #L390 was not covered by tests
id="waiting-room-more-options"
>
<SvgIcon size={40} name={"settings"}
color={theme.palette?.iconColor?.primary}/>
Expand Down

0 comments on commit 2fdeb90

Please sign in to comment.