fix(player): route notification next/prev to Sonos while casting — #171 #111

Merged
bvandeusen merged 1 commits from dev into main 2026-07-15 19:17:11 -04:00
Owner

Follow-up to PR #110 / release v2026.07.15. On-device verification confirmed the cursor sync + no-flicker works, but the notification/lock-screen next+prev buttons were dead during a cast (play/pause worked).

Root cause: the system media controls issue COMMAND_SEEK_TO_NEXT / COMMAND_SEEK_TO_PREVIOUSPlayer.seekToNext() / seekToPrevious(), which are distinct from the seekTo*MediaItem() methods the in-app buttons call (and which were already routed to Sonos). The former were un-overridden, so ForwardingPlayer forwarded them to the paused local delegate — the identity poll then re-synced the cursor back, so the buttons read as dead.

Fix: override seekToNext() / seekToPrevious() to delegate to the media-item variants (full Sonos path) when a UPnP route is engaged; plain local playback keeps the default behaviour. Completes milestone #171 Step 3 (#1606 / #606). CI green on dev (run 2391).

🤖 Generated with Claude Code

Follow-up to PR #110 / release v2026.07.15. On-device verification confirmed the cursor sync + no-flicker works, but the notification/lock-screen **next+prev** buttons were dead during a cast (play/pause worked). Root cause: the system media controls issue `COMMAND_SEEK_TO_NEXT` / `COMMAND_SEEK_TO_PREVIOUS` → `Player.seekToNext()` / `seekToPrevious()`, which are distinct from the `seekTo*MediaItem()` methods the in-app buttons call (and which were already routed to Sonos). The former were un-overridden, so `ForwardingPlayer` forwarded them to the paused local delegate — the identity poll then re-synced the cursor back, so the buttons read as dead. Fix: override `seekToNext()` / `seekToPrevious()` to delegate to the media-item variants (full Sonos path) when a UPnP route is engaged; plain local playback keeps the default behaviour. Completes milestone #171 Step 3 (#1606 / #606). CI green on `dev` (run 2391). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
bvandeusen added 1 commit 2026-07-15 19:17:05 -04:00
fix(player): route notification next/prev to Sonos while casting — #171
android / Build + lint + test (push) Successful in 4m9s
659554df0e
Device verification of v2026.07.15 found the notification/lock-screen
next+prev buttons dead during a UPnP cast (play/pause worked). Root cause:
the system media controls issue COMMAND_SEEK_TO_NEXT / COMMAND_SEEK_TO_PREVIOUS
-> Player.seekToNext()/seekToPrevious(), which are DISTINCT from the
seekToNextMediaItem()/seekToPreviousMediaItem() the in-app buttons call and
which MinstrelForwardingPlayer already routes to Sonos. seekToNext/Previous
were un-overridden, so ForwardingPlayer forwarded them to the paused local
delegate — nudging its cursor, which the identity poll then re-synced back to
Sonos, so the buttons read as dead.

Override seekToNext()/seekToPrevious() to delegate to the media-item variants
(the full Sonos path: optimistic local advance + AVTransport Next/Previous +
pending-transport gate) when a UPnP route is engaged; plain local playback
keeps the default behaviour. Fixes notification/lock-screen/Auto/Wear skip
during a cast. Completes milestone #171 Step 3 (#1606 / #606).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
bvandeusen merged commit 47de7be472 into main 2026-07-15 19:17:11 -04:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/minstrel#111