Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Integrate Voice chat in Unity WebGL

Discussion in 'General Discussion' started by Darshak07, Jan 19, 2022.

  1. Darshak07

    Darshak07

    Joined:
    Mar 15, 2017
    Posts:
    7
    Hi,
    I am Trying to Integrate voice chat in unity WebGL solution,
    So far I have tried Photon voice chat and agora voice chat but it seems that they are not providing any support for WebGL Platform.I have also explore webRTC but was not able to get any success.
    If anyone can direct me in a direction from where I can achieve this functionality for webGL Platform.
     
  2. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,877
    WebRTC is the way to go if you want this for WebGL, there are not really any out of the box solutions we had to develop our own. So sorry no resources to hand but you are on the right path. There are some assets on the asset store that you can use to learn from, but they cost a lot.
     
  3. Darshak07

    Darshak07

    Joined:
    Mar 15, 2017
    Posts:
    7
    Yes it seems that they need to setup Signaling server for that and the one which unity is providing is based on Nvidia Graphic card. The only option is that plugin with 120USD but they also provide one to one solution or peer to peer. Don't know if we can make it from java end and call for the some sort of dll setup from there.
     
    OleksandrMartysh likes this.
  4. MadeFromPolygons

    MadeFromPolygons

    Joined:
    Oct 5, 2013
    Posts:
    3,877
    We setup our own signalling server, which is the option I would recommend. We based it on this asset :https://assetstore.unity.com/packages/tools/network/webrtc-video-chat-68030 (which in turn has info inside on how to setup a custom signalling server, as well as provides an already working one to use for testing)

    That asset is only meant as a learning tool, it requires a lot of extra development to get anything even vaguely close to commercial quality, but it is a great stepping stone to get started on and I highly recommend it
     
  5. Darshak07

    Darshak07

    Joined:
    Mar 15, 2017
    Posts:
    7
    Thank you for inside tips I will surely check it out than.
     
  6. OleksandrMartysh

    OleksandrMartysh

    Joined:
    Dec 13, 2015
    Posts:
    25
    Hello there.

    I recently started doing a cross-platform chat project and was very surprised when I encountered the problem of voice transmission in the WebGL. There really is no ready-made solution here. Right now I'm using Mirror as netcode and this voice chat asset: https://assetstore.unity.com/packages/tools/audio/rt-voice-pro-41068 It works with WebGL, but there are quite a few problems (latency increases up over time, average sound quality, big impact on WebGL performance).

    Thanks for sharing info about WebRTC.I am going to check it out.
     
  7. ippdev

    ippdev

    Joined:
    Feb 7, 2010
    Posts:
    3,793
    Access to mic needed in Unity API for WebGL.
     
    akuno likes this.
  8. SHFuzeTech

    SHFuzeTech

    Joined:
    Mar 23, 2021
    Posts:
    2
    akuno and DungDajHjep like this.