Commit Graph
50 Commits
Author SHA1 Message Date
edde746 0a6865fa18 fix(macos): unbound the AVFoundation AO's PCM lookahead
MPVKit 1.0.15 bounded how far ahead ao_avfoundation enqueues PCM on macOS —
about 450ms of queue against the renderer's own ~1.7s — and disarms the feed
between refills, re-arming from a half-bound timer. 2.10 is the first release
to carry it: the AO pin went 1.0.12 to 1.0.16 over that release. #1711 reports
macOS audio skipping roughly every half second on 2.10 that 2.9.1 does not
have, and that bound is the only change to this path in the window, so restore
the renderer-owned depth 2.9.1 shipped. The option documents 0 as exactly that.

The AO itself stays. allowedAudioSpatializationFormats is a property of
AVSampleBufferAudioRenderer, and the compressed E-AC3 JOC sink lives there
too, while ao_coreaudio drives the HAL device and exposes no spatialization
control at all — CoreAudio is the fallback, not an alternative.

The cost is the latency the bound was added to remove: mpv multiplies --volume
into the samples as it hands them over, so a volume change stays inaudible
until the renderer queue drains. That is 2.9.1's behaviour, and the fix for it
belongs to the AO's gain domain rather than to how far ahead it may buffer.

Verified against the pinned MPVKit 1.0.16 libmpv on macOS: both option writes
are accepted, playback lands on ao_avfoundation and advances at 0.997x real
time. Runner's native suite passes.
2026-07-30 02:54:36 +02:00
edde746 31b3689740 fix(settings): list external players only when they are installed
Detection now runs off the UI isolate and covers every platform where
the answer can be trusted.

Availability was a plain platform check, so Linux always listed VLC, mpv
and Celluloid, macOS always listed VLC and IINA, and Windows always
listed VLC and PotPlayer whether or not any of them existed. Each player
now has a detector that asks exactly the question its launcher asks:
`sh -c 'command -v'` for PATH launches so the kernel performs the
executable check, NSWorkspace/Launch Services for `open -a`, `where.exe`
plus the concrete install paths for Windows VLC, and the registered URL
handler for PotPlayer and the iOS players.

Detection is asynchronous and memoised behind KnownPlayers.probe rather
than a Process.runSync in a static initialiser, which forked three
shells on the UI isolate during ExternalPlayerScreen.build. It is
prewarmed from startup, fails open when a probe throws, and keeps the
selected player listed when a detector misses it so a false negative
cannot leave the list with nothing selected.

iOS and tvOS gained LSApplicationQueriesSchemes entries for vlc and
infuse. Without them canOpenURL returns false for both schemes, so
_launchUrlScheme was already refusing to hand off to either player.

Android keeps the platform check: package visibility needs native
declarations, and a wrong answer there hides a working player.
2026-07-28 04:38:33 +02:00
edde746 e0bf66eea8 fix(runtime): harden application service boundaries 2026-07-24 03:46:46 +02:00
edde746 71d644c4ae fix(macos): stop CPU spin when display sleeps with video paused
When the display/system sleeps with a video paused, the window server
stops completing CAMetalLayer presents and mpv's MoltenVK swapchain wedges,
pinning one core at 100% until the app exits. occlusionState does not
reliably change on display sleep, so observe NSWorkspace screensDidSleep/
Wake to hide the metal layer (and drop the playback activity) while dark,
restoring on wake with a forced redraw when paused to avoid a stale frame.

Pairs with MPVKit v1.0.10, which gates libmpv presentation on the layer's
hidden state (check_visible) so presents actually stop while hidden.
2026-07-09 11:56:13 +02:00
edde746 422db75b5b feat(music): mpv audio playback engine with gapless queue service
Audio-only mpv core on every platform (dedicated
com.plezy/mpv_audio_player channels): parameterized android/windows/
linux mpv plugins and a new apple MpvAudioPlayerCore, all skipping
video/window paths (vid=no, audio-display=no, gapless-audio=weak).
MusicPlaybackService drives an in-memory queue with shuffle/repeat,
file-loaded-event gapless arming (property edges coalesce and the
android bridge drops them), per-track progress reporting, OS media
controls, audio focus, sleep timer, and error auto-skip.
PlaybackCoordinator enforces one live native player: starting video
disposes the audio core first.
2026-07-05 19:26:28 +02:00
edde746 cd9498abb8 refactor(player): centralize playback opening
close #1280
2026-06-10 02:26:26 +02:00
edde746 eba553413c fix(macos): allow LuaJIT under hardened runtime
close #1214
2026-06-01 02:46:37 +02:00
edde746 9b248a7a5b fix(macos): restore video layer on focus 2026-05-11 10:13:05 +02:00
edde746 bfb6aa01b9 fix(apple): use platform-specific mpv rendering 2026-05-10 13:33:02 +02:00
edde746 6f273b0aa8 fix(apple): align local network permissions 2026-05-10 09:39:43 +02:00
edde746 afda61119e fix(macos): sync restored fullscreen chrome 2026-05-09 11:35:36 +02:00
edde746 d38f7cf78f perf(player): reduce playback UI churn 2026-05-09 09:38:25 +02:00
edde746 1e6bd01987 fix(player): harden Apple PiP handling 2026-05-08 07:40:41 +02:00
edde746 cedd448ef2 feat(apple): use AVFoundation mpv output 2026-05-08 02:39:42 +02:00
edde746 060926b749 fix(macos): avoid double disposing mpv core 2026-05-03 10:59:30 +02:00
edde746 5010833da9 fix(mpv): avoid blocking runtime calls 2026-05-03 08:23:44 +02:00
edde746 dc74300ef5 fix: avoid macOS fullscreen playback stalls
close #934
2026-05-01 07:04:37 +02:00
edde746 024af35bf5 chore: add native formatting checks 2026-05-01 05:56:49 +02:00
edde746 56697303f9 fix: async mpv dispose on macOS 2026-03-28 17:55:34 +01:00
edde746 09ff47e19f fix: reduce CPU when paused and backgrounded on macOS 2026-03-21 08:36:25 +01:00
edde746 e95b768350 chore: update appcast.xml url 2026-03-21 00:04:10 +01:00
edde746 3d30ea1342 fix(macos): reduce idle CPU when video player is paused
- Remove vulkan-swap-mode mailbox (continuous GPU rendering even when paused)
- End playback activity assertion on pause, restore on play
- Fix PerformanceStatsService persistent frame callback leak
2026-03-12 23:22:58 +01:00
edde746 666b59c293 refactor(native-player): share player helpers 2026-03-11 01:30:11 +01:00
edde746 965d9540fa fix: double sparkle update check 2026-03-09 00:29:58 +01:00
edde746 c1e2bc36ea refactor: share Apple MPV core and media helpers 2026-03-06 10:16:33 +01:00
edde746 985ba5d2c7 fix: toggle PiP button closes PiP when already active 2026-03-06 03:08:28 +01:00
edde746 4121d568c8 fix: sanitize mpv event channel strings for valid UTF-8 2026-03-04 14:59:11 +01:00
edde746 2b72327013 fix: hide metal layer when window is occluded 2026-03-04 05:06:25 +01:00
edde746 8d3f448fdf feat(macos): add picture-in-picture support 2026-03-02 18:19:36 +01:00
edde746 79350b8d71 feat: set avfoundation as preferred audio output on macOS 2026-02-26 11:55:45 +01:00
edde746 93f693c5c4 fix: macos folder picker entitlement 2026-02-25 15:59:06 +01:00
edde746 403df31907 feat: native auto-update
close #521
2026-02-24 04:04:02 +01:00
edde746 0b1b18fd35 fix: macOS playback power management 2026-02-21 01:32:17 +01:00
Federico 90e8223c74 setLogLevel missing 2026-02-18 02:18:06 +01:00
Federico 348aa69a50 Update Info.plist 2026-02-17 17:58:53 +01:00
edde746 a61fca0588 perf: compact [propId, value] wire format for property events 2026-02-16 15:40:52 +01:00
edde746 ffc7d88ea1 fix(macos): light-grey video screen 2026-01-27 15:20:26 +01:00
edde746 9721e6bf3f fix: async MPV commands to prevent ANR 2026-01-20 01:14:45 +01:00
edde746 4453eb995e feat(macOS): save window position 2025-12-27 12:53:27 +01:00
edde746 9e506d3f68 refactor: replace macos_window_utils 2025-12-27 12:38:38 +01:00
edde746 e9d1055c60 fix: missing playback restart event 2025-12-23 03:31:27 +01:00
edde746 14f0e95a3d fix: mpv logs to app logger 2025-12-20 05:02:20 +01:00
edde746 dc44354036 feat: downloads 2025-12-12 02:59:27 +01:00
edde746 d214ade2c6 fix(darwin): dispose crash 2025-12-03 19:28:57 +01:00
edde746 09860f81c8 fix(ios): player rotation 2025-12-03 11:14:59 +01:00
edde746 aaf3e3651b fix: hdr on ios & macos 2025-12-03 08:18:21 +01:00
edde746 78a5ff0fe0 fix: darwin playback crash 2025-12-03 06:16:19 +01:00
edde746 75007a6f42 fix: hwdec toggle 2025-12-02 19:03:55 +01:00
edde746 d9cdde66d8 macos 2025-12-02 15:46:19 +01:00
edde746 a6effe208b squash 2025-10-22 12:45:29 +02:00