Commit graph

56 commits

Author SHA1 Message Date
KhooLy
ef455f48b3 feat: prepare desktop release updates 2026-06-27 20:47:10 +03:00
KhooLy
243cbd5bd9 chore: bump version to 0.1.18 2026-06-20 20:35:58 +03:00
KhooLy
64bbd172fd debug: instrument native-player-show emit/receive to find the overlay bug
Playback itself now works on Linux, but the React controls overlay
doesn't appear. nativePlayerActive only flips on the native-player-show
Tauri event, so log both sides: whether Rust actually emits it, and
whether the App.tsx listener is registered in time to receive it.
2026-06-20 16:52:34 +03:00
KhooLy
eb5b96122f fix: don't fail player init when mpv lacks the osc option
Found via the new debug_log checkpoints: the bundled Linux libmpv was
built without lua, so mpv_set_option_string("osc", "no") returned
"option not found" and player_init bailed out entirely before ever
creating a renderer. We only set this to turn OSC off, which is moot
if OSC doesn't exist in the first place, so treat it as a warning
instead of a fatal error.
2026-06-20 16:28:38 +03:00
KhooLy
c081f184e0 debug: add checkpoint logging through the play-trigger flow
player_load already logs but player_init never did, and handlePlay had
no top-level error handling, so a failure anywhere before the
playInEmbeddedMpv try/catch silently dropped the player back to the
previous screen with nothing in any log. Add debug_log checkpoints
through handlePlay and log player_init's outcome, to find where the
AppImage build actually fails since it isn't where we assumed.
2026-06-20 16:04:28 +03:00
KhooLy
40c0a5a162 fix: find bundled libmpv at the actual Linux package resource path
find_libmpv_path() only checked <exe_dir>/lib, but Tauri's Linux
packaging (deb/rpm/AppImage) puts bundled resources at
<exe_dir>/../lib/<ProductName>/lib per the FHS convention, since /usr/bin
can't hold arbitrary app files. The executable sits at /usr/bin/fluxa-desktop
while libmpv was actually at /usr/lib/Fluxa Desktop/lib/. That mismatch
made every AppImage build silently fall back to a system libmpv.so.2 that
doesn't exist on most distros, so the player never loaded. Scan /usr/lib's
subdirectories for the bundled lib instead of assuming a fixed layout.
2026-06-20 15:32:04 +03:00
KhooLy
0c9afb5779 fix: stop bumping Cargo.toml version, read app version from package.json
Bumping the crate's own version touched Cargo.lock on every release,
busting Swatinem/rust-cache's key (which hashes Cargo.lock) and forcing
a full from-scratch dependency rebuild on every single release across
all three platforms. Tauri natively supports reading the app version
from package.json, so pin Cargo.toml's version and let that carry it.
2026-06-20 15:09:22 +03:00
KhooLy
f455261458 chore: bump version to 0.1.12 2026-06-20 14:58:57 +03:00
KhooLy
25ba100863 chore: bump version to 0.1.11 2026-06-18 22:14:01 +03:00
KhooLy
01cd9e4b4c chore: bump version to 0.1.10, add a one-command version bump script
tauri.conf.json no longer carries its own version -- it now inherits
from Cargo.toml, so a release bump only touches package.json and
Cargo.toml (scripts/bump-version.sh handles both plus Cargo.lock).
2026-06-18 21:34:27 +03:00
KhooLy
2a31b8b810 style: remove comments added while debugging, drop leftover verbose mpv logging 2026-06-18 21:34:27 +03:00
KhooLy
78c5db123c fix: poll seek/load completion instead of blind fixed sleeps for thumbnails
Previously every thumbnail request paid a fixed 200ms (and 500ms on
first load) regardless of how fast the actual seek was. Polling exits
as soon as it's actually ready, capped at the same ceilings as before.
2026-06-18 21:34:27 +03:00
KhooLy
0cc8e68217 fix: create the thumbnail renderer's software render context eagerly
vo=libmpv requires a render context to exist before any loadfile/seek
command runs (unlike vo=null, which needs nothing). The context was
previously created lazily inside render_thumbnail(), called after
load/seek already failed with 'error running command'.
2026-06-18 21:34:27 +03:00
KhooLy
fa0ae9af7c fix: use vo=libmpv instead of vo=null for the thumbnail renderer
vo=null discards all decoded video frames before they can reach any
render API, so render_thumbnail() always got a black/empty buffer
despite the render call itself reporting success.
2026-06-18 21:34:27 +03:00
KhooLy
fb726e5fcd fix: detect no-video-track deterministically instead of guessing with a timeout
video-codec reflects the container's track list, available right
after the file opens, independent of decode/buffering progress.
Replaces the previous fixed-timeout heuristic, which was firing
early for legitimately slow torrent buffering and revealing a black
player view before the real frame was ready.
2026-06-18 21:34:27 +03:00
KhooLy
67536ecb55 fix: check mpv_render_context_render's return code in render_thumbnail
This is the actual function the seek-thumbnail flow calls -- render_frame
(fixed earlier) is a separate, similar function used elsewhere.
2026-06-18 21:34:27 +03:00
KhooLy
bbe7bd0342 fix: check mpv_render_context_render's return code in the sw/thumbnail path too
Same bug as the OpenGL path: the return code was discarded and a
black buffer was reported as a successful frame regardless.
2026-06-18 21:34:27 +03:00
KhooLy
7b20ebbf96 fix: hold audio until the first video frame is ready instead of starting early
load() now stays paused; the frontend unpauses once vo-configured
(or a 4s safety timeout for video-less streams) is observed, so
audio no longer plays ahead of the picture during the loading screen.
2026-06-18 21:34:27 +03:00
KhooLy
6f22377e48 fix: block briefly for the player_renderer lock in player_command
User commands like pause must actually take effect; try_lock() was
silently failing with 'player renderer busy' whenever it collided
with the render thread's per-frame lock, requiring multiple clicks.
2026-06-18 21:34:27 +03:00
KhooLy
7ce1a75b9d fix: pump Win32 messages for child_hwnd on its owning thread
child_hwnd is created on the render thread via CreateWindowExW, but
nothing ever ran a message loop for it. Windows expects the thread
that creates a window to process its message queue; without that,
compositor/system messages sent to the window go unanswered, which
plausibly explains both the freeze after WS_CLIPSIBLINGS removal made
this window actively participate in compositing, and the crash when
moving the parent window (synchronous WM_WINDOWPOSCHANGING messages
propagate through the window hierarchy including this child).
2026-06-18 21:34:27 +03:00
KhooLy
a6c6fade95 fix: drop WS_CLIPSIBLINGS on the player surface child window
WS_CLIPSIBLINGS clips a window's drawing to exclude any area overlapped
by a sibling window. WebView2's hosting surface is effectively a
sibling covering the whole client area, so this was clipping away all
of our rendered output regardless of what was drawn -- matching every
prior test (mpv frames, solid color clears) showing nothing on screen
despite rendering succeeding (confirmed via mpv's own screenshot).
2026-06-18 21:34:27 +03:00
KhooLy
efdddae890 Revert "debug: TEMP retest solid-red clear with blur-behind fix in place"
This reverts commit 376ba68a19922dc8c281910799fdd66e4d5f5b31.
2026-06-18 21:34:27 +03:00
KhooLy
cf55a8dda0 debug: TEMP retest solid-red clear with blur-behind fix in place 2026-06-18 21:34:27 +03:00
KhooLy
7edd911ccf Revert "debug: TEMP dump a screenshot ~3s into playback to isolate decode vs display"
This reverts commit b0c03595efed63e09cc48e91a21ea459fc4d05ce.
2026-06-18 21:34:27 +03:00
KhooLy
f714205e85 debug: TEMP dump a screenshot ~3s into playback to isolate decode vs display 2026-06-18 21:34:27 +03:00
KhooLy
7036fc5332 fix: disable DWM blur-behind transparency while native player surface is visible 2026-06-18 21:34:27 +03:00
KhooLy
b2e4fc9da5 Revert "debug: TEMP clear to solid red instead of mpv render, to test if raw GL shows through compositor"
This reverts commit 024f17e512122ef343787fae500ead203d36c3d9.
2026-06-18 21:34:27 +03:00
KhooLy
4852594aec debug: TEMP clear to solid red instead of mpv render, to test if raw GL shows through compositor 2026-06-18 21:34:27 +03:00
KhooLy
183801cc81 fix: cast PFD_MAIN_PLANE to u8 to match iLayerType's field type 2026-06-18 21:34:27 +03:00
KhooLy
1357cc0459 fix: match mpv's own proven WGL pixel format and context creation exactly 2026-06-18 21:34:27 +03:00
KhooLy
79d0df4682 fix: request an alpha channel in the Windows player surface's pixel format 2026-06-18 21:34:27 +03:00
KhooLy
6c926821df debug: log the native player surface's render size 2026-06-18 21:34:27 +03:00
KhooLy
0badb831d0 fix: check mpv_render_context_render's return code instead of ignoring it 2026-06-18 21:34:27 +03:00
KhooLy
3e6c403882 fix: give Windows player surface install 20s instead of 5s before giving up 2026-06-18 21:34:27 +03:00
KhooLy
cabbb457ba fix: verify wglMakeCurrent succeeds before deleting the old GL context 2026-06-18 21:34:27 +03:00
KhooLy
2e1f3b8cfd fix: request a modern OpenGL 3.3 context on Windows instead of a bare legacy one 2026-06-18 21:34:27 +03:00
KhooLy
13e1ad20be debug: write mpv's internal log to a file for Windows crash diagnosis 2026-06-18 21:34:27 +03:00
KhooLy
063552a762 fix: prevent duplicate Windows player-surface install thread
A timed-out install() call left the original thread running and let a
later call spawn a second one, racing both over the same mpv render
context and segfaulting. install() is now single-flight per process.

Also gate release publishing on all three platform builds succeeding,
not just the first one to finish.
2026-06-18 21:34:27 +03:00
KhooLy
478769c350 chore: bump version to 0.1.9 2026-06-18 14:11:19 +03:00
KhooLy
41aa6e1a5d chore: bump version to 0.1.8 2026-06-18 13:59:30 +03:00
KhooLy
2445f71b5b chore: bump version to 0.1.7, speed up release builds
Thin LTO instead of full LTO + codegen-units=1 for faster CI compiles.
2026-06-18 12:59:10 +03:00
KhooLy
26a7018948 fix: surface the real Windows error behind a libmpv load failure
libloading's Display for this error is hardcoded to "LoadLibraryExW
failed" and never includes the actual OS error, even though it's
captured internally via source(). Walks the error chain so a future
failure (if any) gives an actual diagnosable reason instead of a dead end.
2026-06-18 04:04:25 +03:00
KhooLy
83bddb129a chore: bump version to 0.1.6 2026-06-18 04:00:44 +03:00
KhooLy
32de8f727f fix: correct LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR constant value
Was 0x200 (actually LOAD_LIBRARY_SEARCH_APPLICATION_DIR's value, already
implied by DEFAULT_DIRS), not 0x100. The previous fix never actually told
Windows to search lib/ for mpv-2.dll's dependencies -- it was a no-op.
2026-06-18 04:00:18 +03:00
KhooLy
9e90ff0efe chore: bump version to 0.1.5 2026-06-18 03:09:54 +03:00
KhooLy
cffede0390 fix: load mpv-2.dll with search flags so it finds its own dependency DLLs
LoadLibraryW on Windows doesn't search a DLL's own directory for its
dependencies unless told to -- only the exe dir, System32, and PATH.
mpv-2.dll's ~110 dependency DLLs (ffmpeg, libplacebo, etc.) live next to
it in lib/, so every load failed despite all the files being present.
Confirmed via the new logging: "LoadLibraryExW failed" right before the
player surface install times out, which is what silently kicked users
back to the previous screen on every playback attempt.
2026-06-18 03:06:06 +03:00
KhooLy
e2b710e694 chore: bump version to 0.1.4 2026-06-18 02:14:55 +03:00
KhooLy
e7aedd796e feat: wire up file-based logging for the Windows player path
Release builds use windows_subsystem="windows" (no console) and there
was no logger backend registered at all -- every log::warn!/error! call
in the player code was silently dropped. Adds tauri-plugin-log writing
to the app's log dir, and logs every step of native player surface
setup, load attempts, and mpv end-file events so a real failure reason
is visible instead of just "it went back to the previous screen".
2026-06-18 02:14:13 +03:00
KhooLy
0e57892ab8 chore: bump version to 0.1.3 2026-06-18 01:29:41 +03:00
KhooLy
5dae8b3dc1 fix: detect Windows player EOF via mpv events instead of polled property
Polling eof-reached right after loadfile can read stale, and never
distinguished a real end-of-file from the stream simply failing to
open -- both looked like "silently kick back to the previous screen".
Drains mpv's actual event queue (MPV_EVENT_END_FILE) instead, and
surfaces the real error plus recent warn-level log lines when the
stream genuinely fails to open.
2026-06-18 01:24:21 +03:00