Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.
TypeScript cross-platformelectronffmpegopen-sourceproduct-demorustscreen-capturescreen-recorderscreen-recordingscreen-studioscreencastspeech-to-texttypescriptvideo-editingvideo-editorwaylandwgpuwhisper
fix(recording): carry the microphone's name, not just its id
EtienneLescot93b519eec310
diff --git a/electron/ipc/handlers.ts b/electron/ipc/handlers.tsindex 1fe1c8c70..ef5086f51 100644--- a/electron/ipc/handlers.ts+++ b/electron/ipc/handlers.ts@@ -75,6 +75,7 @@ import { toHelperRect } from "../native-bridge/helperCoordinates";import {isSalvageableFragmentedCapture,NATIVE_WINDOWS_SALVAGEABLE_OUTPUT_BYTES,+ readMicrophoneDefaulted,readWebcamFormat,readWebcamUnavailable,terminateNativeWindowsCapture,@@ -474,6 +475,18 @@ let currentRecordingSession: RecordingSession | null = null;export interface RecordingPrefs {micEnabled: boolean;micDeviceId: string | null;+ /**+ * The microphone's LABEL, carried beside its id because the native Windows+ * helper selects by name and Chromium selects by id.+ *+ * Without it, a HUD rebuilt for a new recording restored the id and had to+ * re-derive the name from its own `enumerateDevices()` — which needs a full+ * getUserMedia permission round-trip first, and an auto-started recording+ * beat it. The request then went out with no name at all, and the helper+ * answers that by recording the Windows default endpoint instead of the+ * microphone the user picked (getopenscreen/openscreen#404).+ */+ micDeviceName: string | null;camEnabled: boolean;camDeviceId: string | null;systemAudioEnabled: boolean;@@ -482,6 +495,7 @@ export interface RecordingPrefs {let recordingPrefs: RecordingPrefs = {micEnabled: false,micDeviceId: null,+ micDeviceName: null,camEnabled: false,camDeviceId: null,systemAudioEnabled: false,@@ -2459,6 +2473,17 @@ export function registerIpcHandlers(// whose camera is working perfectly.const webcamUnavailable =request.webcam.enabled && readWebcamUnavailable(nativeWindowsCaptureOutput);+ // Same shape as the camera notice: the helper records the Windows+ // default input rather than failing, so this take is usable but is+ // almost certainly the wrong microphone.+ const microphoneDefaulted =+ request.audio.microphone.enabled && readMicrophoneDefaulted(nativeWindowsCaptureOutput);+ if (microphoneDefaulted) {+ console.warn("[native-wgc] recording the default input; the microphone was not named", {+ deviceId: request.audio.microphone.deviceId,+ deviceName: request.audio.microphone.deviceName,+ });+ }if (webcamUnavailable) {console.warn("[native-wgc] recording without a camera; the helper could not open it", {deviceId: request.webcam.deviceId,@@ -2473,6 +2498,7 @@ export function registerIpcHandlers(helperPath,videoEncoderSelection: encoderSelection?.video ?? null,webcamUnavailable,+ microphoneDefaulted,};} catch (error) {console.error("Failed to start native Windows recording:", error);diff --git a/electron/native/wgc-capture/src/wasapi_loopback_capture.cpp b/electron/native/wgc-capture/src/wasapi_loopback_capture.cppindex 0256b0425..a65031e83 100644--- a/electron/native/wgc-capture/src/wasapi_loopback_capture.cpp+++ b/electron/native/wgc-capture/src/wasapi_loopback_capture.cpp@@ -168,6 +168,18 @@ bool WasapiLoopbackCapture::initialize(WasapiCaptureEndpoint endpoint, const std}}+ // A microphone was asked for and neither its id nor its name could name a+ // device, so the recording is about to capture whatever Windows calls the+ // default input. That is worth saying out loud: the caller sends an empty+ // name whenever it could not resolve one in time, and the take then sounds+ // like the wrong microphone with nothing anywhere explaining why+ // (getopenscreen/openscreen#404).+ if (endpoint == WasapiCaptureEndpoint::Microphone && !device_ && deviceName.empty()) {+ std::cerr << "{\"event\":\"warning\",\"code\":\"microphone-defaulted\","+ "\"message\":\"No microphone name was supplied; capturing the default input\"}"+ << std::endl;+ }+if (!device_) {const EDataFlow flow =endpoint == WasapiCaptureEndpoint::SystemLoopback ? eRender : eCapture;diff --git a/electron/recording/nativeWindowsCaptureStop.test.ts b/electron/recording/nativeWindowsCaptureStop.test.tsindex acbee862e..224b3d972 100644--- a/electron/recording/nativeWindowsCaptureStop.test.ts+++ b/electron/recording/nativeWindowsCaptureStop.test.ts@@ -5,6 +5,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";import {isSalvageableFragmentedCapture,NATIVE_WINDOWS_SALVAGEABLE_OUTPUT_BYTES,+ readMicrophoneDefaulted,readStoppedPath,readWebcamFormat,readWebcamUnavailable,@@ -99,6 +100,21 @@ describe("readWebcamUnavailable", () => {});});+describe("readMicrophoneDefaulted", () => {+ it("sees the helper falling back to the default input", () => {+ const output =+ "WARNING: Could not resolve microphone by name; using default capture endpoint\n" ++ '{"event":"warning","code":"microphone-defaulted","message":"No microphone name was supplied; capturing the default input"}\n';+ expect(readMicrophoneDefaulted(output)).toBe(true);+ });++ it("is false when the requested microphone was found", () => {+ const output =+ '{"event":"audio-format","schemaVersion":2,"microphone":true,"microphoneDeviceName":"Microphone (Logitech PRO X)"}\n';+ expect(readMicrophoneDefaulted(output)).toBe(false);+ });+});+describe("readWebcamFormat", () => {it("reads the negotiated camera format", () => {const output =diff --git a/electron/recording/nativeWindowsCaptureStop.ts b/electron/recording/nativeWindowsCaptureStop.tsindex 24f047f3b..f472cad71 100644--- a/electron/recording/nativeWindowsCaptureStop.ts+++ b/electron/recording/nativeWindowsCaptureStop.ts@@ -109,6 +109,19 @@ export function readWebcamUnavailable(output: string) {return output.includes('"code":"webcam-unavailable"');}+/**+ * Did the helper record the Windows default input instead of the microphone+ * that was asked for?+ *+ * It falls back rather than failing, which is right — a take with the wrong+ * microphone still holds the screen and the moment. But it used to fall back in+ * silence, and the only symptom was a recording that sounded wrong+ * (getopenscreen/openscreen#404).+ */+export function readMicrophoneDefaulted(output: string) {+ return output.includes('"code":"microphone-defaulted"');+}+/*** Index of the `}` that closes the object starting at `start`, or -1.*diff --git a/src/components/ai-edition/v4/RecStage.tsx b/src/components/ai-edition/v4/RecStage.tsxindex af8405711..8564d4895 100644--- a/src/components/ai-edition/v4/RecStage.tsx+++ b/src/components/ai-edition/v4/RecStage.tsx@@ -23,6 +23,7 @@ import styles from "./EditorShellV4.module.css";interface RecordingPrefsState {micEnabled: boolean;micDeviceId: string | null;+ micDeviceName: string | null;camEnabled: boolean;camDeviceId: string | null;systemAudioEnabled: boolean;@@ -32,6 +33,7 @@ interface RecordingPrefsState {const DEFAULT_PREFS: RecordingPrefsState = {micEnabled: false,micDeviceId: null,+ micDeviceName: null,camEnabled: false,camDeviceId: null,systemAudioEnabled: false,@@ -272,8 +274,16 @@ export function RecStage({className={styles.recSelect}value={prefs.micDeviceId ?? micDevices.selectedDeviceId}onChange={(e) => {- micDevices.setSelectedDeviceId(e.target.value);- updatePrefs({ micDeviceId: e.target.value });+ 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) => (diff --git a/src/components/launch/LaunchWindow.tsx b/src/components/launch/LaunchWindow.tsxindex 14046bc39..68f1c6645 100644--- a/src/components/launch/LaunchWindow.tsx+++ b/src/components/launch/LaunchWindow.tsx@@ -160,7 +160,7 @@ export function LaunchWindow() {devices: micDevices,selectedDeviceId: selectedMicId,setSelectedDeviceId: setSelectedMicId,- } = useMicrophoneDevices(microphoneEnabled || isDeviceSettingsOpen);+ } = useMicrophoneDevices(microphoneEnabled || isDeviceSettingsOpen, microphoneDeviceId);useEffect(() => {if (selectedMicId && selectedMicId !== "default") {@@ -649,10 +649,15 @@ export function LaunchWindow() {* previous device. Best-effort on purpose: failing to persist a preference* must not stop a recording.*/- const persistCameraPrefs = useCallback(- (patch: { camEnabled?: boolean; camDeviceId?: string }) => {+ const persistRecordingPrefs = useCallback(+ (patch: {+ camEnabled?: boolean;+ camDeviceId?: string;+ micDeviceId?: string;+ micDeviceName?: string;+ }) => {void window.electronAPI?.setRecordingPrefs?.(patch).catch((error) => {- console.warn("Failed to persist the camera preference:", error);+ console.warn("Failed to persist the device preference:", error);});},[],@@ -662,9 +667,9 @@ export function LaunchWindow() {if (controlsLocked) return;const next = !webcamEnabled;void setWebcamEnabled(next).then((ok) => {- if (ok) persistCameraPrefs({ camEnabled: next });+ if (ok) persistRecordingPrefs({ camEnabled: next });});- }, [controlsLocked, persistCameraPrefs, setWebcamEnabled, webcamEnabled]);+ }, [controlsLocked, persistRecordingPrefs, setWebcamEnabled, webcamEnabled]);// Selecting a device never switches it on. If the device is already live the// recorder re-acquires on the id change; if it isn't, this just records which@@ -674,8 +679,9 @@ export function LaunchWindow() {setSelectedMicId(device.deviceId);setMicrophoneDeviceId(device.deviceId);setMicrophoneDeviceName(device.label);+ persistRecordingPrefs({ micDeviceId: device.deviceId, micDeviceName: device.label });},- [setMicrophoneDeviceId, setMicrophoneDeviceName, setSelectedMicId],+ [persistRecordingPrefs, setMicrophoneDeviceId, setMicrophoneDeviceName, setSelectedMicId],);const handleSelectCameraDevice = useCallback(@@ -683,9 +689,9 @@ export function LaunchWindow() {setSelectedCameraId(device.deviceId);setWebcamDeviceId(device.deviceId);setWebcamDeviceName(device.label);- persistCameraPrefs({ camDeviceId: device.deviceId });+ persistRecordingPrefs({ camDeviceId: device.deviceId });},- [persistCameraPrefs, setSelectedCameraId, setWebcamDeviceId, setWebcamDeviceName],+ [persistRecordingPrefs, setSelectedCameraId, setWebcamDeviceId, setWebcamDeviceName],);const toggleDeviceSettings = useCallback(() => {diff --git a/src/hooks/useMicrophoneDevices.ts b/src/hooks/useMicrophoneDevices.tsindex 37591e669..94ffe2eb0 100644--- a/src/hooks/useMicrophoneDevices.ts+++ b/src/hooks/useMicrophoneDevices.ts@@ -6,7 +6,14 @@ export interface MicrophoneDevice {groupId: string;}-export function useMicrophoneDevices(enabled: boolean = true) {+/**+ * @param preferredDeviceId The microphone the session already settled on —+ * normally the one restored from the recording prefs. It outranks "first in the+ * list", which is the OS enumeration order and has nothing to do with what the+ * user chose. The HUD window is destroyed and rebuilt for every recording, so+ * without this its pick reverted on each take.+ */+export function useMicrophoneDevices(enabled: boolean = true, preferredDeviceId?: string) {const [devices, setDevices] = useState<MicrophoneDevice[]>([]);const [selectedDeviceId, setSelectedDeviceId] = useState<string>("default");const [isLoading, setIsLoading] = useState(false);@@ -15,7 +22,15 @@ export function useMicrophoneDevices(enabled: boolean = true) {// this very effect, so depending on it re-ran the whole load — a second// getUserMedia() permission stream acquired and torn down on every open.const selectedDeviceIdRef = useRef(selectedDeviceId);- selectedDeviceIdRef.current = selectedDeviceId;+ const preferredDeviceIdRef = useRef(preferredDeviceId);+ // Synchronised in an effect rather than during render: React may discard a+ // render without committing it, and a ref written there keeps the value+ // anyway, which would resolve the selection against a device the committed+ // tree never agreed on.+ useEffect(() => {+ selectedDeviceIdRef.current = selectedDeviceId;+ preferredDeviceIdRef.current = preferredDeviceId;+ }, [selectedDeviceId, preferredDeviceId]);useEffect(() => {if (!enabled) {@@ -49,7 +64,11 @@ export function useMicrophoneDevices(enabled: boolean = true) {const currentId = selectedDeviceIdRef.current;const stillAvailable = audioInputs.some((d) => d.deviceId === currentId);if ((currentId === "default" || !stillAvailable) && audioInputs.length > 0) {- setSelectedDeviceId(audioInputs[0].deviceId);+ const preferredId = preferredDeviceIdRef.current;+ const preferred = preferredId+ ? audioInputs.find((d) => d.deviceId === preferredId)+ : undefined;+ setSelectedDeviceId(preferred?.deviceId ?? audioInputs[0].deviceId);}setIsLoading(false);}diff --git a/src/hooks/useScreenRecorder.ts b/src/hooks/useScreenRecorder.tsindex 5668b0f92..14eec5ab4 100644--- a/src/hooks/useScreenRecorder.ts+++ b/src/hooks/useScreenRecorder.ts@@ -232,6 +232,12 @@ export function useScreenRecorder(): UseScreenRecorderReturn {if (cancelled || !prefs) return;setMicrophoneEnabled(prefs.micEnabled);if (prefs.micDeviceId) setMicrophoneDeviceId(prefs.micDeviceId);+ // The name matters as much as the id: the native Windows helper picks+ // the microphone by NAME, and falls back to the Windows default+ // endpoint when it is empty. Seeding only the id left an auto-started+ // recording racing this window's own device enumeration for it, and+ // losing (getopenscreen/openscreen#404).+ if (prefs.micDeviceName) setMicrophoneDeviceName(prefs.micDeviceName);setWebcamEnabledState(prefs.camEnabled);if (prefs.camDeviceId) setWebcamDeviceId(prefs.camDeviceId);setSystemAudioEnabled(prefs.systemAudioEnabled);@@ -1164,6 +1170,9 @@ export function useScreenRecorder(): UseScreenRecorderReturn {if (result.webcamUnavailable) {toast.error(t("recording.cameraCaptureUnavailable"));}+ if (result.microphoneDefaulted) {+ toast.error(t("recording.microphoneDefaulted"));+ }// Tell the user when the helper silently switched away from the default// GPU encoder; an explicit software-preferred selection needs no notice.diff --git a/src/i18n/locales/ar/editor.json b/src/i18n/locales/ar/editor.jsonindex 02223d13d..b472ea7dc 100644--- a/src/i18n/locales/ar/editor.json+++ b/src/i18n/locales/ar/editor.json@@ -43,6 +43,7 @@"cameraDisconnected": "تم فصل كاميرا الويب.","cameraNotFound": "لم يتم العثور على كاميرا.","cameraCaptureUnavailable": "تعذّر فتح الكاميرا. يجري التسجيل بدون كاميرا.",+ "microphoneDefaulted": "تعذّر تحديد الميكروفون المحدَّد؛ يجري التسجيل من الإدخال الافتراضي.","permissionDenied": "تم رفض إذن التسجيل. يرجى السماح بتسجيل الشاشة.","accessibilityAllowAndRetry": "اسمح بوصول تسهيلات الاستخدام لـ OpenScreen، ثم اضغط على التسجيل مرة أخرى لبدء العد التنازلي.","selectSource": "يرجى تحديد مصدر للتسجيل"diff --git a/src/i18n/locales/en/editor.json b/src/i18n/locales/en/editor.jsonindex 739c637b1..10d8ef618 100644--- a/src/i18n/locales/en/editor.json+++ b/src/i18n/locales/en/editor.json@@ -43,6 +43,7 @@"cameraDisconnected": "Webcam disconnected.","cameraNotFound": "Camera not found.","cameraCaptureUnavailable": "The camera could not be opened. Recording without it.",+ "microphoneDefaulted": "The chosen microphone could not be identified. Recording the default input.","permissionDenied": "Recording permission denied. Please allow screen recording.","accessibilityAllowAndRetry": "Allow Accessibility access for OpenScreen, then press record again to start the countdown.","selectSource": "Please select a source to record"diff --git a/src/i18n/locales/es/editor.json b/src/i18n/locales/es/editor.jsonindex 4d8822158..1b8dadafd 100644--- a/src/i18n/locales/es/editor.json+++ b/src/i18n/locales/es/editor.json@@ -35,6 +35,7 @@"cameraDisconnected": "Cámara web desconectada.","cameraNotFound": "Cámara no encontrada.","cameraCaptureUnavailable": "No se pudo abrir la cámara. Grabando sin ella.",+ "microphoneDefaulted": "No se pudo identificar el micrófono elegido. Grabando la entrada predeterminada.","permissionDenied": "Permiso de grabación denegado. Por favor permite la grabación de pantalla.","accessibilityAllowAndRetry": "Permite el acceso de accesibilidad para OpenScreen y luego pulsa grabar de nuevo para iniciar la cuenta atrás.","selectSource": "Por favor selecciona una fuente para grabar"diff --git a/src/i18n/locales/fr/editor.json b/src/i18n/locales/fr/editor.jsonindex d560fa07b..333298dd7 100644--- a/src/i18n/locales/fr/editor.json+++ b/src/i18n/locales/fr/editor.json@@ -41,6 +41,7 @@"cameraDisconnected": "Webcam déconnectée.","cameraNotFound": "Caméra introuvable.","cameraCaptureUnavailable": "Impossible d'ouvrir la caméra. Enregistrement sans elle.",+ "microphoneDefaulted": "Micro choisi non identifié. Enregistrement de l'entrée par défaut.","permissionDenied": "Permission d'enregistrement refusée. Veuillez autoriser l'enregistrement d'écran.","accessibilityAllowAndRetry": "Autorisez l'accès Accessibilité pour OpenScreen, puis appuyez de nouveau sur enregistrer pour lancer le compte à rebours.","selectSource": "Veuillez sélectionner une source à enregistrer"diff --git a/src/i18n/locales/it/editor.json b/src/i18n/locales/it/editor.jsonindex ba0afe4db..0d4df5c7f 100644--- a/src/i18n/locales/it/editor.json+++ b/src/i18n/locales/it/editor.json@@ -43,6 +43,7 @@"cameraDisconnected": "Webcam disconnessa.","cameraNotFound": "Fotocamera non trovata.","cameraCaptureUnavailable": "Impossibile aprire la fotocamera. Registrazione senza di essa.",+ "microphoneDefaulted": "Impossibile identificare il microfono scelto. Registrazione dall'ingresso predefinito.","permissionDenied": "Autorizzazione di registrazione negata. Consenti la registrazione dello schermo.","accessibilityAllowAndRetry": "Consenti l'accesso all'accessibilità per OpenScreen, poi premi di nuovo registra per avviare il conto alla rovescia.","selectSource": "Seleziona una sorgente da registrare"diff --git a/src/i18n/locales/ja-JP/editor.json b/src/i18n/locales/ja-JP/editor.jsonindex 946d62ebd..3b48038c1 100644--- a/src/i18n/locales/ja-JP/editor.json+++ b/src/i18n/locales/ja-JP/editor.json@@ -44,6 +44,7 @@"cameraDisconnected": "ウェブカメラが切断されました。","cameraNotFound": "カメラが見つかりません。","cameraCaptureUnavailable": "カメラを開けませんでした。カメラなしで録画します。",+ "microphoneDefaulted": "選択したマイクを特定できませんでした。既定の入力を録音します。","accessibilityAllowAndRetry": "OpenScreenにアクセシビリティアクセスを許可してから、もう一度録画を押してカウントダウンを開始してください。","selectSource": "録画するソースを選択してください"},diff --git a/src/i18n/locales/ko-KR/editor.json b/src/i18n/locales/ko-KR/editor.jsonindex def66d9d4..dabd14757 100644--- a/src/i18n/locales/ko-KR/editor.json+++ b/src/i18n/locales/ko-KR/editor.json@@ -44,6 +44,7 @@"cameraDisconnected": "웹캠 연결이 끊어졌습니다.","cameraNotFound": "카메라를 찾을 수 없습니다.","cameraCaptureUnavailable": "카메라를 열 수 없습니다. 카메라 없이 녹화합니다.",+ "microphoneDefaulted": "선택한 마이크를 확인할 수 없습니다. 기본 입력을 녹음합니다.","accessibilityAllowAndRetry": "OpenScreen의 손쉬운 사용 접근을 허용한 다음, 카운트다운을 시작하려면 다시 녹화를 누르세요.","selectSource": "녹화할 소스를 선택해 주세요"},diff --git a/src/i18n/locales/pt-BR/editor.json b/src/i18n/locales/pt-BR/editor.jsonindex a8870b0f7..d65fd23d2 100644--- a/src/i18n/locales/pt-BR/editor.json+++ b/src/i18n/locales/pt-BR/editor.json@@ -43,6 +43,7 @@"cameraDisconnected": "Webcam desconectada.","cameraNotFound": "Câmera não encontrada.","cameraCaptureUnavailable": "Não foi possível abrir a câmera. Gravando sem ela.",+ "microphoneDefaulted": "Não foi possível identificar o microfone escolhido. Gravando a entrada padrão.","permissionDenied": "Permissão de gravação negada. Por favor, permita a gravação de tela.","accessibilityAllowAndRetry": "Permita o acesso de Acessibilidade para o OpenScreen e pressione gravar novamente para iniciar a contagem regressiva.","selectSource": "Por favor, selecione uma fonte para gravar"diff --git a/src/i18n/locales/ru/editor.json b/src/i18n/locales/ru/editor.jsonindex dd06f469f..11eeda92b 100644--- a/src/i18n/locales/ru/editor.json+++ b/src/i18n/locales/ru/editor.json@@ -43,6 +43,7 @@"cameraDisconnected": "Веб-камера отключена.","cameraNotFound": "Камера не найдена.","cameraCaptureUnavailable": "Не удалось открыть камеру. Запись идёт без неё.",+ "microphoneDefaulted": "Не удалось определить выбранный микрофон. Записывается вход по умолчанию.","permissionDenied": "Разрешение на запись запрещено. Пожалуйста, разрешите запись экрана.","accessibilityAllowAndRetry": "Разрешите OpenScreen доступ к Универсальному доступу, затем снова нажмите запись, чтобы начать обратный отсчет.","selectSource": "Пожалуйста, выберите источник для записи"diff --git a/src/i18n/locales/tr/editor.json b/src/i18n/locales/tr/editor.jsonindex f19f4a0f0..b0a42ca3b 100644--- a/src/i18n/locales/tr/editor.json+++ b/src/i18n/locales/tr/editor.json@@ -36,6 +36,7 @@"cameraDisconnected": "Webcam bağlantısı kesildi.","cameraNotFound": "Kamera bulunamadı.","cameraCaptureUnavailable": "Kamera açılamadı. Kamerasız kaydediliyor.",+ "microphoneDefaulted": "Seçilen mikrofon belirlenemedi. Varsayılan giriş kaydediliyor.","accessibilityAllowAndRetry": "OpenScreen için Erişilebilirlik erişimine izin verin, ardından geri sayımı başlatmak için tekrar kayda basın.","selectSource": "Lütfen kayıt için bir kaynak seçin"},diff --git a/src/i18n/locales/vi/editor.json b/src/i18n/locales/vi/editor.jsonindex 4527cb0a3..2e61a7c40 100644--- a/src/i18n/locales/vi/editor.json+++ b/src/i18n/locales/vi/editor.json@@ -43,6 +43,7 @@"cameraDisconnected": "Webcam bị ngắt kết nối.","cameraNotFound": "Không tìm thấy máy ảnh.","cameraCaptureUnavailable": "Không thể mở máy ảnh. Đang ghi mà không có máy ảnh.",+ "microphoneDefaulted": "Không xác định được micrô đã chọn. Đang ghi từ đầu vào mặc định.","permissionDenied": "Quyền ghi hình bị từ chối. Vui lòng cho phép ghi màn hình.","accessibilityAllowAndRetry": "Cho phép OpenScreen truy cập Trợ năng, sau đó nhấn ghi lại để bắt đầu đếm ngược.","selectSource": "Vui lòng chọn một nguồn để ghi"diff --git a/src/i18n/locales/zh-CN/editor.json b/src/i18n/locales/zh-CN/editor.jsonindex 75098e96a..2e52b942e 100644--- a/src/i18n/locales/zh-CN/editor.json+++ b/src/i18n/locales/zh-CN/editor.json@@ -43,6 +43,7 @@"cameraDisconnected": "摄像头已断开连接。","cameraNotFound": "未找到摄像头。","cameraCaptureUnavailable": "无法打开摄像头,正在不使用摄像头录制。",+ "microphoneDefaulted": "无法识别所选麦克风,正在录制默认输入设备。","permissionDenied": "录屏权限被拒绝。请允许屏幕录制。","accessibilityAllowAndRetry": "允许 OpenScreen 使用辅助功能权限,然后再次按录制以开始倒计时。","selectSource": "请选择要录制的源"diff --git a/src/i18n/locales/zh-TW/editor.json b/src/i18n/locales/zh-TW/editor.jsonindex 42ad87119..032bb91e5 100644--- a/src/i18n/locales/zh-TW/editor.json+++ b/src/i18n/locales/zh-TW/editor.json@@ -44,6 +44,7 @@"cameraDisconnected": "網路攝影機已中斷連線。","cameraNotFound": "找不到攝影機。","cameraCaptureUnavailable": "無法開啟攝影機,將在沒有攝影機的情況下錄製。",+ "microphoneDefaulted": "無法辨識所選麥克風,將錄製預設輸入裝置。","accessibilityAllowAndRetry": "允許 OpenScreen 使用輔助使用權限,然後再次按下錄製以開始倒數。","selectSource": "請選擇要錄製的來源"},diff --git a/src/lib/nativeWindowsRecording.ts b/src/lib/nativeWindowsRecording.tsindex 5f6af14e2..e9e8c0c50 100644--- a/src/lib/nativeWindowsRecording.ts+++ b/src/lib/nativeWindowsRecording.ts@@ -53,6 +53,12 @@ export type NativeWindowsRecordingStartResult = {* but the user has to be told, or they discover it in the editor.*/webcamUnavailable?: boolean;+ /**+ * A microphone was asked for but could not be named, so the helper captured+ * whatever Windows calls the default input. The take is fine; the voice on it+ * probably is not the one the user chose.+ */+ microphoneDefaulted?: boolean;};export function parseWindowHandleFromSourceId(sourceId?: string | null) {diff --git a/src/native/browserShim.ts b/src/native/browserShim.tsindex cb1ada739..17a5e315a 100644--- a/src/native/browserShim.ts+++ b/src/native/browserShim.ts@@ -42,6 +42,7 @@ let shimSelectedSource: ShimDesktopSource | null = null;type ShimRecordingPrefs = {micEnabled: boolean;micDeviceId: string | null;+ micDeviceName: string | null;camEnabled: boolean;camDeviceId: string | null;systemAudioEnabled: boolean;@@ -51,6 +52,7 @@ const recordingPrefsStorageKey = "browser-shim-recording-prefs";let shimRecordingPrefs: ShimRecordingPrefs = {micEnabled: false,micDeviceId: null,+ micDeviceName: null,camEnabled: false,camDeviceId: null,systemAudioEnabled: false,