# No sound in Safari (find in chrome and firefox) - P5 Oscillator

**URL:** <https://discourse.processing.org/t/no-sound-in-safari-find-in-chrome-and-firefox-p5-oscillator/21969>\
**Category:** Libraries\
**Created:** [June 17, 2020, 9:01pm UTC](https://discourse.processing.org/t/no-sound-in-safari-find-in-chrome-and-firefox-p5-oscillator/21969 "2020-06-17T21:01:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![bedlamagogo](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bedlamagogo](https://discourse.processing.org/u/bedlamagogo)\
**Post date:** [June 17, 2020, 9:01pm UTC](https://discourse.processing.org/t/no-sound-in-safari-find-in-chrome-and-firefox-p5-oscillator/21969/1 "2020-06-17T21:01:39Z")

</div>

Hi All,

I have a project creating a synthesiser with a step sequencer which works perfectly in Chrome and Firefox - In Safari however there is no sound at all. All the functionality seems to be working just no sound… I have the latest version of P5 sound and cannot find any thing on here that can explain… there are no errors in the console so i have no idea where to start debugging.

[http://quicktestsynth-com.stackstaging.com](http://quicktestsynth-com.stackstaging.com)

> **[bedlamagogo/Synthersiser](https://github.com/bedlamagogo/Synthersiser)**
>
> Simple Synthersier using the P5.JS Sound Library. Contribute to bedlamagogo/Synthersiser development by creating an account on GitHub.

---

<div class="post-metadata">

**Author:** ![Sven](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sven/32/8293_2.png) [@Sven](https://discourse.processing.org/u/Sven)\
**Post date:** [June 17, 2020, 11:05pm UTC](https://discourse.processing.org/t/no-sound-in-safari-find-in-chrome-and-firefox-p5-oscillator/21969/2 "2020-06-17T23:05:18Z")

</div>

Hello, and welcome @bedlamagogo!

I think you’ve stumbled upon the user-must-interact-before-sound-can-be-played-feature. 😊

> [@Getting sounds to play in mobile?](https://discourse.processing.org/t/getting-sounds-to-play-in-mobile/20673/2):
>
> Hello @calfish, Some browsers, like Safari on iOS, won’t play audio unless the user interacts with the page first, like tapping a button. To successfully play audio in those browsers, you could add a “Press to play” button and start playing audio after the user tapped it. From [Apple’s Safari HTML5 Audio and Video Guide](https://developer.apple.com/library/archive/documentation/AudioVideo/Conceptual/Using_HTML5_Audio_Video/PlayingandSynthesizingSounds/PlayingandSynthesizingSounds.html#//apple_ref/doc/uid/TP40009523-CH6-SW1): Note: On iOS, the Web Audio API requires sounds to be triggered from an explicit user action, such as a tap.

---

<div class="post-metadata">

**Author:** ![bedlamagogo](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bedlamagogo](https://discourse.processing.org/u/bedlamagogo)\
**Post date:** [June 18, 2020, 6:02am UTC](https://discourse.processing.org/t/no-sound-in-safari-find-in-chrome-and-firefox-p5-oscillator/21969/3 "2020-06-18T06:02:29Z")

</div>

Thanks for the welcome Sven 🙂

I might be missing something as not sure what you mean by user must interact - there is a button called start/stop which calls a method to begin - would this be what you mean by user must interact

---

<div class="post-metadata">

**Author:** ![Sven](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sven/32/8293_2.png) [@Sven](https://discourse.processing.org/u/Sven)\
**Post date:** [June 18, 2020, 8:06am UTC](https://discourse.processing.org/t/no-sound-in-safari-find-in-chrome-and-firefox-p5-oscillator/21969/4 "2020-06-18T08:06:26Z")

</div>

Yep, a start/stop button is the solution. But your sketch is trying to do something with audio before the user has interacted (pushed that button). I get the following warning in Chrome’s JavaScript console when running your sketch:

 ![warning](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/f/ff3a1a479510e85b328fc0a98f70d317e844fb40.png)

The easiest solution is to use `userStartAudio()` – theres an [example in the p5.js Reference](https://p5js.org/reference/#/p5/userStartAudio).

---

<div class="post-metadata">

**Author:** ![bedlamagogo](https://avatars.discourse-cdn.com/v4/letter/b/8491ac/32.png) [@bedlamagogo](https://discourse.processing.org/u/bedlamagogo)\
**Post date:** [June 18, 2020, 8:31pm UTC](https://discourse.processing.org/t/no-sound-in-safari-find-in-chrome-and-firefox-p5-oscillator/21969/5 "2020-06-18T20:31:50Z")

</div>

> [@Sven](#):
>
> example in the p5.js Reference

Thanks so much for that it certainly helped with safari - I have some other issues in chrome to debug but that was a great help
