Bug: Browsers don't respect setting preload to "none" in wavesurfer.load()
See original GitHub issueDemo 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.
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mspae FR created : https://github.com/katspaugh/wavesurfer.js/issues/1237 !
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