Commit Graph
75 Commits
Author SHA1 Message Date
webadderall 624c3047be Improve HUD and update prompt UI 2026-04-25 21:34:55 +10:00
webadderall 62f2a52860 Fix companion audio sync for trimmed and long exports 2026-04-24 12:04:21 +10:00
webadderall 05a6d3f1b6 Fix embedded audio fallback handling and audio diagnostics (#309)
* Fix embedded audio fallback handling and audio diagnostics

* Add recording fallback diagnostics toasts

* Fix Windows audio fallback cleanup and path matching

* Format rebased recording fallback changes

* Fix embedded audio preview and export fallback handling
2026-04-24 11:30:10 +10:00
webadderall 235a01c561 Merge pull request #314 from soufian3hm/fix/windows-recording-validation
Fix invalid Windows recording finalization
2026-04-22 17:19:56 +10:00
soufian3hm 726808a8ad Fix invalid Windows recording finalization 2026-04-21 17:38:37 +01:00
wiiiii123 1e102b3540 fix(recording): always clean up failed starts 2026-04-21 21:05:36 +07:00
wiiiii123 92ee514f5e fix(recording): recover from fullscreen countdown failures 2026-04-21 20:46:37 +07:00
webadderallandmeiiie daf99c0387 fix(recording): prefer playable browser capture codecs (#275)
Verifies the selected recording MIME type can also be decoded by the
in-app <video> element via canPlayType(), so that codecs like av1 —
which MediaRecorder.isTypeSupported() reports as supported for encoding
but are not decodable on fresh Windows installs without the AV1 Video
Extension — are not chosen.

Also passes undefined (not an unsupported fallback string) into
new MediaRecorder() when no preferred type is supported, letting the
browser pick a default instead of throwing NotSupportedError.

Replaces the previous 'as ProcessedDesktopSource' cast with a properly
typed LINUX_PORTAL_SOURCE constant.

Co-authored-by: meiiie <meiiie@users.noreply.github.com>
2026-04-20 01:08:12 +10:00
webadderall 92bb1065a2 fix: cast Linux portal sentinel as ProcessedDesktopSource to fix TS build error 2026-04-20 00:42:36 +10:00
Uri b200deddca fix(linux/wayland): address PR review feedback
- electron/main.ts: treat missing sourceId on linux as portal sentinel
  so the request handler never calls getSources() (which itself opens
  an extra portal dialog) on fresh sessions.
- useScreenRecorder.ts: persist the synthesized portal sentinel via
  selectSource() so main has the source set before getDisplayMedia.
  Extract acquireLinuxPortalStream() helper to dedupe the three
  duplicated getDisplayMedia constraint blocks.
- LaunchWindow.tsx: hide the screen-source selector button (and its
  separator) on Linux so users cannot trigger an extra portal dialog
  via the dropdown.
2026-04-18 16:38:52 +03:00
Uri 571bbb9434 fix(linux/wayland): collapse 3-step capture flow into a single portal dialog
Previously on Linux/Wayland, starting a fullscreen recording required three
separate picker interactions: an in-app source dropdown plus two xdg-desktop-portal
dialogs. The duplicate portal dialogs were caused by:

1. resolveBrowserCaptureSource() calling desktopCapturer.getSources() in the
   renderer, which itself triggers the portal on Wayland.
2. setDisplayMediaRequestHandler() in main also calling getSources(), which
   triggers another portal.
3. Returning a pre-enumerated source id to Chromium, which on Wayland is stale
   and forces Chromium to re-prompt via the portal during MediaStream creation.

Additionally, the editor window failed to appear after recording on some
Wayland sessions because 'ready-to-show' did not fire reliably.

Changes:
- LaunchWindow: skip the in-app source dropdown on Linux and start recording
  directly; the OS portal becomes the source picker.
- useScreenRecorder: introduce a 'screen:linux-portal' sentinel source. When
  set, route capture through navigator.mediaDevices.getDisplayMedia() so the
  portal handles selection in a single dialog. Skip resolveBrowserCaptureSource
  for the sentinel to avoid an extra getSources() call.
- electron/main: in setDisplayMediaRequestHandler, when the sentinel is set,
  skip desktopCapturer.getSources() entirely and return a synthetic source so
  Chromium opens the portal exactly once for the actual capture.
- electron/windows: in createEditorWindow, also call win.show() from
  did-finish-load as a fallback for Linux/Wayland where ready-to-show may
  not fire.
2026-04-18 16:17:08 +03:00
webadderall ffc5959994 fix: address CodeRabbit review feedback
- Fix telemetry drift reset: use nextExpectedMs - now for delay instead
  of stale drift value after baseline reset (avoids 1ms rapid sample)
- Use RECORDER_TIMESLICE_MS for mic fallback recorder (was hardcoded 1000)
- Return requested timeMs in extensionHost getCursorAt boundary clamps
- Remove premature null of webcam URL to prevent flicker on path change
- Use fs.realpath in IPC get-local-media-url to match media server check
2026-04-18 19:03:36 +10:00
webadderall f024c89890 fix: always apply aresample sync filter and tighten audio sync tolerances
- Always route audio through aresample=async=1:first_pts=0 filter during
  muxing on both macOS and Windows, even when duration delta is small.
  Previously skipped when delta ≤50ms, which left progressive clock drift
  (from CPU load) completely uncorrected.
- Lower sync detection threshold from 50ms to 20ms so tempo correction
  kicks in earlier.
- Use explicit 48kHz AudioContext sample rate in both browser recording
  and export rendering to prevent sample rate mismatch drift.
- Reduce MediaRecorder timeslice from 1000ms to 250ms to reduce chunk
  loss under CPU pressure.
- Tighten export audio sync: seek threshold 300ms→150ms, tolerance
  15ms→8ms, correction window 2s→0.5s, max adjustment ±8%→±12%.
- Lower companion audio start delay threshold from 50ms to 25ms.
2026-04-18 19:03:36 +10:00
webadderall 41142af68f Merge remote-tracking branch 'origin/main' into feat/settings-extensions
# Conflicts:
#	src/components/video-editor/timeline/TimelineEditor.tsx
2026-04-17 14:07:46 +10:00
webadderall f91e29abba fix: address remaining timeline review feedback 2026-04-17 00:23:52 +10:00
webadderall 1dc758e535 fix: address timeline editor review feedback 2026-04-16 19:34:02 +10:00
webadderall 993c7aff9c fix: address settings and extensions review feedback 2026-04-16 19:16:20 +10:00
webadderall 8cdf21e125 feat: overhaul timeline drag/resize, zoom playback, and recording hooks
- TimelineEditor: rewrite drag/resize with neighbour clamping — items cannot
  overlap; drag preserves original duration; resize clamps to adjacent item
  boundaries instead of rejecting; floating drag/resize tooltip via direct
  DOM (no re-renders)
- TimelineWrapper: new wrapper component for cleaner TimelineContext wiring
- Track: extract Track component with empty-row hint slot
- AudioWaveform, Row, Subrow, KeyframeMarkers, Timeline.module.css: dark
  theme timeline overhaul
- zoomSuggestionUtils: smarter auto-zoom region suggestion from cursor telemetry
- videoPlayback (zoom): fix zoomRegionUtils edge cases at timeline bounds;
  rework zoomTransform for cursor-follow camera
- videoPlayback (cursor): cursorFollowCamera, cursorSway, cursorLoopTelemetry,
  cursorViewport — new cursor motion and snapping pipeline
- videoPlayback (layout): layoutUtils, overlayUtils, focusUtils, motionSmoothing
- useScreenRecorder: hardened recording lifecycle, pause segment tracking,
  improved WGC and SCK integration
- useVideoDevices / useMicrophoneDevices / useAudioLevelMeter improvements
2026-04-16 17:53:51 +10:00
webadderall 48cdb5c203 feat: settings tab with language picker, extension fixes, and i18n expansion
- SettingsPanel: new 'settings' section — in-app language picker (all 5
  locales), auto-apply fresh recording zooms toggle, connect-neighboring-
  zooms toggle, keybinds shortcut into KeyboardShortcutsDialog
- VideoEditor: wire autoApplyFreshRecordingAutoZooms preference through to
  SettingsPanel; connect zoom settings into new section
- editorPreferences: add autoApplyFreshRecordingAutoZooms field; update tests
- extensionMarketplace: filter __MACOSX sidecar dirs when unzipping extensions
  uploaded from macOS Finder (fixes manifest-not-found on Finder zips)
- useExtensions: guard window.electronAPI for SSR safety; reformat to tabs
- I18nContext: expose setLocale; persist locale preference
- ShortcutsContext: shortcut registration improvements
- lib/extensions: renderHooks, extensionHost, fileUrls, cursorCoordinates
  updated for new extension capability surface
- i18n: expand extension locale strings across all 5 supported languages
2026-04-16 17:52:53 +10:00
webadderall b2342090b2 feat(editor): full-width timeline, extension i18n, lifecycle fixes
- Move timeline below preview+settings so it spans full editor width
- Remove react-resizable-panels vertical split
- Add scoped i18n for ExtensionManager (en/zh/ko/ja/es)
- Fix stale extension activation cleanup and deactivation on uninstall
- Cache-bust extension module URLs on reinstall
- Move bundled cursor packs to extension-sources/ for marketplace upload
- Track marketplace download counts (fire-and-forget POST)
2026-04-12 16:59:07 +10:00
webadderall 6296a05115 fix(audio): add browser microphone fallback for macOS < 14
On macOS versions before Sonoma (14.0), SCStreamConfiguration does not
support the captureMicrophone/microphoneCaptureDeviceID selectors. The
native helper was throwing a fatal error, blocking recording entirely
when microphone was enabled.

Now the Swift helper logs MICROPHONE_CAPTURE_UNAVAILABLE and continues
capture without microphone. The Node handler detects this signal and
returns microphoneFallbackRequired to the renderer, which starts a
browser-side MediaRecorder capturing the mic via getUserMedia. On stop,
the audio blob is saved as a .mic.webm sidecar alongside the native
recording, where the existing companion audio detection picks it up.

Fixes: 'Native microphone capture is unavailable on this macOS/Xcode
runtime' error on older macOS versions.
2026-04-12 16:59:06 +10:00
webadderall 7073d7deb5 feat: extension system with marketplace, permissions, and security hardening
- Extension loader with manifest validation, ID sanitization, and path traversal protection
- Permission-gated runtime API (render, cursor, audio, timeline, ui, assets, export)
- Extension host with lifecycle management (activate/deactivate)
- Marketplace client for browsing, downloading, and installing extensions
- Extension Manager UI panel with enable/disable/uninstall
- IPC bridge for extension discovery, management, and marketplace operations
- Proxy guard on window.electronAPI to block extension access to privileged IPC
- Zip-slip protection via post-extraction directory traversal validation
- Safe PowerShell invocation for Windows zip extraction (no string interpolation)
- File URL resolution with path escape prevention
2026-04-12 01:37:28 +10:00
webadderall 1e56c2d139 revert(recording): remove editor finalization phase 2026-04-04 22:26:25 +11:00
webadderall 22ec58e48a fix(recording): improve post-capture handoff 2026-04-04 22:14:15 +11:00
webadderall 443dbbc01f open editor during recording finalization 2026-04-04 13:07:49 +11:00
webadderall 098abda72d fix(recording): improve webcam audio sync and delay compensation 2026-04-02 16:29:43 +11:00
webadderall 91a51951fa fix(recording): trim paused audio from native windows captures 2026-03-31 00:04:00 +11:00
webadderall f61a5982e3 fix(recording): persist microphone and system-audio preferences 2026-03-30 23:49:56 +11:00
webadderall eb0ae2a324 fix: await setRecordingState before muxNativeWindowsRecording
The cursor telemetry snapshot (setRecordingState(false)) was not awaited,
creating a race with muxNativeWindowsRecording which calls finalizeStoredVideo.
If the mux IPC arrived first, pendingCursorSamples was still empty and no
.cursor.json was written — causing the cursor overlay to not render.
2026-03-30 15:55:05 +11:00
webadderall ac14768a62 fix: TCC permission handling for native helpers on macOS 26
- Add CGPreflightScreenCaptureAccess pre-check in Swift helper
- Add microphone TCC pre-flight when mic capture is requested
- Warm up TCC via desktopCapturer.getSources before spawning helper
- Request mic access from Electron before helper spawn
- Remove unreliable systemPreferences.getMediaAccessStatus pre-checks
- Add camera entitlements to plist files for webcam support
- Guard getScreen() calls behind app.isReady()
- Make tray icons lazy to avoid early screen access
- Suppress duplicate permission error alerts in renderer
2026-03-29 19:15:18 +11:00
webadderall cbde700ab7 fix video editor not opening sometimes in prod 2026-03-29 13:13:15 +11:00
webadderall e717c812a7 fix invalid/stale mic selection windows 2026-03-29 11:07:34 +11:00
webadderall ba5fac0f06 fixed webcam disappearing 2026-03-29 10:31:50 +11:00
webadderall 7085cc4ce9 fix: open editor after recording fallback 2026-03-28 20:42:38 +11:00
webadderall 045850417f feat(debug): add native capture diagnostics 2026-03-28 16:08:43 +11:00
webadderall 6a76d1fa3c fix(recording): restore effective duration accounting 2026-03-27 23:34:39 +11:00
webadderall 7fb4c5de9e Revert "Fix WGC display selection and webcam sync"
This reverts commit e5becc30a3.
2026-03-27 11:30:11 +11:00
webadderall f1df2911cb Merge fix/wgc-display-webcam-sync into main 2026-03-26 22:09:59 +11:00
webadderall e5becc30a3 Fix WGC display selection and webcam sync 2026-03-26 21:52:35 +11:00
webadderall 1900c0e737 fix(recording): validate native captures and tighten mic menu spacing 2026-03-24 19:04:24 +11:00
webadderall cc126fa1e7 fix(sources): backfill missing displays in monitor picker 2026-03-23 18:03:40 +11:00
webadderall 08745a129b perf: avoid repeated device label capture
Enumerate cameras and microphones before requesting media permissions, only opening a stream once when labels need to be unlocked. Stop rerunning enumeration when the selected device changes so launch controls no longer churn hardware access on routine UI interaction.
2026-03-22 21:02:42 +11:00
webadderall 2b5783ab00 Fix webcam sync and app close flow 2026-03-20 11:37:37 +11:00
webadderall f5ccd5b7e0 Fix Windows DXGI capture helper flow 2026-03-19 00:05:58 +11:00
webadderall ae521ed9d9 feat(windows): replace WGC with DXGI and fix HUD window bounds 2026-03-18 22:11:10 +11:00
webadderall 26a8e069e8 fix: restore cursor fallback and mac mic selection 2026-03-18 21:19:00 +11:00
webadderall de1074cdff Pause native screen capture across platforms 2026-03-18 18:36:25 +11:00
Gurpreet Kait ebe333f029 - tests driven
- language support
- webcame pause/resume sync
- native recording pause
- cancel (clears chunks and stops both recoders and webcame discarded on native cancel
- full lifecycle with webcame - pause - resume - stop keeps webcame in sync throughout
2026-03-18 11:59:58 +05:30
Gurpreet Kait 9679e20e48 Merge branch 'main' into feature/ui-improvements 2026-03-18 10:58:56 +05:30
Gurpreet Kait 15f48538bc Merge branch 'main' into feature/ui-improvements 2026-03-18 10:39:07 +05:30