Voice 2.31 - errors with Unity WebGL

The whole answer can be found below.

Please note: The Photon forum is closed permanently. After many dedicated years of service we have made the decision to retire our forum and switch to read-only: we've saved the best to last! And we offer you support through these channels:

Try Our
Documentation

Please check if you can find an answer in our extensive documentation on Voice.

Join Us
on Discord

Meet and talk to our staff and the entire Photon-Community via Discord.

Read More on
Stack Overflow

Find more information on Stack Overflow (for Circle members only).

Write Us
an E-Mail

Feel free to send your question directly to our developers.

Voice 2.31 - errors with Unity WebGL

fastict
2022-06-28 01:03:00

Unity 2022.1.5f1

Photon Voice 2.31 from Asset Store.

I'm getting a bunch of errors when trying to build on WebGL.

After putting in hacks to get the compiler errors ignored, I'm getting linker errors with undefined symbols.

Errors:

Assets\Photon\PhotonVoice\PhotonVoiceApi\Core\Platform.cs(52,30): error CS0234: The type or namespace name 'WebAudioMicIn' does not exist in the namespace 'Photon.Voice.Unity' (are you missing an assembly reference?)

Assets\Photon\PhotonVoice\Demos\DemoVoiceUI\Scripts\MicrophoneDropdownFiller.cs(108,30): error CS0103: The name 'Microphone' does not exist in the current context

Library\Bee\artifacts\WebGL\build\debug_WebGL_wasm\build.js: undefined symbol: opus_decode (referenced by top-level compiled C/C++ code)

See attached sshots

Comments

Tobias
2022-06-28 07:21:34

WebGL is not supported by Photon Voice 2 (as of v2.31).

abdnadeem382
2022-06-28 08:19:15

@Tobias We are facing the same problem. Any idea when Photon will be using WebRTC for WebGL support?

Any help is appreciated.

Tobias
2022-06-29 08:13:11

We don't have an ETA for this, sorry.

fastict
2022-06-29 19:14:43

Hi @Tobias,

Thank you for your response.

We are working on a cross-platform project, that incorporates Photon Voice. We use Voice on the other platforms.

While we would prefer to have full support of Photon Voice on WebGL, I understand that WebGL is a difficult platform to support.

Since our project uses Photon Voice for our other platforms, it would be really convenient if, even though it isn't supported on WebGL, it would at least build under WebGL.

We have incorporated hacks to OpusWrapper.cs and other places to disable Photon Voice under WebGL so we can build properly. But we would prefer an official solution.

I understand that you can't give an ETA for full WebGL support, but could you at least ensure that your product builds properly when incorporated into a project that has to support WebGL (even if it's disabled and/or reduced functionality)?

Thanks

Tobias
2022-06-30 13:53:43

Yes, ok, that makes sense. I thought, that (working export, maybe with a logged warning) is covered by Photon Voice.

We'll look into this.

RUbick
2022-09-21 17:09:43

Hello all,

I am having the exact same problem right now, any updates for this? Thanks!

RUbick
2022-09-21 17:40:17

Add more background: So we are also making a Cross-platform project. Thus, it will be super handy if we could just disable photon voice package #if UNITY_WEBGL. I have tried several times but could not found a proper way to do so. Any suggestions?

vadim
2022-09-26 12:55:39

We already put some effort in making Voice WebGL compatible. E,g. UnityMicrophone wrapper around Unity Microphone API is an abstraction which compiles on all platforms including WebGL. So maybe we just missed something. What exact errors do you have ?

We will test the next release for WebGL compatibility.

The simplest solution is to disable entire Photon Voice assembly for WebGL via conditional compilation symbol: https://docs.unity3d.com/Manual/ScriptCompilationAssemblyDefinitionFiles.html#conditional-assembly

Back to top