Commit Graph
61 Commits
Author SHA1 Message Date
edde746 e0a364e26a chore(tvos): remove the Atmos output diagnostics 2026-08-09 11:52:48 +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 6c14049e95 fix(tvos): make EAC3 playback conform to Dolby's guidance
Groundwork for #1300. Establishes the session, buffering and route
handling Dolby's application guide prescribes, and adds the diagnostic
arm needed to find out whether Apple's sample-buffer renderer can carry
Atmos objects at all.

Audio session, per the guide's sequence:

- Adopt the long-form playback profile in one atomic call at app launch
  and activate the session there. The SDK only accepts that policy with
  category Playback, a Default/MoviePlayback/SpokenAudio mode and no
  options, so it cannot be assembled from separate calls.
- Report the resolved rendering mode in the player, hidden unless the
  system resolves it. Apple only resolves it for CarPlay and AirPlay, so
  an unresolved value means unknown, never "not Dolby".

Diagnostics (Apple TV only, Settings > Video Playback > Atmos Output Test):

- Add a sample-buffer arm. It reads the asset with AVAssetReader at
  outputSettings nil and hands the untouched compressed buffers and the
  untouched format description straight to the renderer, with a variant
  that rebuilds the description the way playback builds it. Every
  existing mode went through AVPlayer, so nothing exercised the path
  playback actually uses; this is what tells us whether the renderer or
  our construction is at fault.
- Add an AirPlay route picker. AirPlay is the only route where the system
  resolves the rendering mode and the supported channel layouts, so it is
  what makes those observations reachable at all, and the AVPlayer arms
  now allow external playback so every arm can be compared on the same
  destination.
- Add a session-mode toggle for the one profile difference between the
  guide and previous playback behaviour.
- Report the session profile, supported layouts, both format
  descriptions, the magic cookie and the renderer status, and release the
  session on stop so a failed run cannot contaminate the next one.

Also bumps MPVKit to 1.0.14, which carries the matching audio output
work: the channel layout AVFoundation itself uses for Dolby content, a
renderer-failure observer so the fallback to PCM can actually run, the
prescribed feed ordering and preroll, flush recovery that re-supplies the
discarded audio instead of shifting later audio into its place, and
capability-driven fallback on route and capability changes.

This does not yet fix #1300. Whether the sample-buffer renderer can carry
JOC is still unknown; it removes every difference from the documented
setup that could explain the failure, and gives us the arm to answer it
on real hardware.
2026-07-26 20:42:58 +02:00
edde746 9f2e050797 fix(native): bound cross-platform lifecycle ownership 2026-07-24 03:56:40 +02:00
edde746 e0bf66eea8 fix(runtime): harden application service boundaries 2026-07-24 03:46:46 +02:00
edde746 574b8d524f fix(ios): don't claim audio session at app launch
The non-mixing playback session was activated in didFinishLaunching,
so merely opening the app stopped other apps' audio. Keep the category
configuration; playback start activates the session.
2026-07-07 08:55:26 +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 6d95e35448 feat(tvos): AVPlayer Atmos sink wiring + Atmos output diagnostics
Re-enables Audio Passthrough on Apple TV against the MPVKit EAC3-JOC
AVPlayer sink (pin bump to v1.0.8 follows), adds an AVPlayer test
harness + diagnostics screen for #1300, and makes loudnorm yield while
passthrough is active (fixes a latent spdif conflict on desktop too).
2026-07-02 15:52:10 +02:00
edde746 c404589382 style(native): fix formatting 2026-06-14 14:04:52 +02:00
edde746 a861a4110f feat(player): add mobile edge adjustments 2026-06-14 13:40:16 +02:00
edde746 97ba02f45e fix: flashbang 2026-06-12 02:40:42 +02:00
edde746 cd9498abb8 refactor(player): centralize playback opening
close #1280
2026-06-10 02:26:26 +02:00
edde746 8139fc2b17 fix(tvos): make HDR toggle disable Dolby Vision
HDR-off now forces SDR display criteria for DV like it does for HDR10,
and the runtime toggle re-applies the criteria. Refs #1262 (part A).
2026-06-06 14:17:52 +02:00
edde746 6b147e2053 fix(ios): enable PiP subtitles 2026-05-25 04:47:55 +02:00
edde746 1c8be031ae chore(ios): declare export compliance 2026-05-24 15:10:58 +02:00
edde746 d58007a9e2 fix(ios): keep PiP timebase renderer-owned 2026-05-19 20:09:23 +02:00
edde746 565885cc1e fix(ios): add privacy usage descriptions 2026-05-19 09:31:26 +02:00
edde746 e54bbb2214 fix(ios): restore video presentation 2026-05-15 18:16:07 +02:00
edde746 12b006ee0c fix(tvos): prime display criteria from metadata 2026-05-14 19:51:33 +02:00
edde746 de62c8530f fix(tvos): subtitle HDR path and player dispose hardening 2026-05-12 22:46:38 +02:00
edde746 0f4629f52b fix(tvos): explicitly link AVKit for avDisplayManager category 2026-05-12 22:46:38 +02:00
edde746 ae1f6d7822 fix(tvOS): trigger native Dolby Vision via preferredDisplayCriteria 2026-05-12 16:21:00 +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 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 de547884f8 fix(tvos): stabilize remote input and player build 2026-05-06 08:47:13 +02:00
edde746 88430ba7b6 feat(ios): support external display playback
close #984
2026-05-06 02:17:20 +02:00
edde746 5010833da9 fix(mpv): avoid blocking runtime calls 2026-05-03 08:23:44 +02:00
edde746 024af35bf5 chore: add native formatting checks 2026-05-01 05:56:49 +02:00
edde746 2479e1faaa feat: tvos support 2026-04-24 14:11:24 +02:00
edde746 4ee4a766d6 fix: pip background thread layout crash 2026-03-21 07:54:04 +01:00
edde746 666b59c293 refactor(native-player): share player helpers 2026-03-11 01:30:11 +01:00
edde746 581f665f58 fix: restore iOS inline player after PiP closes 2026-03-06 11:35:25 +01:00
edde746 c1e2bc36ea refactor: share Apple MPV core and media helpers 2026-03-06 10:16:33 +01:00
edde746 3b351d7634 fix: iOS OOM during PiP playback cycles
Cancel leaked stream subscriptions in video player dispose and flush
sample buffer layer on PiP teardown/cleanup to release video frames.
2026-03-04 17:34:30 +01:00
edde746 4121d568c8 fix: sanitize mpv event channel strings for valid UTF-8 2026-03-04 14:59:11 +01:00
edde746 a008f86ee2 feat(ios): add picture-in-picture support
close #44
2026-03-02 14:06:11 +01:00
edde746 f5715987fc feat: migrate iOS to scene lifecycle 2026-03-01 15:06:45 +01:00
edde746 df09d2249d fix: add missing setLogLevel handler to iOS MPV plugin 2026-02-19 21:22:08 +01:00
edde746 f508013aa5 fix(ios): remove processing background mode 2026-02-18 06:51:44 +01:00
edde746 a61fca0588 perf: compact [propId, value] wire format for property events 2026-02-16 15:40:52 +01:00
edde746 d986f0d2ea feat: migrate downloads to background_downloader
close #454
2026-02-14 18:02:49 +01:00
Matt Vogel 372767b142 Add Companion Remote for mobile-to-desktop control 2026-02-09 14:19:54 -05:00
edde746 9721e6bf3f fix: async MPV commands to prevent ANR 2026-01-20 01:14:45 +01:00
edde746 8b3b8ad596 fix(player): harden playback initialization against crashes 2025-12-29 20:47:35 +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 c6727baf07 fix: iOS usage descriptions 2025-12-19 10:13:16 +01:00