Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

release: v0.2.1 - fixed recording minimize + add stop recording chime

Richie McIlroye71607f0aa9a
diff --git a/apps/desktop/src/components/windows/inner/Recorder.tsx b/apps/desktop/src/components/windows/inner/Recorder.tsx
index 8af0a81c8..3e0eb6fb5 100644
--- a/apps/desktop/src/components/windows/inner/Recorder.tsx
+++ b/apps/desktop/src/components/windows/inner/Recorder.tsx
@@ -183,7 +183,7 @@ export const Recorder = () => {
tauriWindow.then(({ getAll }) => {
getAll().forEach((window) => {
if (window.label !== "camera") {
- window.hide();
+ window.minimize();
}
});
});
@@ -235,6 +235,13 @@ export const Recorder = () => {
}
setStoppingRecording(true);
+ tauriWindow.then(({ WebviewWindow }) => {
+ const main = WebviewWindow.getByLabel("main");
+ if (main) {
+ main.unminimize();
+ }
+ });
+
try {
console.log("Stopping recordings...");
@@ -253,6 +260,9 @@ export const Recorder = () => {
? `${process.env.NEXT_PUBLIC_URL}/s/${await getLatestVideoId()}`
: `https://cap.link/${await getLatestVideoId()}`;
+ const audio = new Audio("/recording-end.mp3");
+ await audio.play();
+
if (
!process.env.NEXT_PUBLIC_LOCAL_MODE ||
process.env.NEXT_PUBLIC_LOCAL_MODE !== "true"