Keep the reading playing when the poem is scrolled, and let it be scrubbed #4
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/recitation-keeps-playing"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The bug
The reading stopped the moment you scrolled down the poem.
RecitationPlayerwas an item of theLazyColumn, inside the same header item as the breadcrumbs. Scrolling it off screen disposed it, which firedand cut the audio off mid-line.
The fix
The player is now pinned above the scrolling text, between the top bar and the list. It stays in composition for as long as the poem is open, so the reading continues — and it stays in reach while you read further down, which is exactly when a player is wanted.
Seek bar
Added, as asked:
1:23…4:56);scrubbingholds the pending value until the drag ends);MediaPlayer.seekToalready does this, so no media library was needed — theponytail:note is updated rather than invalidated.The bar and its two times are laid out left to right inside the otherwise right-to-left page, because time runs that way whatever the script.
Verified
Pinning confirmed on the tablet (2560×1600): the player bar stays at the top while the couplets scroll behind it. Builds clean, 63 tests pass.
Not verified: actual playback continuing across a scroll. I could not get the emulator to start streaming the MP3 (
AudioPlaybackConfiguration … state:idle), so the audio path itself is unproven here — the disposal cause is certain from the code, but a real device is the honest check.Pull request closed