Repository navigation
Description
Summary
On Android, the lockscreen / status-bar "live notification" media control row for audiobook playback shows a Play button twice, and is missing a "skip to next" button. Screenshot (locked phone, DND on, "The Easy Way to Quit Caffeine" playing):
Control row observed, left to right:
▶ (play) |◀ (skip-previous) ▶ (play) ↺ (seek back) ↻ (seek forward)
Expected row (per the intended 5-button strip):
|◀ (previous) ↺ (seek back) ▶/⏸ (play/pause) ↻ (seek forward) ⏭ (next)
So instead of one Play/Pause glyph plus a genuine "next" action, the tile renders a duplicate Play glyph and drops/misplaces "next".
Likely area
PlaybackService.kt / LibravaultMediaCallback.kt
LibravaultMediaCallback.onConnect publishes a 5-button customLayout ([Prev | −seek | PlayPause | +seek | Next]) and explicitly strips the overlapping standard seek/skip commands from availablePlayerCommands so the system doesn't also derive standard-action buttons for the same controls (see the class KDoc, "What this publishes to the system media tile"). Player.COMMAND_PLAY_PAUSE is deliberately left in availablePlayerCommands, on the documented assumption that "the system tile's central glyph is driven by PlaybackStateCompat.state, not by a separate action slot."
The screenshot suggests that assumption doesn't hold on this device/Android version — the system appears to also derive a standalone play/pause action bit from COMMAND_PLAY_PAUSE being present in availablePlayerCommands, which lands as an extra button in the row alongside the custom-layout's own Play/Pause button, pushing out/misplacing "Next" (tile only has room for 5 slots).
Repro
- Start playing an audiobook.
- Lock the phone.
- Look at the lockscreen media notification control row.
Device/context from report
- Locked-screen "Live notifications" media card, DND on.
- Book: "The Easy Way to Quit Caffeine" by Allen Carr.
Suggested triage direction
Try removing Player.COMMAND_PLAY_PAUSE from availablePlayerCommands in LibravaultMediaCallback.onConnect (same treatment as the seek/skip commands) and verify against a real device/emulator whether the central glyph still updates correctly from PlaybackStateCompat.state alone, or whether that breaks something else the KDoc's assumption was protecting against. Needs on-device (or emulator) verification, not just unit tests — this is presentation-layer behavior driven by the OS's own MediaStyle notification rendering, not covered by PlaybackServiceTest/LibravaultMediaCallbackDispatchTest.
Screenshot
Reported inline in chat, not attached to this issue (file not available on disk to upload). Description above is transcribed directly from the screenshot.
Activity
libravault-xyz commentedon Aug 26, 2026
Still reproducing after the PR #511 fix — reopening
New screenshot from the reporter, taken Wed 26 Aug, 07:41 (after PR #511 merged to
devon 2026-08-24T16:42:28Z). Verified15817ea(the #511 merge commit) is an ancestor of the currentdevHEAD, so this is not a stale-build report — the fix is in the code the user is running.What's different now vs. the original report
Control row observed this time, left to right:
▶ (extra) |◀ (previous) Ⅱ (pause — correct state) ↺ (seek back) ↻ (seek forward)So it's no longer a literal duplicate Play glyph (the #511 fix did change the leading icon's appearance), but:
[Prev | −seek | PlayPause | +seek | Next], which pushes every custom button one slot to the right.Why this matters for the #511 fix's reasoning
PR #511 removed
Player.COMMAND_PLAY_PAUSEfromavailablePlayerCommands, on the theory that the duplicate came fromPlayerWrapper.createPlaybackStateCompatderiving a standalone play/pause action bit from that command, and that "the central glyph still tracksPlaybackStateCompat.stateindependently ofavailablePlayerCommands." This new evidence suggests that assumption is still not quite right: the leading slot is still being synthesized by something outsidecustomLayout/availablePlayerCommands— and now it's not even following playback state, it's just stuck showing "Play."That points away from
PlaybackStateCompat/availablePlayerCommandsentirely and toward how DefaultMediaNotificationProvider (Media3's stock notification provider, used unmodified here) builds the actualNotification.MediaStyleactions/compact-view on Android 13+ "Live notifications" — that's a separate code path from the legacyPlaybackStateCompat.customActionsthe KDoc's analysis was reasoning about. Worth checking whetherDefaultMediaNotificationProvideralways reserves a leading action slot for play/pause independent ofcustomLayout, and whether that needs to be suppressed/overridden (e.g. via a customMediaNotification.ProviderormediaButtonPreferences) rather than solved purely throughavailablePlayerCommands.Suggested next steps for dev-agent
LibravaultMediaCallbackConnectTestonly asserts onavailablePlayerCommands/customLayoutinputs, not on whatDefaultMediaNotificationProvideractually renders).DefaultMediaNotificationProvider's action-building logic (Media3 1.11) to see whether it always synthesizes its own leading play/pause action regardless ofcustomLayout, and if so, whether Media3 exposes a supported way to suppress it (e.g.setMediaButtonPreferencesinstead ofcustomLayout, per the AntennaPod migration the class KDoc already flags as not-yet-done).Reopening — not resolved.