Unity-Technologies / UnityRenderStreaming

Streaming server for Unity
Other
1.31k stars 365 forks source link

[BUG]: Many to many broadcast setup not working for more than two users #670

Open TdXYZ opened 2 years ago

TdXYZ commented 2 years ago

Package version

3.1.0-exp.3

Environment

* OS: macOS Monterey 12.3.1
* Unity version: 2020.3.30f1
* Signaling: Websocket (Default settings in Render Streaming component)

Setup
* Local User who broadcasts audio and transform data to many clients.
* Local User has Custom Broadcast component similar to the Multiplay sample that OnOffer spawns remote users carrying receivers for audio and transform data whenever another client connects.
* Each person who connects is a local user and has remote users for any other person that connects and has connected. When a local user moves, the corresponding remote user moves as well.
* Essentially everyone broadcasts something to everyone else. It is NOT One to Many like in the Multiplay sample.

Steps To Reproduce

  1. Client A connects to webserver (Enter Play Mode in Unity or start .exe)
  2. Client B connects to webserver
  3. Client C connects to webserver

Current Behavior

Expected Behavior

The expected outcome as seen in bullet point 1 in Current Behavior should work for more than two users

Anything else?

karasusan commented 2 years ago

@TdXYZ

It is NOT One to Many like in the Multiplay sample.

Do you want to make the mesh network using p2p? I guess the web server provided by ours can not work for the mesh network.

TdXYZ commented 2 years ago

@karasusan The plan was to first test things out with a mesh network and then move on to an SFU. Are there any guidelines on how to set up an SFU with the render streaming package? We're currently trying to use Janus for that. Are there perhaps more suitable alternatives?

karasusan commented 2 years ago

@TdXYZ We have not tested it with SFU yet.

TdXYZ commented 2 years ago

If there are no plans to add many to many broadcast support in the future, then this issue can be closed,

karasusan commented 2 years ago

@TdXYZ We want to make the sample for integrating with SFU but I cannot promise when it is provided.

karasusan commented 2 years ago

memo: URS-107

karasusan commented 2 years ago

This thread in the Unity forum is interesting related to the issue. https://forum.unity.com/threads/providing-sfu-for-unity-renderstreaming.1315635/

eulersson commented 2 years ago

This is also related to this: https://github.com/Unity-Technologies/UnityRenderStreaming/issues/799

The possibility of connecting this wonderful plugin with existing media servers would be great. To perhaps create a new kind of signaling class that would sit inbetween URS and Janus VideoRoom.

karasusan commented 2 years ago

@docwhite Sure. SFU integraion is a good solution for users.