# Bug Bounty- Audio in IOS

**URL:** <https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984>\
**Category:** Libraries\
**Created:** [September 20, 2020, 2:18pm UTC](https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984 "2020-09-20T14:18:38Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hikinghack](https://avatars.discourse-cdn.com/v4/letter/h/cdc98d/32.png) [@hikinghack](https://discourse.processing.org/u/hikinghack)\
**Post date:** [September 20, 2020, 2:18pm UTC](https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984/1 "2020-09-20T14:18:39Z")

</div>

Hi! I made this little game for kids for the Smithsonian in Panama to teach about FFT functions and how scientists use spectrograms to identify animals in audio. But it doesn’t work on safari or chrome on iphones or ipads. **I have a $200 USD bounty on if someone can fix it.**

> **[Safari de sonidos](https://stri.si.edu/es/qdigital/safari-de-sonidos)**

I originally made it in Openprocessing, but then downloaded all the code to run off this github where the Smithsonian page kind of streams an embedded iframe on their page.

> **[Digital-Naturalism-Laboratories/Safari-De-Sonidos](https://github.com/Digital-Naturalism-Laboratories/Safari-De-Sonidos)**
>
> Spanish Language version of sound safari. Contribute to Digital-Naturalism-Laboratories/Safari-De-Sonidos development by creating an account on GitHub.

It uses the p5.sound library to get microphone audio and process audio samples to create FFT visualizations on the fly. I am guessing that might be around where the trouble lies.

Let me know if you are interested in chasing the bounty!

---

<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:** [September 20, 2020, 2:54pm UTC](https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984/2 "2020-09-20T14:54:55Z")

</div>

Hello! Smartphones and tablets are often constrained when it comes to memory (compared to desktops and laptops). The game uses a lot of memory.

When running it on my iPhone SE, the following is shown in the console:

 ![Total canvas memory use exceeds the maximum limit.](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/d/d18e7a8020566f308da265e8cb2cb07cfb0202d5.png)

Taking a quick peek, it looks like the game creates many canvases (I counted almost 40). Maybe you could fix the problem by not loading them all at once?

---

<div class="post-metadata">

**Author:** ![hikinghack](https://avatars.discourse-cdn.com/v4/letter/h/cdc98d/32.png) [@hikinghack](https://discourse.processing.org/u/hikinghack)\
**Post date:** [September 20, 2020, 4:46pm UTC](https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984/3 "2020-09-20T16:46:22Z")

</div>

Weird, i thought it would just make a single canvas, not totally sure how Openprocessing exactly works.

Maybe it turns each imported element in the preload() into a separate canvas?

Does the game actually run on your iphone and play sounds and react to your microphone? On my ipad it just does nothing.

Is it related to this problem with IOS stuff not doing HTML5 audio?

> **[Overcoming iOS HTML5 audio limitations](https://www.ibm.com/developerworks/library/wa-ioshtml5/index.html)**
>
> Though HTML5 audio can be great, it has many limitations as a still-developing specification. Mobile Safari introduces even more limitations. In this article, learn about HTML5 limitations in mobile Safari. Working examples provide solutions and...

---

<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:** [September 20, 2020, 9:17pm UTC](https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984/4 "2020-09-20T21:17:10Z")

</div>

> [@hikinghack](#):
>
> Maybe it turns each imported element in the preload() into a separate canvas?

Yeah, maybe, I don’t know what’s causing it. That would require more thorough troubleshooting.

> [@hikinghack](#):
>
> Does the game actually run on your iphone and play sounds and react to your microphone?

No, I can see the splash screen and start button, but nothing happens when I touch it.

> [@hikinghack](#):
>
> Is it related to this problem with IOS stuff not doing HTML5 audio?

No, the out of memory problem has nothing to do with the audio. You may have a problem with audio as well, hard to tell until the memory issue is resolved.

---

<div class="post-metadata">

**Author:** ![hikinghack](https://avatars.discourse-cdn.com/v4/letter/h/cdc98d/32.png) [@hikinghack](https://discourse.processing.org/u/hikinghack)\
**Post date:** [September 25, 2020, 6:50pm UTC](https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984/5 "2020-09-25T18:50:59Z")

</div>

by the way, how do you see the javascript console in IOS? i have an ipad with chrome and safari and am trying to figure that out

---

<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:** [September 25, 2020, 7:34pm UTC](https://discourse.processing.org/t/bug-bounty-audio-in-ios/23984/6 "2020-09-25T19:34:10Z")

</div>

I’m using the [Web Inspector feature](https://www.browserstack.com/guide/how-to-debug-on-iphone) to access the iOS JavaScript console remotely, from my laptop. If you don’t have access to a machine running macOS, you have to rely on another solution, like this [third party browser](https://apps.pdyn.net/inspect/) (I haven’t tried it myself). [Eruda](https://github.com/liriliri/eruda) is another one I haven’t tried. 😄

There’s seems to be a handful of alternatives out there if you search for _iOS javascript console_ or similar.
