Sound examples don't work, error with p5.sound functions undefined
See original GitHub issueMost appropriate sections of the p5.js website?
Examples
What is your operating system?
Windows
Web browser and version
Firefox 103.0.1
Actual Behavior
When you load any of the Sound examples (for example https://p5js.org/examples/sound-preload-soundfile.html), it does not work.
Browser console shows Uncaught ReferenceError: loadSound is not defined
.
I’ve looked at #1141 but it seems to be an unrelated issue, and have tried different networks / phones. Have tried a hard refresh. I do not have a VPN or use Internet proxy.
In my Network tab in the Inspector, I do see p5.sound.min.js
is loaded with 200 OK, so I’m not sure why this is happening.
Expected Behavior
The sound examples should work.
Steps to reproduce
- Open https://p5js.org/examples/sound-preload-soundfile.html
- Notice the sound example never loads, console shows error
Would you like to work on the issue?
No, I’m not sure what the actual problem is.
Edit: I found the problem. It’s upstream server.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
p5 is not defined when trying to use p5.js-sound in v1.0.0 #453
Really looks like webpack issue. No context contains a variable called "p5". sound and sound.min equally affected. Currently solved by ...
Read more >p5.sound.js audioBuffer is undefined - Stack Overflow
It sounds a little weird but the implementation of p5.js requires that you instantiate its class to make it work.
Read more >I can't seem to play sounds in javascript using p5.js - Libraries
I am new to Js, and p5 and I was trying to play a mp3 from my computer, but I continually get this...
Read more >reference | loadSound() - P5.js
If called during preload(), the p5.SoundFile will be ready to play in time for setup() and draw(). If called outside of preload, the...
Read more >Can't play audio file with P5.Tone.js - Google Groups
i would first try updating to the latest Tone.js and p5.Tone.js shim (found in the examples/scripts folder of the repo) and see if...
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
@Qianqianye I’ve just done the temporary fix and everything should be back up now.
This is due to #1133 which I completely forgot about and the new release broke the library files again. @Qianqianye