question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: Browsers don't respect setting preload to "none" in wavesurfer.load()

See original GitHub issue

Demo at http://codepen.io/anon/pen/QdVxbe

Preload is set to none: wavesurfer.load('https://wavesurfer-js.org/example/split-channels/stereo.mp3', peaks, 'none'); But if you check in “developer tools” the file is clearly loading on page load before the file is played. The DOM shows preload="none" so it is adding the attrbitue.

I understand that preload="none" is only a suggestion to the browser but if I manually add the <audio> element to the page it respects it: <audio controls preload="none" src="https://wavesurfer-js.org/example/split-channels/stereo.mp3">

Tested under Chrome 55.0.2883.87 and Firefox 51.0.1.

If you can give me an idea what might be causing this I’ll try to fix it.

@X-Raym

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:19 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
X-Raymcommented, Oct 29, 2017
0reactions
mspaecommented, Oct 29, 2017

Yes, I agree: In cases where this is useful (when you have peaks) you also know the length in advance and can provide wavesurfer with it.

I meant this commit as a reference how this could work (although this only works for the web audio backend currently) → https://github.com/katspaugh/wavesurfer.js/pull/1210/commits/1025d7263e32f087a3404012dbf0301e5f95b383

Read more comments on GitHub >

github_iconTop Results From Across the Web

WaveSurfer-WP Premium Add-On - ExtremRaym
Bug: Browsers don't respect setting preload to “none” in wavesurfer.load() · Issue #973 · katspaugh/wavesurfer.js · WordPress Premium Plugins ...
Read more >
WaveSurfer.js - MediaElement with preload set to none load ...
Insecure Resource. The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https....
Read more >
wavesurfer.js - Bountysource
I'm having a slight issue with pregenerated peaks. I like the default zoom level and display when loading a waveform without pre-generated peaks....
Read more >
wavesurfer.js won't load local file - Stack Overflow
As I understand, this is because for security reasons, browsers restrict cross-origin HTTP requests initiated from within scripts.
Read more >
Bug listing with status RESOLVED with resolution FIXED as at ...
Cant load libsandbox.so ... no such file" status:RESOLVED resolution:FIXED ... doesn't install most of the subdirs such as Browsers Reader Resource" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found