I’m working on a project where all audio is functioning in the editor and in play mode. When I publish to WebGL, all audio that is initiated via a script seems to be functioning, but any audio that is initiated via a Playable Director is not working in WebGL. Note that the Playable Director elements other than audio function correctly, but the audio is not playing in WebGL.
I’ve tried setting the priority of the Playable Director Audio very high compared to other audio detected by the listener, but that didn’t seem to affect anything.
Does anyone have any tips or advice on how to rectify?
You could try checking the AudioClip.loadState before playing it, maybe you will need to wait for it.
So I checked my load state in Unity editor and the audioclip is loaded on start and plays successfully. I even tried selecting Load audio in background for all my audioclips and reuploading to unityPlay and it didn’t rectify the issue. Any other thoughts or anything that might be useful for me to provide to troubleshoot?
So I was able to get audio in the playable director timeline to play after setting the load type for the audioClip to Streaming. However now I’m running into an issue where it is only playing some audio and subject to delayed starts in WebGL even though it’s functioning fine in Editor. I’m wondering if it’s a limitation of WebGL and how much audio data can stream at a given time.
Do you know if that’s possibly the case or if there’s something else I might be missing?