[UWP]WebRTC issue - Hololens unable to send video offer
Hello,
we developed a fully working webRTC UWP environment starting from this project (https://github.com/webrtc-uwp/PeerCC/tree/Mosa/20180320-peercc-unity). We developed a Desktop app (not Unity) and a HoloLens app (this one in Unity) to communicate with each other. Everything was good until we moved to a custom server (Xirsys in this case).
We then modified the Signalling script to adapt it to the new server which uses the MessageWebSocket instead of the StreamSocket that we used before with the peerccconnection_server.exe included in the sample demo.
The current scenario is: -Desktop connects to the server and waits for peers. -Hololens connects to the server and is added to the available peers' list. -Desktop can now call the Hololens and start communicating.
Hololens should send both audio and video, while Desktop only sends audio.
The actual problem now is the hololens is not able to send the video offer, so the app freezes and crashes. Audio is still working fine (just a few secs before the crash). If we try communicating between two Desktop clients everything works like a charm.
It would be appreciated some help to solve the problem.
Answer by francescocagnetta · Nov 21, 2018 at 04:35 PM
UPDATE 1: if we disable the video streaming from Hololens, setting the RTCMediaStreamConstraints.videoEnabled to false, the app works great streaming only audio both ways.
So the problem occours when trying to use the Hololens camera.
UPDATE 2: I put the constraints back to true for both clients, then I disabled _selfVideoTrack on the Desktop and try. The result is that now hololens streams audio and video correctly, desktop receives them and streams audio to Hololens (and it receives it), BUT, all the UI on hololens disappears and we get:
An unhandled exception of type 'System.AccessViolationException' occurred in xxx.exe Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
in the hololens client, in this method: public void Run() { m_AppCallbacks.Run(); }
Your answer
Follow this Question
Related Questions
Most controlls won't repond after switching platform to U.W.P. 0 Answers
How to Handle TypeLoadException when building the prooject for UWP? 0 Answers
On the xbox one, the collision sometimes stops working. 0 Answers
Changing material type in a URP Lit material does not take effect until material is viewed in editor 0 Answers