useAudioPlayer
useAudioPlayer copied to clipboard
Seeking on streamed audio
Describe the bug There may be an issue when attempting to seek on live, streamed audio.
To Reproduce Steps to reproduce the behavior:
- run examples (yarn start in ./exampes)
- go to Basic Example and choose the live audio from the sound source drop down
- hit play
- 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:
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?
@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 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)