chrome AudioPlayer seek doesn't work

the AudioPlayer class allows audio playback, but under chrome when using a StreamResource as the source you can not seek before the current playback position, or beyond the currently buffered content.

This is because Chrome does a Partial Content request and expects an appriate response (206). However Vaadin just response with the entire audio and doesn’t provide the appropriate headers or status code.

Has anyone encountered this and have a fix for it?

I’ve been able to extend DownloadStream to provide Partial Content responses which fixes the initial seeking problems.

However when chrome makes a subsequent request for the rest of the audio, vaadin responds with a 404 and the following is logged…

Oct 26, 2015 1:59:42 PM com.vaadin.server.ConnectorResourceHandler error
WARNING: Ignoring connector request for no-existent connector 266 in root 0

Any suggestions?


the 404 was actually from a previous request.

Once I got my range/content length set correctly, it now works