- Home /
WebGL Audio on iOS Safari
Hello, wondering if there is any information regarding this topic.
At the moment, version 5.35f1 when you export to WebGL and run on iOS browsers the audio does not play. On Android, the audio does work on my HTC One m7.
The audio's compression format is Vorbis. I have not tested with PCM or ADPCM, not sure if that makes a difference.
@mmsra1756, did you ever figure out a solution for WebGL audio on iOS Safari?
Answer by Andy-Hennah · Nov 18, 2016 at 10:40 PM
We're getting the same problem. A really simple game with one audio source and a listener. Build it for WebGL (in Unity 5.4.2f2) and it works on Chrome, Firefox, Edge on desktops (Windows). It also runs on Safari, Chrome and Firefox on an iPad air with iOS version 10.1.1 (14B150) - however, there is no audio. We've tried several audio settings, load types and compression formats but nothing seems to work.
Has anyone out there got a WebGL game to play audio on an iOS device? (I know WebGL is not officially supported by UT at the moment - but any help would be gratefully received).
@coolraiman - I've seen you post stuff on here about getting WebGL to work on iOS (http://answers.unity3d.com/questions/1154651/does-unity-prefer-webgl-exported-content-to-run-on.html) - any thoughts from you?
Thanks @ScottYann. It's a good solution, but won't work for our implementation I'm afraid. We gave up trying to get WebGL to work on iPads and went the native route. $$anonymous$$aybe we will try WebGL again later. Thanks again Andy.
Answer by ScottYann · Feb 27, 2017 at 02:29 AM
hello @Andy-Hennah and @mmsra1756
This isn't the perfect solution but it works. You have to install your web page as a web app. For details see this forum post:
https://forum.unity3d.com/threads/webgl-audio-is-not-working-in-ios.418683/
Answer by LilGames · Sep 18, 2018 at 06:47 PM
There's this solution that requires playing an audio file via the main webpage first, to trigger audio on. It would seem that the WebGL template could be modified to include a "start game" type of button to accomplish this.
Your answer
Follow this Question
Related Questions
Audio in WEBGL on IOS devices -1 Answers
How do I reduce the CPU load spike caused by playing an audio clip? 1 Answer
Generate Chart with Data 0 Answers
Unity Video player in Safari Webgl 1 Answer
Issues with iPad Audio 0 Answers