jersey-streaming
jersey-streaming copied to clipboard
Question about streaming
I've found that when using this, for some reason, the initial streaming was taking really long(15-30 seconds), even after the first byte partial was returned.
Then after the initial loading was done, seeking around to different parts of the stream was instant.
I then tried viewing this in a browser, and it didn't seem to load parts of the file, until the file was all done. Then once scrolling around, it streamed correctly.
Is there a header I'm missing or something?
I don't know what I did to fix this, but here it was:
final RandomAccessFile raf = new RandomAccessFile(mp3, "r");
raf.seek(fromTo[0]);
writeAudioToOS(length, raf, stream);
raf.close();
stream.flush();
stream.close();