fix(mobile): restore lossless seeking and remove duplicate players #55

Merged
joshuafhiggins merged 2 commits from t3/fix-android-native-player-scrubbing into main 2026-11-01 17:32:40 -05:00
Owner

Android loses the system progress slider when lossless is enabled, and changing quality can leave a second, inactive player behind.

Serve lossless audio as a completed FLAC file through the existing byte-range response. Original FLAC files stream directly; other lossless sources convert once into a temporary cache. Android can now read the duration and seek instead of treating the response as a live stream. Forward Player.Listener callbacks explicitly, since Kotlin delegation skips Java default methods and was dropping timeline/duration updates. Release destroyed Android playlists immediately, with an idempotent guard for later garbage collection, so their basic media sessions do not linger.

Validation:

  • Reproduced both symptoms on the Pixel_10 emulator by changing from High to Lossless.
  • Web and mobile typechecks passed.
  • Android debug build passed.
  • Checked completed-file duration, concurrent conversion reuse, byte-range responses, and identical decoded audio hashes for an ALAC fixture and its FLAC conversion.
  • Installed the patched Android build on Pixel_10 and used an isolated playback harness with the completed lossless FLAC fixture. The system player showed the three-minute duration and sought forward to 1:31 and backward to 0:11.
  • Rebuilt the playlist three times. After each rebuild, dumpsys reported exactly one media session and no lingering basic session. The system seekbar remained available after the final rebuild.

The first request for a converted track waits for the FLAC file to finish. Both the server change and a rebuilt Android app are required.

Model: gpt-6.1-sol. Harness: Codex in T3 Code.

Android loses the system progress slider when lossless is enabled, and changing quality can leave a second, inactive player behind. Serve lossless audio as a completed FLAC file through the existing byte-range response. Original FLAC files stream directly; other lossless sources convert once into a temporary cache. Android can now read the duration and seek instead of treating the response as a live stream. Forward Player.Listener callbacks explicitly, since Kotlin delegation skips Java default methods and was dropping timeline/duration updates. Release destroyed Android playlists immediately, with an idempotent guard for later garbage collection, so their basic media sessions do not linger. Validation: - Reproduced both symptoms on the Pixel_10 emulator by changing from High to Lossless. - Web and mobile typechecks passed. - Android debug build passed. - Checked completed-file duration, concurrent conversion reuse, byte-range responses, and identical decoded audio hashes for an ALAC fixture and its FLAC conversion. - Installed the patched Android build on Pixel_10 and used an isolated playback harness with the completed lossless FLAC fixture. The system player showed the three-minute duration and sought forward to 1:31 and backward to 0:11. - Rebuilt the playlist three times. After each rebuild, dumpsys reported exactly one media session and no lingering basic session. The system seekbar remained available after the final rebuild. The first request for a converted track waits for the FLAC file to finish. Both the server change and a rebuilt Android app are required. Model: gpt-6.1-sol. Harness: Codex in T3 Code.
joshuafhiggins added 2 commits 2026-11-01 17:32:37 -05:00
joshuafhiggins force-pushed t3/fix-android-native-player-scrubbing from 3fe5513972 to 2cc21c9f30 2026-11-01 17:32:37 -05:00 Compare
joshuafhiggins merged commit 508f1602c8 into main 2026-11-01 17:32:40 -05:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: joshuafhiggins/otunes#55