Questions
Native Media Player — can it duck other audio (nav-app style) instead of taking over the session?
I’ve built a GPS audio walking-tour app on Median (WebView wrapping my web app). Short narration clips are triggered by location as the user walks — including while the app is backgrounded or the screen is locked — and play over whatever the user already has going (Spotify, Apple Music, a podcast). It behaves like a navigation app’s voice prompts.
The behavior I’m after is audio ducking, the way Google Maps and Waze do it: when my narration plays, the user’s music dips in volume, my clip plays over the top, and the music returns to full volume when the clip ends. The music should keep playing throughout, just quieter — not stop.
What I’ve found so far:
• Web audio in the WKWebView can’t set this — WKWebView manages its own audio session and ignores the app’s category settings, so there’s no web-side fix.
• I tested the Native Media Player demo page with Spotify playing. It plays my audio in the background (great), but it stops Spotify and doesn’t resume it — i.e. it takes over the session as the “now playing” app rather than ducking.
Per Apple’s guidance for navigation/prompt apps, the correct native configuration is:
• Category: AVAudioSessionCategoryPlayback
• Options: .duckOthers + .interruptSpokenAudioAndMixWithOthers
• Deactivate the session with .notifyOthersOnDeactivation after each prompt
My questions:
- Can the Native Media Player (or any Median plugin/setting) be configured to duck other audio like this, rather than becoming the non-mixable “now playing” app?
- If not currently, is ducking (nav-app audio behavior) on the roadmap?
- If there’s no built-in option, is there a supported way to have Median apply this AVAudioSession category/options config for my build?
I’m on the Plus plan (I have the Native Media Player plugin). Thanks!