p5.js-sound icon indicating copy to clipboard operation
p5.js-sound copied to clipboard

Sound not working in chrome, suggest updating reference with fix

Open zuuring opened this issue 4 years ago • 1 comments

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();
            }
        }

zuuring avatar May 21 '21 08:05 zuuring

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.

welcome[bot] avatar May 21 '21 08:05 welcome[bot]