goldfire / howler.js

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

Mac Safari 15.3 Sounds Don't Play #1576

Open multiplayer-shop opened 2 years ago

multiplayer-shop commented 2 years ago

The Problem

Sounds do not play on iMac Desktop using latest Safari 15.3.

Reproducible Example

https://howlerjs.com/

Reproduction Steps

Demo on Howlerjs is silent: https://howlerjs.com/

Possible Solution

No response

Context

No response

Howler.js Version

v2.2.3

Affected Browser(s)/Versiuon(s)

Safari 15.3 on Mac Desktop

The-Linguist commented 1 year ago

Safari 16.0 can play it through Web Audio API if the Howler object is created after window load event fires and if the files were cached. But weirdly, over the Web Audio API, all sounds stop playing if your page/app displays an alert() and all sounds resume playing if your page/app displays a second alert() and keeps toggling like that. Setting Howler.usingWebAudio = false; solves that problem but the performance becomes poor as reaction time increases. We can only hope that Safari 17.0 or perhaps 18.0 will make things better.