MixedReality-WebRTC icon indicating copy to clipboard operation
MixedReality-WebRTC copied to clipboard

Does the latest unity-plugin now support one-to-many video communication

Open yalisandsoso opened this issue 3 years ago • 5 comments

What code do I need to change?

yalisandsoso avatar Mar 04 '21 09:03 yalisandsoso

Yes and no.

This is not supported as is by any WebRTC implementation, because this is not supported by the WebRTC standard. WebRTC is a peer-to-peer technology.

Now, you can combine WebRTC -- and MixedReality-WebRTC will support that (in fact most implementations should) -- with a media server, some server-side software that will connect via peer-to-peer to all clients and forward to each and all the audio and video, with various rules. An example is Janus which I know for a fact works with MixedReality-WebRTC (disclaimer: we are not affiliated in any way with Janus, but this is the only one I know a bit to talk about). But you need to implement the signaling protocol of Janus and a way to manage the connection to your server. And of course have a server in the first place. What you are looking for in particular is their "video room" plugin (demo here and code here). Janus uses some JSON-based signaling, and you need in particular to handle the following JSON messages (non-exclusive list):

- "janus" : "attach"
- "janus" : "message", "body" : {request: "join", ...
- various "janus": "event" messages related to SDP/JSEP and the video room itself

djee-ms avatar Mar 04 '21 09:03 djee-ms

Thanks for your advice. I'll try it right away

yalisandsoso avatar Mar 04 '21 10:03 yalisandsoso

@yalisandsoso hi,I also want to do the same thing that one-to-many video communication. But I don't know how to do what. So Can you give me some help? Thank you !

zhuisa avatar Aug 03 '21 11:08 zhuisa

If you require multi-peer to peer, then I suggest looking in to the Azure Communication Service instead https://azure.microsoft.com/en-gb/services/media-services/

As @djee-ms pointed out, WebRTC is primarily a peer to peer solution only, unless you build your own server backend relay system.

SimonDarksideJ avatar Aug 03 '21 12:08 SimonDarksideJ

Thank You

zhuisa avatar Aug 03 '21 13:08 zhuisa