I’m writing a Ruby on Rails application which allows a user to upload an
file, then play it back. I have it working to the point where a user can
those things, BUT there is an issue when seeking through the song. If a
seeks ahead (or lets it play) to a spot in the song, usually about 2/3
3/4 the way through the song, then attempts to seek back to the
(for example 0:20), the play timer will go to 0:20, like it should but
actual audio will start over again as if the user seeked to 0:00.
Right now I’m simply attempting to get the song to play in chrome’s
html5 mp3 player that it uses when passed an mp3 file. This is the code
using to serve up the file, hopefully with all the correct headers:
I think it has something to do with send_file not adhering to the
Content-Range headers. I’d appreciate any insight into this problem. I
like I’m so close because it pretty much all works, except for seeking
the beginning causing a new request.