Automatic Handoff away from the Device #108

Closed
opened 2026-10-24 11:03:46 +02:00 by SBDeveloper · 1 comment
Owner

What to build

The Automatic Handoff away from the Device (see glossary, ADR 0026). While Armed, the Device watches its Bridge:

  • Weak signal prepares. A weak signal starts the Armed Paired Device resolving and buffering the current Track, without stopping anything. Recovery cancels that silently. This needs the Handoff's "ready before stop" split into a prepare step that can be cancelled and a commit.
  • Link loss or sustained weakness commits. The Bridge losing the headset, or a weak signal held long enough, completes the Handoff and releases the Bridge.
  • A failed Automatic Handoff pauses the handing Device (unlike a manual Handoff, which keeps playing), since nobody would hear it.
  • A receiver not playing to a headset (the headset was switched off at the desk) takes over paused.
  • Nothing playing: no Handoff, the Bridge is only released, and claimed again once it has the headset back.

The signal threshold and wait times are an advanced setting in the Bridge Plugin view, with defaults tuned on a Sony WH-1000XM4.

Acceptance criteria

  • Armed and playing, Bridge loses the headset: playback continues on the phone at the same position and the PC stops
  • Weak signal then recovery: no Handoff, no visible change, the phone drops what it prepared
  • Weak signal held past the wait time: Handoff commits
  • Receiver not ready in time: the PC pauses at its position, and both Devices show a notice where they can
  • Receiver not playing to a headset: it takes over paused
  • Not playing: only RELEASE, then CLAIM when the headset returns
  • Not Armed (toggle off, network Output, link down): nothing happens
  • Threshold and wait times can be changed in the Bridge Plugin view
  • Core tests cover these cases with a fixture Bridge and two Devices
## What to build The **Automatic Handoff** away from the Device (see glossary, ADR 0026). While Armed, the Device watches its Bridge: - **Weak signal prepares.** A weak signal starts the Armed Paired Device resolving and buffering the current Track, without stopping anything. Recovery cancels that silently. This needs the Handoff's "ready before stop" split into a prepare step that can be cancelled and a commit. - **Link loss or sustained weakness commits.** The Bridge losing the headset, or a weak signal held long enough, completes the Handoff and releases the Bridge. - **A failed Automatic Handoff pauses** the handing Device (unlike a manual Handoff, which keeps playing), since nobody would hear it. - **A receiver not playing to a headset** (the headset was switched off at the desk) takes over paused. - **Nothing playing:** no Handoff, the Bridge is only released, and claimed again once it has the headset back. The signal threshold and wait times are an advanced setting in the Bridge Plugin view, with defaults tuned on a Sony WH-1000XM4. ## Acceptance criteria - [ ] Armed and playing, Bridge loses the headset: playback continues on the phone at the same position and the PC stops - [ ] Weak signal then recovery: no Handoff, no visible change, the phone drops what it prepared - [ ] Weak signal held past the wait time: Handoff commits - [ ] Receiver not ready in time: the PC pauses at its position, and both Devices show a notice where they can - [ ] Receiver not playing to a headset: it takes over paused - [ ] Not playing: only `RELEASE`, then `CLAIM` when the headset returns - [ ] Not Armed (toggle off, network Output, link down): nothing happens - [ ] Threshold and wait times can be changed in the Bridge Plugin view - [ ] Core tests cover these cases with a fixture Bridge and two Devices
Author
Owner

Implemented on integration branch automatic-handoff (merge 2749fc6), with code-review fixes in merge fcc0d8d. Lands on main when that branch is pushed and merged.

Implemented on integration branch `automatic-handoff` (merge 2749fc6), with code-review fixes in merge fcc0d8d. Lands on main when that branch is pushed and merged.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
SBDeveloper/medley#108
No description provided.