Unity client?
Thanks a lot to the Membrane team. The number of examples and availability of code has been incredibly helpful.
I was wondering if anyone has built a C# client. Specifically to work with Unity and WebRTC: https://docs.unity3d.com/Packages/[email protected]/manual/index.html
I'm building an audio experience for VR and the Oculus Quest 2 ... and although I know with Jellyfish there's an Android client (and React Native client, which works great) and TypeScript client as well ... just wondering if anyone has been down the Unity path.
Thanks again!
6 Replies
Hi, we didn’t have a chance yet. It seems very exciting though! Especially with Elixir being used for game servers 😉
thanks! i've been trying to port the TS client to C# ... slow-going 😅 . going to keep at it
let us know if you have any specific problems 😉
Hi, as Mat said, we don’t have a C# client yet. I want to clarify some topics about our SDK, which may help you:
- To minimize the number of race conditions, we decided to handle only one renegotiation at a time. That's why a message queue is implemented there. It could be done better, but we haven't had time to refactor it yet. We implemented it on top of our old code, so not everything is as simple as it could be. Considering how JS handles multithreading, such a simple solution sufficed for us. I suspect that in C#, this will need to be modeled differently.
- In the current implementation, it’s not possible to add both audio and video tracks in one renegotiation cycle. We plan to implement it in the future.
- I would advise against rewriting the code 1:1 from JS because it requires more refactoring, especially concerning private functions. We are aware that there is significant room for improvement here.
- There is a schema of RTC engine events written in ZOD https://github.com/jellyfish-dev/membrane-webrtc-js/blob/master/test/schema.ts
- This API is incomplete; we need to expose, for example,
disabledEncodings
or getStats()
from the connection RTCPeerConnection
.
- Lately, we implemented a metadata parser, and currently, it's not well-documented, so I wouldn't bother with it.
If you have any questions regarding the decisions made, the code, or if something is exceptionally unclear, please let us knowthanks for the clarification! i have a semi-working implementation now ... video only, but it works. may be a bit before picking it back up but i've made some good progress!
Good to hear! Is it open source?