Voice 2.31 - errors with Unity WebGL

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.


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


  • Tobias
    Tobias admin

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

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

    Any help is appreciated.

  • Tobias
    Tobias admin

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

  • 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)?


  • Tobias
    Tobias admin

    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.