P5.js: Using a variable or constant named URL in p5.js v1.0.0 causes p5.sound.js to crash.

Created on 11 May 2020  路  4Comments  路  Source: processing/p5.js

Hi,

It seems that using a variable or constant named URL in p5.js v1.0.0 causes p5.sound.js to crash. I put an example to reproduce as follows.

https://editor.p5js.org/kotobuki/sketches/piOPquY2P

p5.sound.min.js:2 Uncaught (in promise) TypeError: URL.createObjectURL is not a function
at p5.sound.min.js:2
at Array.map ()
at p5. (p5.sound.min.js:2)
at p5. (p5.js:63250)
at Array.forEach ()
at new p5 (p5.js:63248)
at _globalInit (p5.js:62466)

I confirmed with Chrome 81.0.4044.138 on macOS 10.15.4 I can't reproduce with p5.js v0.10.12.

Most helpful comment

URL is a browser default object that is attached to the window object. It should not be used as your own variable name. Variable name is case sensitive so you can use url instead.

All 4 comments

URL is a browser default object that is attached to the window object. It should not be used as your own variable name. Variable name is case sensitive so you can use url instead.

@kotobuki thank you for reporting this,
please follow @limzykenneth's advice :)

@limzykenneth @montoyamoraga
Thank you very much, I understood! I found this issue as a process of making an example of integrating the code snippet of Teachable Machine Pose Model and p5.js. I'll report this issue to Teachable Machine's repository.

thank you @kotobuki :) !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stalgiag picture stalgiag  路  3Comments

aferriss picture aferriss  路  3Comments

ghost picture ghost  路  3Comments

kappaxbeta picture kappaxbeta  路  3Comments

Vbbab picture Vbbab  路  3Comments