microsoft / MixedReality-WebRTC

MixedReality-WebRTC is a collection of components to help mixed reality app developers integrate audio and video real-time communication into their application and improve their collaborative experience
https://microsoft.github.io/MixedReality-WebRTC/
MIT License
898 stars 278 forks source link

Hololens 2 - Windows 10 UWP App communication #789

Open Matteo-0 opened 2 years ago

Matteo-0 commented 2 years ago

Hello, I am trying to build an application in unity for hololens 2 to be able to see what is happening on the desktop of my computer and send it to the hololens using MR-WebRTC. I created, following the tutorial at the following link: https://microsoft.github.io/MixedReality-WebRTC/manual/cs/helloworld-cs-uwp.html a UWP app running in my Windows 10 PC that is able to capture the frames captured from a virtual camera (SplitCam) running on my PC. Also I added to this application a button that calls the CreateOffer() function to establish the WebRTC communication. Then I created in unity the application that I need to upload on the hololens 2. So, following the tutorial at this link: https://microsoft.github.io/MixedReality-WebRTC/manual/unity/helloworld-unity.html I created the "MySignaler", "MyPeerConnection", "RemoteVideoPlayer" GameObjects, that I populated as it is shown in the pictures:

MySignaler MyPeerConnection RemoteVideoPlayer

The http Server Address is the one of the computer running node-dss while the RemotePeerID is the one of the UWP app running on Windows 10. I then Build the unity app and upload it on the hololens. From the node dss terminal I can see that both peers are connected to the node-dss, so to establish the communication I press the button in the UWP app that I mentioned before. When I do this in the hololens app an error appears saying: "reference not set to an instance of an object" and on the terminal running node-dss I cannot see anymore the ID of my hololens 2. The only error that I can think I did is maybe setting the Transceveir as shown in the picture but I am not sure.

Hope anyone can help me because I am really running out of ideas.