I have an Html audio tag where the src is set with a Blob Url of a wav file recorded with the WebAudio Api. When seeking to a different part of the audio, the 206 Partial Content response headers are populated with an incorrect Content-Length and Content-Range.
If I have a ~5 second audio clip that is 483,371 bytes long and seek to 2.4 seconds on the audio element, I am seeing the requests being populated with content-length/range for what it WOULD be if I was seeking to 4.8 seconds (or double whatever I seek to).
What I am getting:
Content-Length: 24620
Content-Range: bytes 458752-483371/483372
Content-Type: audio/wav
What I SHOULD be getting:
Content-Length: 232019
Content-Range: bytes 251353-483371/483372
Content-Type: audio/wav
If I seek to over half of the audio length, my audio doesn't play and the player gets sent back to 0. If I seek to 1 second of a 5 second clip it will get the last 3 seconds of the audio, visually display it playing from 1 second to 4 seconds, then stop playing (since it is for some reason doubling the starting position of the byte range, I am getting bytes for seconds 2-5 instead of 1-5.)
I am debugging in google chrome, has anyone else experienced this issue or have any ideas on what it could be? Would it be easier to just write my own GET requests with the correct response headers?
thoughts: It is a mono channel .Wav file,could it possibly be calculating the start time of a dual channel .wav file?
There are no other audio elements on the page, so it wouldn't be any sort of interference.
Where would I go to debug or override this 206 Partial Content Request?