Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Update event names with the format `cap://(category)/(action)`
Ilya0e5644d013a0
diff --git a/apps/desktop/src/components/windows/Camera.tsx b/apps/desktop/src/components/windows/Camera.tsxindex 5f6379700..5a67d0f79 100644--- a/apps/desktop/src/components/windows/Camera.tsx+++ b/apps/desktop/src/components/windows/Camera.tsx@@ -120,7 +120,7 @@ export const Camera = () => {tauriWindowImport.then(async ({ getCurrentWindow }) => {if (emitSetDevice) {- await emit("change-device", {+ await emit("cap://av/set-device", {type: "videoinput",device: null,});@@ -181,7 +181,7 @@ export const Camera = () => {};const select = async (device: Device | null) => {- emit("change-device", { type: "videoinput", device: device }).catch(+ emit("cap://av/set-device", { type: "videoinput", device: device }).catch((error) => console.log("Failed to emit change-device event:", error));};diff --git a/apps/desktop/src/components/windows/inner/Recorder.tsx b/apps/desktop/src/components/windows/inner/Recorder.tsxindex 59ec14898..ee6a0f2fd 100644--- a/apps/desktop/src/components/windows/inner/Recorder.tsx+++ b/apps/desktop/src/components/windows/inner/Recorder.tsx@@ -70,8 +70,8 @@ export const Recorder = () => {}, [proCheckPromise]);const selectDevice = (kind: DeviceKind, device: Device | null) =>- emit("change-device", { type: kind, device: device }).catch((error) =>- console.log("Failed to emit change-device event:", error)+ emit("cap://av/set-device", { type: kind, device: device }).catch((error) =>+ console.log("Failed to emit cap://av/set-device event:", error));const createDeviceMenuOptions = (kind: DeviceKind) => [diff --git a/apps/desktop/src/utils/recording/MediaDeviceContext.tsx b/apps/desktop/src/utils/recording/MediaDeviceContext.tsxindex 057254023..0fd4d9dd0 100644--- a/apps/desktop/src/utils/recording/MediaDeviceContext.tsx+++ b/apps/desktop/src/utils/recording/MediaDeviceContext.tsx@@ -163,7 +163,7 @@ export const MediaDeviceProvider: React.FC<React.PropsWithChildren<{}>> = ({unlistenFnChangeDevice = await listen<{type: string;device: Device | null;- }>("change-device", (event) => {+ }>("cap://av/set-device", (event) => {updateSelectedDevice(event.payload.type as DeviceKind,event.payload.devicediff --git a/apps/desktop/src/utils/tray.ts b/apps/desktop/src/utils/tray.tsindex 3127eed36..5a44cb5c7 100644--- a/apps/desktop/src/utils/tray.ts+++ b/apps/desktop/src/utils/tray.ts@@ -101,6 +101,6 @@ export const setTrayStopIcon = async (showStopIcon: boolean) => {};const selectDevice = (kind: DeviceKind, device: Device | null) =>- emit("change-device", { type: kind, device: device }).catch((error) =>- console.log("Failed to emit change-device event:", error)+ emit("cap://av/set-device", { type: kind, device: device }).catch((error) =>+ console.log("Failed to emit cap://av/set-device event:", error));