goldfire / howler.js

Javascript audio library for the modern web.
https://howlerjs.com
MIT License
23.29k stars 2.21k forks source link

seeking help re: Perf on iPad mobile Safari #1722

Closed raould closed 2 months ago

raould commented 2 months ago

The Problem

thanks for making this library, very excited/hopeful to be able to use it to make life easier across html5/js devices! i am doing something wrong, need to learn what i can do in this case:

I am probably "holding it wrong" in some way?

loading: https://github.com/raould/pn0gstr0m/blob/752023b9d88762ae5c0b8916d0ef04eb4f914ef6/main.js#L1452

playing: https://github.com/raould/pn0gstr0m/blob/752023b9d88762ae5c0b8916d0ef04eb4f914ef6/main.js#L211

Reproducible Example

https://raould.github.io/pn0gstr0m/

Reproduction Steps

load https://raould.github.io/pn0gstr0m/ and play the game until there are enough pucks to reproduce the sound playback issue. (Note that when i run a version with the calls to sfx.play() commented out i do not get the lag/hang/hitchiness, that's why i am wondering if it is a sound playback issue.)

Possible Solution

Is this something about making too many play calls? i am trying to only create each sound once per game. Is there anything to be garbage collected too much, and mobile Safari is just not as good as desktop browsers in this case?

Context

The game becomes unplayable on the mobile Safari iPad OS version i have available for testing.

Howler.js Version

2.2.4

Affected Browser(s)/Versiuon(s)

iPadOS Safari, whatever version is on "iPad Pro (11-inch)" iPadOS Version 17.4.1 / reports as AppleWebKit/605.1.15 (KHTML, like Gecko) Version 17.4.1, Safari/605.1.15

raould commented 2 months ago

hi -- woah, well after all that -- i noticed a howler issue discussion mentioning the html5 boolean, which i have always had set to true. I just set it to false and now everything is working ok for me on ipad safari.