Commit Graph
1049 Commits
Author SHA1 Message Date
webadderall 2c00f18770 Merge pull request #283 from meiiie/fix/export-finalization-timeouts
fix(export): make audio finalization timeouts progress-aware
2026-04-20 20:56:28 +10:00
webadderall 0ccdc449e8 Merge pull request #278 from meiiie/fix/export-media-paths
fix(export): reopen saved videos and default to source quality
2026-04-20 20:35:21 +10:00
wiiiii123 19486c7a44 fix(export): cancel timed out finalization work 2026-04-20 11:21:52 +07:00
wiiiii123 04e013cbbf fix(export): only refresh watchdog on progress 2026-04-20 10:39:10 +07:00
wiiiii123 6783eeb55c test(export): share finalization watchdog logic 2026-04-20 10:19:25 +07:00
wiiiii123 271dddcc32 fix(export): make audio timeouts progress-aware 2026-04-20 10:01:42 +07:00
wiiiii123 dc60a8e6e5 fix(export): scale audio finalization timeouts 2026-04-20 02:37:21 +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
wiiiii123 4f739a058e fix(export): reopen saved videos and default to source quality 2026-04-19 21:42:06 +07: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 e82e4bc2c2 Merge pull request #262 from webadderall/fix/export-pipeline-streaming-chunked
fix: streaming decode + chunked offline audio rendering for export
2026-04-18 22:12:10 +10:00
webadderall 681bc70c13 fix: clear video src on timeout path in getMediaDurationSec 2026-04-18 22:04:40 +10:00
webadderall a0668696bc fix: address CodeRabbit review — fallback, i18n, return type cleanup
- Change ?? 99 fallback to ?? 100 in finalizing progress label
- Add editor.export.processingAudioEdits i18n key to all 5 locales
- Tighten sourceTimeToOutputTime return type to number (was number|null)
- Remove now-unused totalOutputDurationMs param from scheduleRegionForChunk
- Remove ?? fallbacks at call sites (function always returns a number)
2026-04-18 21:38:05 +10:00
webadderall 9b6744a85c fix: remove extension-sources, replace lucide-react with phosphor icons
- Remove extension-sources/ directory (91MB of bundled extension assets)
- Add extension-sources/ to .gitignore
- Replace all lucide-react imports with @phosphor-icons/react equivalents
  in TutorialHelp, ExtensionManager, and TimelineEditor
- Fixes #261 (missing lucide-react dependency + Twitter icon crash)

Closes #261
2026-04-18 21:18:12 +10:00
webadderall ebe2bc5c16 fix: audio regions on silent video, interleaved >2ch stride, coderabbit config
- Fall back to video container duration when mainBuffer is null but
  audioRegions are present (prevents empty output)
- Use data.numberOfChannels as deinterleave stride instead of capped
  dataChannels (fixes garbled audio for 5.1+ sources)
- Fix .coderabbit.yaml: '*' is not valid regex, use '.*'
2026-04-18 20:45:46 +10:00
webadderall 028fd91ffd fix: address CodeRabbit review — muxing error guard, dead code removal, i18n
- Add encoderError check after awaiting pendingMuxing to prevent
  finalization of corrupt exports (both exporters)
- Remove unreachable synchronous fast-path in getMediaDurationSec
- Set preload='metadata' before src for correct browser behavior
- Localize audio processing status text with t()
2026-04-18 20:43:48 +10:00
webadderall cbe0b9feac fix: replace real-time audio export with streaming decode + chunked offline rendering
Major rewrite of the audio export pipeline for stability and memory efficiency:

## Streaming Decode
- Primary decode path uses WebDemuxer + AudioDecoder (WebCodecs streaming)
- Falls back to bulk decodeAudioData if streaming fails
- Avoids holding full compressed file + decoded PCM simultaneously

## Chunked Offline Rendering
- Processes timeline in 30-second OfflineAudioContext chunks
- Memory bounded to ~30s of PCM per chunk regardless of recording length

## Chunked WAV Writing
- Writes PCM in ~256KB chunks instead of single massive ArrayBuffer
- Eliminates OOM for long recordings on the native/FFmpeg export path

## Chunked Encoding
- Single AudioEncoder kept alive across all chunks (clean AAC stream)
- Proper backpressure and error propagation per chunk

## scheduleBufferThroughTimeline chunk windowing
- Clips source nodes to chunk boundaries for correct cross-chunk audio
- Backwards compatible defaults when no chunk params provided

## Other export fixes
- Progress cap: 99% -> 100% in both exporters and UI
- Muxing errors: propagated instead of silently swallowed
- Mac recording: enhanced warning when no audio files for muxing
- Export timeout: eliminated by removing real-time rendering
2026-04-18 20:29:14 +10:00
webadderall 8f3a62d811 fix: check both realpath and resolve forms in media URL handler, extract sync constants
- IPC get-local-media-url now checks both fs.realpath and path.resolve forms
  against approvedLocalReadPaths, so symlinks approved via approveUserPath work
- Extract duplicated sync correction parameters into shared constants in
  audioEncoder.ts (SYNC_SEEK_THRESHOLD_SEC, SYNC_PLAYBACK_RATE_OPTIONS)
2026-04-18 19:11:01 +10:00
webadderall dec004eddd fix: use drift-compensating scheduler in recording handler, fix media URL consistency
- Replace setInterval in recording handler with startCursorSampling() so
  the drift-compensating scheduler is used for actual recordings (was missed)
- Pass realpath-resolved path to buildMediaUrl for symlink consistency
- Use resolvedWebcamVideoUrl in thumbnail/export configs with file:// fallback
2026-04-18 19:03:36 +10: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 9100899adb fix: improve cursor telemetry accuracy under CPU load
- Replace setInterval with drift-compensating recursive setTimeout for
  cursor sampling. Under CPU load setInterval bunches or skips callbacks,
  creating irregular gaps in telemetry data.
- Add binary search + linear interpolation to export cursor lookup
  (modernFrameRenderer) matching the playback path. Was using O(n)
  nearest-neighbor which caused visible cursor jumping in exports.
- Apply same interpolation fix to extension API getCursorAt().
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 944d4f8031 Merge pull request #258 from webadderall/feat/light-mode
feat: add light mode theme support
2026-04-18 17:34:29 +10:00
webadderall 7ca96f355b fix: default theme to system, set data-theme attribute on DOM
- Default preference to 'system' so first-run users get OS preference detection
- Set data-theme attribute on documentElement alongside .dark class toggle
2026-04-18 16:23:01 +10:00
webadderall 6536975455 fix: address CodeRabbit review for light mode theme
- Create missing ThemeContext.tsx (build-breaking)
- Fix text contrast on blue accent backgrounds (use text-white on bg-[#2563EB])
- Fix PlaybackControls border to use border-white/10 (dark overlay)
- Fix ExportSettingsMenu/FormatSelector active state text for light mode
- Fix ProjectBrowserDialog placeholder text on dark gradient
- Fix SettingsPanel dot preview border, accent text, hover text, X button text
- Fix TimelineEditor tooltip text and custom aspect input borders/bg
- Fix TutorialHelp malformed CSS class and kbd backgrounds
- Fix KeyboardShortcutsHelp kbd backgrounds for light mode
- Fix ExtensionManager badge text on blue pill
- Fix AnnotationSettingsPanel upload button hover text
- Fix index.css light mode timeline colors (was identical to dark)
2026-04-18 16:16:43 +10:00
webadderall 7f587a39a8 fix: address CodeRabbit review feedback
- Use videoSourcePath instead of fromFileUrl(videoPath) for cursor
  telemetry — fixes broken path when videoPath is an HTTP media-server URL
- Validate filePath against approvedLocalReadPaths in get-local-media-url
  IPC handler before returning a URL
- Use fs.realpath() instead of path.resolve() to close symlink bypass
- Fix range parser to handle suffix ranges (bytes=-500) and guard
  against NaN values
- Add CORS headers (Access-Control-Allow-Origin) to media server
  responses to prevent canvas tainting when using video frames
- Handle OPTIONS preflight requests
- Clear stale resolvedWebcamVideoUrl before resolving new URL to
  prevent flash of stale content
2026-04-18 16:09:16 +10:00
webadderall aecefd6db2 feat: add light mode theme support
Add a complete light mode theme with a ThemeContext and CSS custom properties
for all UI surfaces. Replaces hardcoded dark colors with theme-aware
equivalents across 32 files including:

- Tailwind config extended with theme color tokens
- CSS custom properties for light/dark palettes in index.css
- ThemeContext provider in App.tsx with system preference detection
- All editor panels, dialogs, timeline, and settings updated to use
  theme-aware classes (text-foreground, bg-surface, border-border, etc.)
- Timeline glass effects and module CSS updated for both modes
- UI primitives (accordion, switch, slider, sonner) themed
2026-04-18 15:58:55 +10:00
webadderall 45b6879d86 fix: serve video files via local HTTP server to fix loading on Windows
On Windows, the packaged app serves the renderer from http://127.0.0.1:PORT,
which causes Chromium to block file:// URLs in <video> elements — even with
webSecurity disabled. This affects all users running the packaged build.

Add a local media HTTP server (random port) that streams approved video files
with range request support for seeking. The renderer now resolves video paths
through this server instead of using file:// URLs directly.

- electron/mediaServer.ts: HTTP server with path validation against
  approvedLocalReadPaths and Content-Range support
- IPC handler 'get-local-media-url' converts file paths to HTTP URLs
- resolveVideoUrl() in renderer falls back to file:// if server unavailable
- Improved <video> onError to log actual MediaError details

Fixes #244
2026-04-18 15:55:43 +10:00
Alex Kayser 70c69f3b36 upper case translation 2026-04-17 12:28:20 -04:00
Alex Kayser e2df40ba57 fixing label and diacritics 2026-04-17 12:24:06 -04:00
Alex Kayser 57c990d340 Adding Portuguese to languages 2026-04-17 12:02:13 -04:00
webadderall d86425a83e fix(timeline): restore clip marker indent lines, major ticker dots, and hover-only end caps 2026-04-17 14:52:37 +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 d9b06bcfd9 Merge remote-tracking branch 'origin/main' into feat/settings-extensions
# Conflicts:
#	src/components/video-editor/ExtensionManager.tsx
#	src/components/video-editor/SettingsPanel.tsx
#	src/components/video-editor/TutorialHelp.tsx
#	src/components/video-editor/VideoEditor.tsx
#	src/components/video-editor/index.ts
#	src/components/video-editor/projectPersistence.ts
#	src/components/video-editor/timeline/TimelineEditor.tsx
#	src/components/video-editor/types.ts
#	src/i18n/locales/nl/launch.json
2026-04-17 13:58:36 +10:00
webadderall fdb8389883 Merge remote-tracking branch 'origin/main' into feat/timeline-editor
# Conflicts:
#	src/components/video-editor/timeline/Item.tsx
#	src/components/video-editor/timeline/TimelineEditor.tsx
2026-04-17 13:54:19 +10:00
webadderall 8d925281fc Merge remote-tracking branch 'origin/main' into feat/export-pipeline
# Conflicts:
#	electron/electron-env.d.ts
#	electron/ipc/handlers.ts
2026-04-17 13:47:15 +10:00
webadderall ec4d4318d4 fix: clear annotation selection for zoom edits 2026-04-17 12:03:37 +10:00
webadderall ff2b19a61b fix: finish remaining settings review items 2026-04-17 12:00:42 +10:00
webadderall 6861a41ff9 fix: address remaining CodeRabbit feedback 2026-04-17 11:56:31 +10:00
webadderall c7ed81129e fix: stabilize editor settings and extension UI 2026-04-17 01:50:14 +10:00
webadderall 0206e38e2c fix: address remaining settings review feedback 2026-04-17 01:03:24 +10:00
webadderall cf51e713e7 fix: address remaining zoom timing review feedback 2026-04-17 00:47:30 +10:00
webadderall e6ce742f58 fix: address final export pipeline review follow-ups 2026-04-17 00:41:32 +10:00
webadderall ae6ac0d81e fix: address remaining ui overhaul review feedback 2026-04-17 00:27:46 +10:00
webadderall f91e29abba fix: address remaining timeline review feedback 2026-04-17 00:23:52 +10:00
webadderall aa27e7cbd1 fix: address remaining export pipeline review feedback 2026-04-17 00:17:54 +10:00
webadderall 8071c6bb0e fix: address remaining ui overhaul review feedback 2026-04-16 23:39:27 +10:00
webadderall a83a58c671 fix: address ui overhaul review feedback 2026-04-16 22:36:23 +10:00