useAudioPlayer icon indicating copy to clipboard operation
useAudioPlayer copied to clipboard

Seeking on streamed audio

Open E-Kuerschner opened this issue 1 year ago • 3 comments

Describe the bug There may be an issue when attempting to seek on live, streamed audio.

To Reproduce Steps to reproduce the behavior:

  1. run examples (yarn start in ./exampes)
  2. go to Basic Example and choose the live audio from the sound source drop down
  3. hit play
  4. click forward in the time bar

There will be an error. The seek function is being passed the value of Infinity.

Expected behavior Im not sure what the expected behavior should be. Maybe seeking should be disabled while streaming if we can detect that case.

Environment (please complete the following information):

  • Browser/ browser version:
  • Library version:
  • React version:
  • Node version:

E-Kuerschner avatar Apr 21 '23 20:04 E-Kuerschner

For streaming live radio, skip forward wouldn't be possible and I wouldn't expect to be able to skip backwards either. Any other streamed audio that might have a case for skipping forward or backward?

brianshano avatar Jul 15 '23 12:07 brianshano

@E-Kuerschner I'd expect to wait for the file to load and play it then.

@brianshano Any podcast player that fetches audio via streaming.

phemartin avatar Aug 02 '23 11:08 phemartin

@phemartin the audio in this case cannot be downloaded to completion. Internet radio streams would be an example of something that cannot (and should not) be seeked.

Im considering just disabling the seek functionality when the duration is Infinity (which is the value for audio like this)

E-Kuerschner avatar Aug 10 '23 01:08 E-Kuerschner