Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to implement a voice(and later video)chat between Vr devices and an angular frontend?

Hy, I'm working on an application that connects Vr devices (unity) with angular frontends by sending data to a Asp.net Core 3.1 Api.

Well, The whole connection is working by using SignalR Core to send json objects over. But one of the new requirements is that the both clients can comunicate with each other by using voice chat (and later video). In my research I have found that SignalR is not created to make these kind of calls.

We also found that CometChat is only for frontend and not for asp.net core or Vr devices. Agora sends the voice data to there own servers and then back but because it is sensible data it Must remain on our own servers (so asp.net core 3.0).

Any Idea's?

[UPDATE]

Hi, We have 3 applications.

1 Unity (platform WebGL)

2 Asp.net Core 3.1 WebAPI.

3 Angular(7.x.x) Frontend

The communication between 1-2 and 2-3 is made with SignalR.

In a tutorial we have implemented simple-peer into the angular project and made a connection between 3-2-3. Offcouse we want the connection now between 1-2-3 or 3-2-1.

The problem is we have no idea how to implement the WebRTC or simple-peer in Unity to make this connection (peer-to-peer).

We have bought and tried this asset and this unity package but i dont know how to implement it.

please any help? we're stuck

like image 798
Ties Theunissen Avatar asked Dec 22 '22 20:12

Ties Theunissen


1 Answers

Your best bet is to use a standards voice-chat plugin, like WebRTC Video Chat for the Unity client.

Then, create a scene with just the plugin and embed a WebGL player right into your HTML page (what you are calling your Angular frontend). This way, you can ensure pretty rigorous compatibility and stay within the boundaries of what the plugin author has actually tested, although it's possible any WebRTC-based video conferencing will be compatible.

You can also attempt to port (or study the code of) the Dissonance plugins to improve the quality of voice chat.

like image 136
DoctorPangloss Avatar answered Dec 25 '22 08:12

DoctorPangloss