Skip to content

feat(mpv): add --audiounit-skip-session-management patch - #52

Merged
alexmercerind merged 1 commit into
media-kit:mainfrom
IgorKhramtsov:main
Jun 25, 2026
Merged

feat(mpv): add --audiounit-skip-session-management patch#52
alexmercerind merged 1 commit into
media-kit:mainfrom
IgorKhramtsov:main

Conversation

@IgorKhramtsov

@IgorKhramtsov IgorKhramtsov commented May 21, 2026

Copy link
Copy Markdown
Contributor

danielwilliamson added a commit to Insight-Timer/libmpv-darwin-build that referenced this pull request Jun 11, 2026
Adds the AO-scoped audiounit-skip-session-management mpv option from
media-kit#52, which is the build-side half of
media-kit/media-kit#1419.

Without this, mpv's ao_audiounit driver unconditionally:
  - sets AVAudioSession category to Playback+MixWithOthers on init
  - calls setActive:YES on init
  - calls setActive:NO on uninit

AVAudioSession is process-wide on iOS, so these calls fight any other
component that owns the session (e.g. audio_service). The visible
symptom in the spike: audio plays in background but the lock-screen
and Control Center now-playing HUD never appear because audio_service's
session configuration gets clobbered after AudioService.init.

With this option (and the Dart-side change to pass it as
audiounit-skip-session-management=yes), the embedder can keep full
ownership of the session and the HUD wires up normally.

Patch applies AFTER mpv-mix-with-others.patch — context overlap on the
setCategory call. Verified line numbers match v0.36.0.
@IgorKhramtsov IgorKhramtsov reopened this Jun 24, 2026
@alexmercerind
alexmercerind merged commit 1548a9a into media-kit:main Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants