diff options
| author | Claude <noreply@anthropic.com> | 2026-09-21 09:10:50 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-09-21 09:10:50 +0000 |
| commit | 881447309129e6c3972a3ae1c5dde239a34c5128 (patch) | |
| tree | 9664227fb6f8a26a1645299d9a383340eb540175 /docs | |
| parent | eb1c69d47aaee463960909f99973da4cf791d801 (diff) | |
Playback: position persistence, completion rules, sleep timer
Where a listener got to is the only data here that cannot be reconstructed
from anywhere, so the rules around it are pure and tested rather than tangled
into Media3 callbacks.
PositionWriter depends on a narrow Playhead interface rather than Media3's
Player, which is far too large to fake. That was driven by the coverage gate
rejecting the first version: the component holding the app's only
irreplaceable data was reachable only from an emulator. Testing it caught a
real bug -- switching episodes carried the previous episode's write threshold
across, so a new episode's early position looked like a tiny move and went
unrecorded.
Completion is not a percentage. A test caught that too: 98% of a four-hour
recording still has five minutes of content, so the threshold now only applies
when what remains is plausibly credits rather than programme. A stored
position beyond the end restarts instead of seeking past the end and stalling,
which is what happens after a publisher re-encodes an episode.
Position is written on an interval, immediately on any backward seek, and
flushed on task-removal and destroy. Android kills a backgrounded media
process without warning, so waiting for a clean stop loses it.
The sleep timer fades rather than cuts. Extending adds to the time remaining
rather than resetting: "+5 minutes" with 30 seconds left means five and a
half, and silently dropping those 30 seconds is bad in a control used
half-asleep. My first implementation had this backwards; the test caught it.
Audio focus ducks rather than pauses -- spoken word survives ducking for a
navigation prompt far better than a pause mid-sentence.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018AwnALZL6bD4VBtATDVv3B
Diffstat (limited to 'docs')
0 files changed, 0 insertions, 0 deletions
