Open Steve-Morales opened 1 year ago
Im having the same issue :(
If you comment out the OnNegotiationNeeded event handler on the Unity side, it will work for the time being
If you comment out the OnNegotiationNeeded event handler on the Unity side, it will work for the time being
The issue is that it needs to run to be able to find ICE candidates. Please try setting it up on your end.
According to the WebRTC API specification, iceCandidate generation starts after executing setLocalDescription(). So running setLocalDescription() should start IceCandidate generation and trigger the onIceCandidate event.
@Steve-Morales Is this issue same as https://github.com/Unity-Technologies/com.unity.webrtc/issues/347 ?
Our stats represent this comment. https://github.com/Unity-Technologies/com.unity.webrtc/issues/347#issuecomment-1189741386
Package version
3.0.0-pre.5
Environment
Steps To Reproduce
Install Newsoft-JSON https://github.com/jilleJr/Newtonsoft.Json-for-Unity/wiki/Install-official-via-UPM
Install Native Web Socker https://github.com/endel/NativeWebSocket
In Unity, add the following script through a new empty gameobject and add the main camera (or duplicate camera)
Create a Nodejs server
npm i
to install (only do this once)npm start
to start server with the following codeWith a browser client (HTML/JS) index.html (open this file in your browser)
client.js
Current Behavior
Unity is sending the SDP first which triggers the OnIceCandidate event handler.
Expected Behavior
Unity should determine ICE Candidates (OnIceCandidate) then send the SDP.
Anything else?
This should be a direct translation of the JavaScript client WebRTC code. The additional libraries make sending message easy. The purpose is for Bidirectional Video sharing.