audio_waveforms icon indicating copy to clipboard operation
audio_waveforms copied to clipboard

fix: 🐛 Enable constant bitrate seeking for raw ADTS AAC on Android

Open lavigarg-simform opened this issue 5 months ago • 0 comments

Description

Raw ADTS .aac files have no seek table inside them. On Android, ExoPlayer had no way to find a position, so seeking did nothing — playback stayed stuck at 0 and the duration came back as unknown. iOS was fine.

What changed

  • Build the Android player so constant-bitrate seeking is turned on.
  • This lets headerless constant-bitrate streams (raw ADTS AAC, and similar MP3/AMR) be seeked by estimating the byte position from the bitrate.
  • Seeking and duration now work for raw .aac on Android, matching iOS.

Files that already carry their own seek info (MP3 with a Xing header, MP4/M4A, WAV) are untouched and keep using it.

Checklist

  • [x] The title of my PR starts with a Conventional Commit prefix (fix:, feat:, docs: etc).
  • [x] I have followed the Contributor Guide when preparing my PR.
  • [ ] I have updated/added tests for ALL new/updated/fixed functionality.
  • [ ] I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • [ ] I have updated/added relevant examples in examples or docs.

Breaking Change?

  • [ ] Yes, this PR is a breaking change.
  • [x] No, this PR is not a breaking change.

Related Issues

Closes #429

lavigarg-simform avatar Jun 26 '26 06:06 lavigarg-simform