Downloaded Sketches not Working in Chrome
Most appropriate sub-area of p5.js?
- [ ] Accessibility (Web Accessibility)
- [ ] Color
- [ ] Core/Environment/Rendering
- [ ] Data
- [ ] Dom
- [ ] Events
- [ ] Image
- [ ] IO
- [ ] Math
- [ ] Typography
- [ ] Utilities
- [ ] WebGL
- [X] Other (specify if possible)
Details about the bug:
- p5.js version: Current Web Editor
- Web browser and version: Chrome Version 85.0.4183.121
- Operating System: Happens on Mac, iphone and PC
None of the sketches I download from the p5.js web editor work in Chrome. Here is one that I uploaded to a sever: http://do.art.gvsu.edu/interactive21/sound/index.html They do work in safari and firefox.
this looks like an issue with p5.sound. i will transfer your issue to that repository.
@alsumwas I was facing a similar problem with chrome. I think the problem was due to the Autoplay Policy Changes of 2018. According to that, the "audio context" was not allowed to start until there was a user interaction with the domain. I feel adding a simple DOM element call initiating the sketch should solve the issue you are facing. :)
@nakul-shahdadpuri for that you can use userStartAudio() after some mouse event
@alsumwas I'm having the cross-origin issue. Is that the problem with the sketch here?