Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(rec): the microphone can't be disabled in the Studio Rec tab

Benjamin Freeman10e2bef708e2
diff --git a/src/components/ai-edition/v4/EditorShellV4.module.css b/src/components/ai-edition/v4/EditorShellV4.module.css
index fe4d0cf60..787d42292 100644
--- a/src/components/ai-edition/v4/EditorShellV4.module.css
+++ b/src/components/ai-edition/v4/EditorShellV4.module.css
@@ -950,6 +950,24 @@
border-radius: 50%;
background: var(--danger);
}
+/* Mic level lives on the preview (bottom-left), not in the settings row — that
+ keeps the microphone row as compact as the others so its On/Off toggle is
+ always in view (issue #624). */
+.recMicMeter {
+ position: absolute;
+ left: 16px;
+ bottom: 16px;
+ display: inline-flex;
+ align-items: center;
+ gap: 8px;
+ padding: 6px 10px;
+ border-radius: 9999px;
+ background: rgba(8, 10, 13, 0.5);
+ backdrop-filter: blur(12px);
+ -webkit-backdrop-filter: blur(12px);
+ border: 1px solid rgba(255, 255, 255, 0.14);
+ color: #fff;
+}
.recPanel {
width: 360px;
flex-shrink: 0;
@@ -999,6 +1017,9 @@
display: flex;
align-items: center;
gap: 10px;
+ /* Let the control group shrink within the row so a long device name in the
+ dropdown can't push the On/Off toggle off the panel edge (issue #624). */
+ min-width: 0;
}
.recRowMuted {
display: inline-flex;
@@ -1035,6 +1056,11 @@
.recSelect {
height: 32px;
max-width: 200px;
+ /* Absorb the row's shrink and truncate a long device name instead of forcing
+ the row wider than the panel and clipping the toggle. */
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
padding: 0 8px;
border-radius: 9px;
border: 1px solid var(--border);
@@ -1052,6 +1078,9 @@
align-items: center;
justify-content: center;
min-width: 44px;
+ /* The toggle keeps its size; the device dropdown yields space instead, so the
+ On/Off control is always fully visible (issue #624). */
+ flex-shrink: 0;
height: 28px;
padding: 0 10px;
border-radius: 8px;
diff --git a/src/components/ai-edition/v4/RecStage.tsx b/src/components/ai-edition/v4/RecStage.tsx
index 8564d4895..9ad6975ad 100644
--- a/src/components/ai-edition/v4/RecStage.tsx
+++ b/src/components/ai-edition/v4/RecStage.tsx
@@ -202,6 +202,12 @@ export function RecStage({
<span className={styles.recDot} aria-hidden />
<span>{sourceLabel}</span>
</div>
+ {prefs.micEnabled && (
+ <div className={styles.recMicMeter}>
+ <MicOn size={13} />
+ <AudioLevelMeter level={micLevel} className={styles.recLevelMeter} />
+ </div>
+ )}
</div>
</div>
@@ -263,38 +269,35 @@ export function RecStage({
</div>
<div className={styles.recRowControl}>
{prefs.micEnabled ? (
- <>
- {micDevices.isLoading ? (
- <span className={styles.recRowMuted}>
- <Loader2 size={13} className="animate-spin" />
- {t("rec.loading")}
- </span>
- ) : (
- <select
- className={styles.recSelect}
- value={prefs.micDeviceId ?? micDevices.selectedDeviceId}
- onChange={(e) => {
- const deviceId = e.target.value;
- micDevices.setSelectedDeviceId(deviceId);
- // The label travels with the id: the native Windows
- // helper selects a microphone by NAME, and records the
- // Windows default endpoint when it is missing.
- updatePrefs({
- micDeviceId: deviceId,
- micDeviceName:
- micDevices.devices.find((d) => d.deviceId === deviceId)?.label ?? null,
- });
- }}
- >
- {micDevices.devices.map((d) => (
- <option key={d.deviceId} value={d.deviceId}>
- {d.label}
- </option>
- ))}
- </select>
- )}
- <AudioLevelMeter level={micLevel} className={styles.recLevelMeter} />
- </>
+ micDevices.isLoading ? (
+ <span className={styles.recRowMuted}>
+ <Loader2 size={13} className="animate-spin" />
+ {t("rec.loading")}
+ </span>
+ ) : (
+ <select
+ className={styles.recSelect}
+ value={prefs.micDeviceId ?? micDevices.selectedDeviceId}
+ onChange={(e) => {
+ const deviceId = e.target.value;
+ micDevices.setSelectedDeviceId(deviceId);
+ // The label travels with the id: the native Windows
+ // helper selects a microphone by NAME, and records the
+ // Windows default endpoint when it is missing.
+ updatePrefs({
+ micDeviceId: deviceId,
+ micDeviceName:
+ micDevices.devices.find((d) => d.deviceId === deviceId)?.label ?? null,
+ });
+ }}
+ >
+ {micDevices.devices.map((d) => (
+ <option key={d.deviceId} value={d.deviceId}>
+ {d.label}
+ </option>
+ ))}
+ </select>
+ )
) : null}
<button
type="button"