0

I'm using an HLS url to stream live radio. It's set up to send 12 - 10 seconds chunks of audio, so two minutes total. I can listen to position and it will give me values up to about 1:47, then drop to 1:37. I'm assuming that is normal behavior for the two minute window of "live" I have. But the point being I get a position.

When I use audioPlayer.seek(position), position being the current position I'm listening to - Duration(seconds: 10), or even the default implementation of SeekHandler I get inconsistent behavior.

The common is calling when seek the position will reset itself to 0, the audio cuts out for a quick second and then plays from where it left off without having moved in position at all.

One attempt I made was to preload the audio using initialPosition, which showed the same behavior. Another attempt was to let the bufferDuration hit 30 seconds, seek to just before that position and then play, which also didn't help.

I guess I'm wondering if it's possible at all to do this. Maybe there is a way to cache the audio that has already been loaded/listened to and hang onto XX seconds of it so the user can rewind?

swiftymf
  • 21
  • 4

0 Answers0