Skip to content

Navigation audio ducks playback instead of pausing during Android Auto directions (audiobooks) #189

Description

@kusogejp

Describe your issue

When listening to an audiobook via Android Auto in the car, navigation speech/turn-by-turn directions cause AFinity to duck (lower) the audio volume instead of pausing playback. For music this ducking behavior is correct, but for audiobooks it means narration continues underneath the navigation prompt, causing me to miss key spoken content. Audiobook playback should pause for the duration of the navigation prompt and resume afterward, the way most dedicated audiobook apps handle transient audio focus.

Steps to reproduce

  1. Connect phone to car via Android Auto.
  2. Start playback of an audiobook in AFinity.
  3. Begin navigation in a maps app (e.g. Google Maps) with voice directions enabled.
  4. Wait for a turn-by-turn navigation prompt to trigger.
  5. Observe that the audiobook volume lowers but playback continues, rather than pausing.

Expected behavior

When a transient audio focus event occurs (such as a navigation prompt), audiobook playback should pause and then resume once the prompt finishes, so no narration is missed. Ideally this could be a toggle (pause vs. duck) so users can choose behavior per content type.

Screenshots or screen recording

N/A (audio-only issue). Can provide a screen recording if helpful.

Player

Not player related

Issue area

Audio tracks

Media information (if applicable)

Audiobook content played through AFinity connected to Audiobookshelf.

Logs

Additional context

This is the standard distinction between AUDIOFOCUS_LOSS_TRANSIENT (pause) and AUDIOFOCUS_LOSS_TRANSIENT_CAN_DUCK (lower volume). Ducking is appropriate for music but not for spoken-word/audiobook content. Consider treating audiobook playback as non-duckable, or exposing a user setting.

Device

Pixel 10 Pro XL

Android version

17

Afinity version

0.10.4-beta

Jellyfin server version

v2.35.1 (Audiobookshelf)

Connection type

Both (issue occurs in both scenarios)

Checklist

  • I have searched for similar issues before creating this one
  • I am using the latest version of Afinity
  • This issue is reproducible

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions