Skip to content

Commit f7a00e1

Browse files
authored
Merge pull request #8 from SableClient/rnnoise
Rnnoise
2 parents 38cc9f6 + e50c950 commit f7a00e1

5 files changed

Lines changed: 21 additions & 21 deletions

File tree

src/button/Button.tsx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,49 +22,49 @@ import {
2222
import styles from "./Button.module.css";
2323

2424
interface MicButtonProps extends ComponentPropsWithoutRef<"button"> {
25-
muted: boolean;
25+
enabled: boolean;
2626
size?: "sm" | "lg";
2727
}
2828

29-
export const MicButton: FC<MicButtonProps> = ({ muted, ...props }) => {
29+
export const MicButton: FC<MicButtonProps> = ({ enabled, ...props }) => {
3030
const { t } = useTranslation();
31-
const Icon = muted ? MicOffSolidIcon : MicOnSolidIcon;
32-
const label = muted
33-
? t("unmute_microphone_button_label")
34-
: t("mute_microphone_button_label");
31+
const Icon = enabled ? MicOnSolidIcon : MicOffSolidIcon;
32+
const label = enabled
33+
? t("mute_microphone_button_label")
34+
: t("unmute_microphone_button_label");
3535

3636
return (
3737
<Tooltip label={label}>
3838
<CpdButton
3939
iconOnly
4040
aria-label={label}
4141
Icon={Icon}
42-
kind={muted ? "primary" : "secondary"}
42+
kind={enabled ? "primary" : "secondary"}
4343
{...props}
4444
/>
4545
</Tooltip>
4646
);
4747
};
4848

4949
interface VideoButtonProps extends ComponentPropsWithoutRef<"button"> {
50-
muted: boolean;
50+
enabled: boolean;
5151
size?: "sm" | "lg";
5252
}
5353

54-
export const VideoButton: FC<VideoButtonProps> = ({ muted, ...props }) => {
54+
export const VideoButton: FC<VideoButtonProps> = ({ enabled, ...props }) => {
5555
const { t } = useTranslation();
56-
const Icon = muted ? VideoCallOffSolidIcon : VideoCallSolidIcon;
57-
const label = muted
58-
? t("start_video_button_label")
59-
: t("stop_video_button_label");
56+
const Icon = enabled ? VideoCallSolidIcon : VideoCallOffSolidIcon;
57+
const label = enabled
58+
? t("stop_video_button_label")
59+
: t("start_video_button_label");
6060

6161
return (
6262
<Tooltip label={label}>
6363
<CpdButton
6464
iconOnly
6565
aria-label={label}
6666
Icon={Icon}
67-
kind={muted ? "primary" : "secondary"}
67+
kind={enabled ? "primary" : "secondary"}
6868
{...props}
6969
/>
7070
</Tooltip>

src/room/InCallView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -645,15 +645,15 @@ export const InCallView: FC<InCallViewProps> = ({
645645
<MicButton
646646
size={buttonSize}
647647
key="audio"
648-
muted={!audioEnabled}
648+
enabled={audioEnabled}
649649
onClick={toggleAudio ?? undefined}
650650
disabled={toggleAudio === null}
651651
data-testid="incall_mute"
652652
/>,
653653
<VideoButton
654654
size={buttonSize}
655655
key="video"
656-
muted={!videoEnabled}
656+
enabled={videoEnabled}
657657
onClick={toggleVideo ?? undefined}
658658
disabled={toggleVideo === null}
659659
data-testid="incall_videomute"

src/room/LobbyView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,12 @@ export const LobbyView: FC<Props> = ({
230230
{recentsButtonInFooter && recentsButton}
231231
<div className={inCallStyles.buttons}>
232232
<MicButton
233-
muted={!audioEnabled}
233+
enabled={audioEnabled}
234234
onClick={toggleAudio ?? undefined}
235235
disabled={toggleAudio === null}
236236
/>
237237
<VideoButton
238-
muted={!videoEnabled}
238+
enabled={videoEnabled}
239239
onClick={toggleVideo ?? undefined}
240240
disabled={toggleVideo === null}
241241
/>

src/room/__snapshots__/InCallView.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ exports[`InCallView > rendering > renders 1`] = `
289289
aria-label="Unmute microphone"
290290
aria-labelledby="_r_8_"
291291
class="_button_13vu4_8 _has-icon_13vu4_60 _icon-only_13vu4_53"
292-
data-kind="primary"
292+
data-kind="secondary"
293293
data-size="lg"
294294
data-testid="incall_mute"
295295
role="button"
@@ -313,7 +313,7 @@ exports[`InCallView > rendering > renders 1`] = `
313313
aria-label="Start video"
314314
aria-labelledby="_r_d_"
315315
class="_button_13vu4_8 _has-icon_13vu4_60 _icon-only_13vu4_53"
316-
data-kind="primary"
316+
data-kind="secondary"
317317
data-size="lg"
318318
data-testid="incall_videomute"
319319
role="button"

src/settings/settings.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export const videoInput = new Setting<string | undefined>(
118118
export const backgroundBlur = new Setting<boolean>("background-blur", false);
119119
export const rnnoiseNoiseSuppression = new Setting<boolean>(
120120
"rnnoise-noise-suppression",
121-
false,
121+
true,
122122
);
123123
export const rnnoiseNoiseSuppressionPreset =
124124
new Setting<RNNoiseSuppressionPreset>(

0 commit comments

Comments
 (0)