keep capturing at the panel rate and name the fps setting after what it does

This commit is contained in:
2026-09-21 06:49:37 +03:00
parent aef64fa4e3
commit a953875405
6 changed files with 14 additions and 68 deletions
+2 -2
View File
@@ -212,7 +212,7 @@
try { crop = await api.getOverlayRect() } catch (e) { errMsg = String(e); return }
}
try {
await api.startCapture({ crop, fps })
await api.startCapture({ crop })
phase = "recording"
tick()
void emit("recording-state", { phase: "recording", fps })
@@ -542,7 +542,7 @@
{/if}
<div class="idle-fps">
<span class="switch-label">Capture FPS</span>
<span class="switch-label">Export FPS</span>
<select bind:value={fps}>
{#each [1, 2, 5, 10, 15, 24, 30, 60] as f}<option value={f}>{f}</option>{/each}
</select>
+1 -5
View File
@@ -10,7 +10,6 @@
let width: number = $state(0)
let height: number = $state(0)
let phase: "idle" | "recording" | "paused" = $state("idle")
let fps: number = $state(30)
let elapsed: number = $state(0)
let timer: number | null = null
let lockedRatio: number | null = $state(null)
@@ -51,9 +50,8 @@
}, 200)
}).then(fn => cleanup.push(fn))
listen<{ phase: "idle"|"recording"|"paused"; fps: number }>(
listen<{ phase: "idle"|"recording"|"paused" }>(
"recording-state", (e) => {
fps = e.payload.fps
if (e.payload.phase === "recording") {
if (phase !== "recording") elapsed = 0
startTimer()
@@ -127,8 +125,6 @@
{phase === "recording" ? "REC" : "PAUSE"}
<span class="sep">/</span>
{elapsed.toFixed(1)}s
<span class="sep">/</span>
{fps}fps
</span>
{/if}
</div>
+1 -1
View File
@@ -143,7 +143,7 @@
</div>
<div class="field-list">
<label class="field">
<span class="field-label">Default FPS</span>
<span class="field-label">Export FPS</span>
<select bind:value={cfg.capture.default_fps}>
{#each [15,24,30,60] as f}<option value={f}>{f} fps</option>{/each}
</select>
-1
View File
@@ -106,7 +106,6 @@ export type RecordedClip = {
export type StartCaptureRequest = {
crop: CaptureRect | null
fps: number
}
export type ExportRequest = {