Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
fix(desktop): destroy camera window via tauri command on native preview toggle
Richie McIlroy15d6e8f6c1a6
diff --git a/apps/desktop/src/routes/(window-chrome)/settings/experimental.tsx b/apps/desktop/src/routes/(window-chrome)/settings/experimental.tsxindex bfbec2f6f..4f83f70ed 100644--- a/apps/desktop/src/routes/(window-chrome)/settings/experimental.tsx+++ b/apps/desktop/src/routes/(window-chrome)/settings/experimental.tsx@@ -1,4 +1,3 @@-import { WebviewWindow } from "@tauri-apps/api/webviewWindow";import { type } from "@tauri-apps/plugin-os";import { createResource, Show } from "solid-js";import { createStore } from "solid-js/store";@@ -41,10 +40,9 @@ function Inner(props: {if (key === "enableNativeCameraPreview") {await commands.setCameraInput(null, true);try {- const cameraWindow = await WebviewWindow.getByLabel("camera");- await cameraWindow?.close();+ await commands.destroyCameraWindow();} catch (error) {- console.error("Failed to close camera window", error);+ console.error("Failed to destroy camera window", error);}}};