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.

SoundJs with preloadjs fails when sound already cached in browser

See original GitHub issue

I’m registering the sound in Preload and playing the sound very soon afterwards. If I clear the cache it plays fine,

If I reload the page I get this error

soundjs.min.js:18 Uncaught TypeError: Cannot read property 'length' of null
    at WebAudioPlugin.a._handlePreloadComplete (soundjs.min.js:18)
    at soundjs.min.js:17
    at a._dispatchEvent (soundjs.min.js:17)
    at a.dispatchEvent (soundjs.min.js:17)
    at a._sendComplete (soundjs.min.js:17)
    at a.b._handleAudioDecoded (soundjs.min.js:18)
    at AudioContext.<anonymous> (soundjs.min.js:17)

Any clues what might cause it?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
nguyenhuutinhcommented, Oct 8, 2019

try this createjs.Sound.removeAllSounds();

1reaction
jfrabonicommented, Mar 25, 2019

Same, still experiencing this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Latest Chrome Desktop update preventing SoundJS from ...
I didn't gone too deep into reading the source code of SoundJS, but it seems PreloadJS will trigger the creation of the AudioContext....
Read more >
SoundJS v1.0.0 API Documentation : Sound - CreateJS
Sound can be used as a plugin with PreloadJS to help preload audio properly. Audio preloaded with PreloadJS is automatically registered with the...
Read more >
Clear cache & cookies - Computer - YouTube Help
When you use a browser, like Chrome, it saves some information from websites in its cache and cookies. Clearing them fixes certain problems,...
Read more >
Creating Dynamic Web Content with CreateJS - Section.io
PreloadJS makes it super easy to load image and sound assets with only a few steps. ... Now, if you were to test...
Read more >
Create and publish HTML5 Canvas documents in Animate
You can now begin creating HTML5 content using the tools within Animate. ... suite comprises of: EaselJS, TweenJS, SoundJS, and PreloadJS.
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