WebGL and Photon Voice

Is there any plan for WebGL support? I understand that the voice related functionality needs threading that needs local resources access. Would be wonderful to get this WebGL supported. I have a need where game can not be installed on local machine.

Comments

  • This is hardly possible while Unity does not support microphone in WebGL.
  • Do you think Photon Voice could tie together with a 3rd part webGL microphone asset like this? -https://assetstore.unity.com/packages/tools/input-management/microphone-webgl-library-79989
  • Hi @Ishwar, @PitMouse,

    It was decided that Photon Voice will not support WebGL.
    Our plans are to use WebRTC in the future but we have no schedule.

    You could, try to make that asset work with Photon Voice but we have not tried it and don't have experience with it.

    Thank you for your understanding and patience.
  • Cheers @JohnTube fair comment
  • Might be a bit late but I have made that asset work as a audio-clip source for the Photon Voice Recorder. My problem with this use case though is that the voice connection process stops at ClientState ConnectingToNameServer. I have not touched any of the scripts concerning Photon Voice.
    @JohnTube May you know what the reason for this behaviour is?

    Best regards
  • JohnTubeJohnTube mod
    edited May 2020
    Hi @DontMash,

    Thank you for choosing Photon!

    Switch protocol to WebSocketsSecure (WSS) in WebGL.
    Photon clients use WebSocketsSecure protocol when connecting to Photon Cloud in Unity / WebGL.
    So WSS is needed.
    Update to the latest Photon Voice 2 (2.16.1 as of now).
    I mentioned the update to 2.16.1 because in older version we did not allow using a protocol other than UDP for connecting to Photon Cloud using a Photon Voice client.
    Now we do allow it and log a warning.
  • I installed the new version but it still does allow me to generate a WebGL version complaining about the Microphone does not exist coming from the MicWrapper.cs file. Was this version was supposed to fix with the WebSocketsSecure selected?
  • The presious post should read "I installed the new version but it still NOT allow me to generate a WebGL ". Thanks.
  • I looked into it but I can't seem to get hang of it.
    Where and how do I have to change the protocol?
    Is this Unity or Photon specific?
    I've tried this:

    PhotonNetwork.NetworkingClient.LoadBalancingPeer.TransportProtocol = ConnectionProtocol.WebSocketSecure;
    PhotonVoiceNetwork.Instance.Client.LoadBalancingPeer.TransportProtocol = ConnectionProtocol.WebSocketSecure;

    Both do not to the trick.
    @JohnTube may you help me again and specify your last answer?
  • Hi @RickB,

    Thank you for choosing Photon!

    As mentioned on the documentation here, WebGL is not supported.
    I was giving some pointers and hints (not tested, not recommended) for users who want to test adding microphone feed to Photon Voice.
    Photon clients use WebSocketSecure protocol when connecting to Photon Cloud in Unity / WebGL.
    So WSS is needed.
    I mentioned the update to 2.16.1 because in older version we did not allow using a protocol other than UDP for connecting to Photon Cloud using a Photon Voice client.
    Now we do allow it and log a warning.

    Hi @DontMash,

    If use PUN settings from PhotonVoiceNetwork then you should set the protocol in PhotonServerSettings.
    PUN automatically switches to WSS in WebGL, maybe we will do the same for Voice in the next updates although WebGL is not technically supported.
    if you do not use PUN settings then set the protocol in PhotonVoiceNetwork.Settings (or VoiceConnection.Settings).
    Increase the log level for Voice components and check the logs.
  • Hello!

    Also would love this feature. I am trying to get this working with some of the plugins described.

    I noticed there is this solution by Frostweep - https://github.com/frostweep/PUN2VoiceWebGLUnity

    Are you all planning on working on this for the plugin? Would be awesome to have a plug and play solution.

    If one of us gets it working would you consider incorporating it in the plugin?
  • Hi @cjoverbay,

    Thank you for choosing Photon!

    Well if you find a solution that works on WebGL for Photon Voice then you don't really need us to include it in the package as we would have to support it officially and guarantee it won't break with each update etc.
    So I don't think we are considering this.
Sign In or Register to comment.