Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat(desktop): expose Windows WebView2 browser args to webview
Richie McIlroy0fa20fd2b273
diff --git a/apps/desktop/src-tauri/src/windows.rs b/apps/desktop/src-tauri/src/windows.rsindex 07a8ef083..4dec972b3 100644--- a/apps/desktop/src-tauri/src/windows.rs+++ b/apps/desktop/src-tauri/src/windows.rs@@ -3066,10 +3066,16 @@ impl ShowCapWindow {#[cfg(windows)]{+ let browser_args = windows_webview2_browser_args();+ let browser_args_json = serde_json::to_string(&browser_args)+ .expect("Failed to serialize Windows WebView2 browser arguments");builder = builder.decorations(false).zoom_hotkeys_enabled(false)- .additional_browser_args(&windows_webview2_browser_args());+ .additional_browser_args(&browser_args)+ .initialization_script(format!(+ "window.__CAP__ = window.__CAP__ ?? {{}}; window.__CAP__.windowsWebview2BrowserArgs = {browser_args_json};"+ ));}// Linux has no native macOS-style traffic lights, so we drop the windowdiff --git a/apps/desktop/src/global.d.ts b/apps/desktop/src/global.d.tsindex 5b14cb83f..c80c3cd7f 100644--- a/apps/desktop/src/global.d.ts+++ b/apps/desktop/src/global.d.ts@@ -1889,6 +1889,7 @@ declare global {cameraWsPort: number;cameraOnlyMode?: boolean;enableNativeCameraPreview?: boolean;+ windowsWebview2BrowserArgs?: string;};}}