p5.js-sound
p5.js-sound copied to clipboard
Sound not working in chrome, suggest updating reference with fix
Most appropriate sub-area of p5.js?
- [ ] Accessibility (Web Accessibility)
- [ ] Build tools and processes
- [ ] Color
- [ ] Core/Environment/Rendering
- [ ] Data
- [ ] DOM
- [x] Events
- [ ] Friendly error system
- [ ] Image
- [ ] IO (Input/Output)
- [ ] Localization
- [ ] Math
- [ ] Unit Testing
- [ ] Typography
- [ ] Utilities
- [ ] WebGL
- [ ] Other (specify if possible)
Details about the bug:
- p5.js version: version 1.3.1
- Web browser and version: 90.0.4430.212 (Official Build) (x86_64)
- Operating System: MacOS 10.15.7
- Steps to reproduce this:
Chrome at the moment blocks all sound functions from working due to permissions. I would suggest updating all of your reference library examples which include this fix at the bottom of each array.
function touchStarted() {
if (getAudioContext().state !== 'running') {
getAudioContext().resume();
}
}
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already.