A
A
Alexander Kusak2018-11-13 12:38:11
safari
Alexander Kusak, 2018-11-13 12:38:11

Why doesn't Unity WebGL play audio in safari on mac?

There was such a situation. I assembled the game for WebGL and tested it on Windows in the Opera browser, as soon as the tests were successful, I launched the game on a poppy in safari and the sound in the game stopped working from the word at all. Although the sound that goes through the html5 audio tag works fine.
The game is launched via an iframe.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Kitmanov, 2018-11-13
@McFree

Faced a similar problem, however, on HTML5 games.
Some time ago some browsers started blocking audio in iframes (due to banners), but not all and very patchy. They start playing only if the action is explicitly initiated by the user (that is, the audio starts in the user input handler). Typically, the solution is to make the start screen silent and start playing the sound when the player clicks a button like "Start Game".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question