Audiokinetic의 커뮤니티 Q&A는 사용자가 Wwise와 Strata 커뮤니티 내에서 서로 질문과 답변을 하는 포럼입니다. Audiokinetic의 기술 지원팀에게 문의하고 싶으신 경우 지원 티켓 페이지를 사용해주세요.

WebGL Build does not play sounds despite no error messages or build issues

0 투표

Using the Experimental Web Platform and following all steps from Setting up Web Platform in the Wwise project, Installing the Wwise Unity Addressables Package and Changing the settings in Unity all the addressables banks build fine.

We build the WebGL builds exactly like the Windows and macOS builds by building the addressables after switching platform and building the project like regular Unity projects.

Sounds still work in Windows and Mac Builds, but WebGL build does not have any sounds despite the development build showing no error messages on runtime and the game running flawlessly. We have tried playing release and dev builds in Edge and Chrome.

Does anybody know where those issues could stem from?

문의 2023 9월 15 General Discussion Gérald Montúfar (110 포인트) 로 부터

1 답변

+1 투표
Hi there,

There are many different things that could cause this problem. It could be a failure in sink initialization, failure to serve the web page with proper CORS headers, failures to load the asset bundles containing the banks and media, or simply the web browser defaulting to a muted state.

Are there any errors popping up in the Console Log tab of the Dev Tools pane in Chrome? Usually, this is where you would see any errors generated by Wwise.

If nothing shows up there, you may want to try connecting the Wwise Profiler and see if the sound engine is actually processing audio events. Note that to connect the profiler to a web page, you will need to use the proxy server that ships with the Wwise SDK; please make sure to consult the offline documentation for the Experimental Web Platform.
답변 2023 9월 15 Philippe M. (540 포인트) 로 부터
Thanks for the tip with the Dev Tools pane.

You are right. I get quite a few errors in the Console Log tab of the Dev Tools pane.
First I get a "Failed to load resource: the server responded with a status of 404 (Not found)" but then all the Unity logs start and the game get's initialised.
Afterwards Wwise logs start.
1. Sound engine gets initialised successfully
2. Loading init bank
3. Main bank will be loaded after init bank
4. Error: WebSocket connection to 'ws://localhost:8095/' failed : 5942110 @ WebGL_Dev.framework.js:2000
5. Wwise WebSocket error: Event -> target: WebSocket -> binaryType: "array buffer"

Then Loaded Init bank with bank id, Loaded Main bank without bank id
Then I get a couple "Wwise Audio Context creation failures: ReferenceError: SharedArrayBuffer is not defined"
Loaded Main bank with bank id
Then [UnityCache] ‘https://localhost:51742/StreamingAssets/aa/WebGL/wwisedata_web_assets_all_....bundle' successfully downloaded and stored in the indexedDB cache
Then for each sound played "Wwise Audio Context creation failures: ReferenceError: SharedArrayBuffer is not defined" again.

I guess the "WebSocket connection failed" will be the root of the problem but I unfortunately have no clue how I could remedy this issue.
...