bbc / peaks.js

JavaScript UI component for interacting with audio waveforms
https://waveform.prototyping.bbc.co.uk
GNU Lesser General Public License v3.0
3.16k stars 275 forks source link

esm failing on 206 status code #491

Closed Goddard closed 5 months ago

Goddard commented 1 year ago

Does esm support a 206 status code? I was looking at the code and it looks like it only wants 200.

Goddard commented 1 year ago

I change a couple lines to if (this.status !== 200 && this.status !== 206) {

and esm appears to work properly.

Using a release version sorry if this was already done in beta versions.

chrisn commented 1 year ago

Peaks.js doesn't make HTTP range requests, so isn't expecting a 206 response.

chrisn commented 1 year ago

I'll close this, as I believe it to be an issue with your web server and not something that needs fixing in Peaks.js. But please re-open if you can provide additional detail (e.g., the details of the relevant HTTP request and response headers).

chrisn commented 5 months ago

I've just seen Peaks.js fail on a 206 response, on the set-source demo page when switching between sources.

Searching around, I found this issue, which explains what's going on. It appears to be specific to Chromium browsers. See also https://gist.github.com/robertknight/e31f6448f3341189a8485c3cb0188aed and https://issues.chromium.org/issues/40647111.

chrisn commented 5 months ago

Fixed in v3.2.2.