190 Commits

Author SHA1 Message Date
huanld a235a0c50b Add automatic update checks
CI / Lint (push) Waiting to run
CI / Type Check (push) Waiting to run
CI / Test (push) Waiting to run
CI / Build (push) Waiting to run
2026-06-05 10:54:22 +07:00
huanld 6ebabbaaaa Defer guide OCR to generate progress
CI / Lint (push) Has been cancelled
CI / Type Check (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled
2026-05-28 21:05:39 +07:00
huanld 0bd26eebf7 Track guide OCR snapshot progress 2026-05-28 19:35:42 +07:00
huanld cce81dd7c4 Add Windows OCR service installer 2026-05-28 19:01:34 +07:00
huanld 7823507a18 Fix Windows native capture state and monitor adapter 2026-05-28 13:22:24 +07:00
huanld 0b78ff6f7d Release OpenScreen 1.4.4 2026-05-28 12:25:23 +07:00
huanld 198dc022b0 Release OpenScreen 1.4.2 2026-05-28 10:01:22 +07:00
huanld 69804c41c7 Release OpenScreen 1.4.1 2026-05-28 08:52:11 +07:00
huanld 24a16c693a Add auto guide generation with bundled OCR 2026-05-28 07:07:30 +07:00
neurot1cal f3c5b8a65d fix: harden streaming lifecycle and lift it out of the IPC god-module
Addresses the review feedback on #658 (CodeRabbit + Codex) and the
structural notes from the quality pass.

Correctness:
- Compute the recorder's streaming state at finalize time, not at
  construction. A stream that fails to open is now reported as
  not-streamed, so its buffered chunks are saved as a complete in-memory
  fallback instead of being dropped (was total data loss on open failure).
- Await every in-flight chunk write before onstop resolves, so the main
  process never closes the write stream while a final chunk is still in
  flight (was truncating the tail of a recording under load).
- Open the disk write stream by awaiting its 'open' event, so a bad path
  or permission error rejects up front instead of being acknowledged as
  success and then silently dropping bytes.
- Close the stream and remove the partial file when a streamed recording
  is discarded or fails, so cancelled/failed runs don't leak descriptors
  or orphan partial recordings.
- Surface a mid-stream write failure as a rejected recording rather than
  saving a silently truncated file.

Structure:
- Extract the streaming concern into electron/ipc/recordingStream.ts
  (RecordingStreamRegistry) and src/hooks/recorderHandle.ts, out of the
  2.8k-line handlers.ts and the screen-recorder hook.
- Key write streams by output file name, removing the implicit
  recordingId/+1 contract that spanned the IPC boundary.
- Collapse the duplicated screen/webcam finalize blocks into one helper
  and the repeated duration-validity guard into one check; patch the
  screen and webcam durations in parallel.

Adds unit tests for the registry (real temp-dir fs) and the recorder
handle state machine (open-failure fallback, in-order writes awaited
before stop, mid-stream failure). Extends the vitest include glob to
collect electron-side tests.

Verified: tsc --noEmit clean; biome clean; vitest 180/180.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 16:09:39 -07:00
neurot1cal 727e395fcf fix: stream long recordings to disk and patch WebM duration on save
Recordings longer than ~10 minutes silently fail to save (#616). The
renderer buffers the whole WebM as a Blob[], then on stop makes several
in-memory copies (fixWebmDuration -> arrayBuffer -> Buffer.from) before
writing. A long 1080p recording duplicates hundreds of MB several times
in the renderer, exceeds Electron's memory limit, and the renderer
crashes silently with no file saved.

Two changes:

1. Stream chunks to disk (originally @Amanuel2x's contribution in #617).
   Open an fs.WriteStream in the main process at recording start and send
   each ~1s ondataavailable chunk straight to disk over two new IPC calls
   (open-recording-stream, append-recording-chunk), so the renderer never
   holds more than a single chunk. A full in-memory fallback is preserved
   for environments where the IPC stream cannot open.

2. Patch the WebM Duration header on disk after the stream closes. Browser
   MediaRecorder writes WebM with no Duration element, so streamed files
   save with duration=N/A and the editor's seek bar, timeline, and any
   scrub/trim break. A new electron/recording/webm-duration.ts module
   rewrites the Duration element, writing to a temp file and renaming in
   place so a crash mid-write cannot corrupt the recording.

Streaming is opt-in: the screen recorder and the browser-only webcam
recorder stream to disk; native-capture webcam sidecars (Windows, macOS)
keep buffering in-memory, since their finalize path reads the recorder
blob directly to attach the webcam track.

Verified: tsc --noEmit clean; biome clean; vitest 166/166.

Closes #616
Supersedes #617

Co-Authored-By: Amanuel <amanuel@localboostnetworking.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 17:53:22 -07:00
Siddharth a50835e30f Merge remote-tracking branch 'origin/main' into codex/fix-windows-paused-recording
# Conflicts:
#	src/hooks/useScreenRecorder.ts
2026-05-22 20:08:26 -07:00
EtienneLescot 10614c2950 Address webcam sidecar review feedback 2026-05-22 21:20:51 +02:00
EtienneLescot ca826d9088 Fix native Windows recording pause 2026-05-22 21:02:33 +02:00
EtienneLescot ef5855f1f4 Fix native Windows webcam sidecar capture
Record browser webcam sidecar when native Windows capture is active.

Add native webcam sidecar output and DirectShow NV12/YUY2 fallback.

Sample exported webcam frames by source timestamp.
2026-05-22 20:56:09 +02:00
Sid 9f7f498e22 Merge pull request #621 from LucaFontanot/refactor-cursor
refactor: Migrate the powershell cursor script into native cursor sampler
2026-05-20 21:23:09 -07:00
Luca Fontanot cfe6b9e594 fix: Thread detach before teardown is race-prone. 2026-05-20 11:53:50 +02:00
Luca Fontanot 7826cc44e3 fix: Add <algorithm> include for std::max 2026-05-20 11:49:23 +02:00
Luca Fontanot 49ee3ac0db refactor: Migrate the powershell cursor script into the native cursor-sampler.cpp 2026-05-20 00:45:33 +02:00
Luca Fontanot a1a75badde i18n: Add italian (and missing russian) language to window main locale 2026-05-19 14:33:16 +02:00
auberginewly 65bb5bc8dd feat(cursor): clip native cursor to camera-aware video bounds in preview and export
- Add nativeCursorClipRef div (outside preserve-3d) with CSS inset() clip-path that
  tracks the camera-transformed video boundary, including border-radius
- Add cameraAwareMaskRect() in FrameRenderer that computes the same boundary for
  Canvas 2D clip in the export path; remove stage-clamping so rounded corners match
  the preview's inset() behavior when zoom/pan pushes the mask off-stage
- Cache maskBorderRadius in LayoutCache so both shadow and direct composite paths
  can apply camera-aware rounded clipping
- Fix double mask.x offset introduced by nativeCursorMaskRef; replace mask div with
  clip-path on the outer wrapper
- Normalize cursor size relative to maskRect.width so preview and export scale match
- Clip cursor to canvas boundary and hide on non-recorded display
- Wire cursorClipToBounds flag through FrameRenderConfig and VideoExporter
2026-05-18 12:19:47 +02:00
Etienne Lescot 31e394fe1c fix: address follow-up review comments 2026-05-18 12:19:47 +02:00
Etienne Lescot e708ae973e fix: address native mac review feedback 2026-05-18 12:19:47 +02:00
Etienne Lescot 179047b834 fix: isolate macOS native capture by platform 2026-05-18 12:19:47 +02:00
Etienne Lescot df6da28ad2 fix: improve macOS HUD interactions and audio preview 2026-05-18 12:19:47 +02:00
Etienne Lescot 73870c65ef feat: support pausing macOS native recordings 2026-05-18 12:19:47 +02:00
Etienne Lescot b2f9afab8c feat: add macOS editable cursor overlay support 2026-05-18 12:19:47 +02:00
Etienne 6a4ddc5dad feat: compose mac native capture with media 2026-05-18 12:19:05 +02:00
Etienne b9e2134749 feat: add macos screencapturekit helper 2026-05-18 12:19:05 +02:00
EtienneLescot fbdc7d5697 feat: scaffold macOS native capture pipeline 2026-05-18 12:19:05 +02:00
EtienneLescot 9d5be8beb4 fix: enforce cursor-free WGC editable mode 2026-05-16 13:44:08 +02:00
Siddharth b41c4f49fc remove macos cursor highlight; wire telemetry session for non-windows 2026-05-10 14:12:54 -07:00
EtienneLescot 0720a6d802 fix: restore native cursor wiring after upstream rebase 2026-05-10 15:19:19 +02:00
EtienneLescot 8137e816fd fix: normalize native Windows audio for AAC 2026-05-10 15:11:38 +02:00
EtienneLescot 4d3bce0f20 feat: add Windows cursor capture mode 2026-05-10 15:11:36 +02:00
EtienneLescot 722f630117 fix: address maintainer platform regressions 2026-05-10 15:11:32 +02:00
EtienneLescot f4fc7fab9e fix: preserve native cursor click interactions 2026-05-10 15:11:31 +02:00
EtienneLescot 82bffefa54 fix: harden native recorder review paths 2026-05-10 15:11:30 +02:00
EtienneLescot 826790fe52 fix: address native cursor review findings 2026-05-10 15:11:29 +02:00
EtienneLescot 9b85cacec7 test: harden Windows cursor diagnostic 2026-05-10 15:11:28 +02:00
EtienneLescot e33d2205e6 fix: record native cursor click events 2026-05-10 15:11:28 +02:00
EtienneLescot 3a32a140cc fix: capture quick native cursor clicks 2026-05-10 15:11:27 +02:00
EtienneLescot d0341580d6 feat: apply native cursor visual effects 2026-05-10 15:11:27 +02:00
EtienneLescot ab3d38d90f fix: address native capture review feedback 2026-05-10 15:11:25 +02:00
EtienneLescot c7b43a50ef fix: resolve selected Windows microphone 2026-05-10 15:11:24 +02:00
EtienneLescot c0deb03414 fix: gate Windows cursor settings 2026-05-10 15:11:22 +02:00
EtienneLescot 38d727eb8e fix: skip black webcam warmup frames 2026-05-10 15:11:21 +02:00
EtienneLescot 84484d6167 fix: support DirectShow virtual webcams 2026-05-10 15:11:21 +02:00
EtienneLescot fdcd882058 fix: honor selected native Windows webcam 2026-05-10 15:11:20 +02:00
EtienneLescot fb85f66875 feat: add native Windows webcam composition 2026-05-10 15:11:19 +02:00