microsoft / WebRTC-universal-samples

WebRTC samples for the Universal Windows Platform.
178 stars 70 forks source link

How to use WebRTC in my own new/existing project? #43

Open YousufAzadSami opened 5 years ago

YousufAzadSami commented 5 years ago

I have build the PeerCC for Unity with the help from issue #40

  1. Now I want to use WebRTC in my Hololens project, how can I do that? To build PeerCC first a few .dlls need to be generated. How can I do that for my own project?

  2. I cannot build PeerCC(for Unity) for Android or Desktop platform. From this line in the repo readme I thought it would be possible. In my project I want to make video calls between different platforms. Is it not doable with this project? Or do I have to create separate projects for that?

PeerConnection Client This is the recommended sample for getting started with WebRTC on UWP. It's a port of the WebRTC.org PeerConnection sample and is compatible with the same sample on iOS, Android, running in Chrome, etc. It also now includes Unity and Mixed-Reality Capture support for HoloLens.

As you can see, I am a beginner, you patience and help is greatly appreciated.

PS: I cannot assign the question label to this issue.

jamescadd commented 5 years ago

Hi, to answer the second question this repo doesn't support Android/Desktop currently so you would have to leverage the WebRTC.org source (or another resource). I can see how the documentation was confusing in that sense - the meaning was that while Google supports iOS/Android/etc this repo adds UWP support.

As to the first question I hope that others will be able to assist, but I'm not well versed enough in Unity to walk you through. There is another sample in the works that is focused on Unity-first developers and may help but it's not ready for release yet.

Fritzwald commented 5 years ago

Hi again, To make it work in your own project is actually quite simple. You basically copy the entire Plugins folder into your project. Then the most important script is the ControlScript, it basically does all the Unity side work, so you want to have thta in your new project. Now of course you will not have the public variables to link up to it in the inspector (otherwise you'll get NullReference Errors), but you can create your own, or you can go through the ControlScript to remove/change the things you don't want. For example I removed the Input Field for the IP address and instead made the IP a public variable that can be changed in the inspector, because my server was always on the same PC anyway. I'm not sure what your knowledge of C# and Unity is, so I'll leave it at that for now. If you need for concrete help you can ask of course.

YousufAzadSami commented 5 years ago

@jamescadd

There is another sample in the works that is focused on Unity-first developers and may help but it's not ready for release yet.

Can you please tell me when this project might be out?

Currently I am working on a project, where we use Hololens to design and review different instruments in the industry, it's a research project in Fraunhofer Institute, Germany. It will be a great help to us to know the time so we can plan accordingly.

Thanks in advance for your response.

YousufAzadSami commented 5 years ago

@Fritzwald Thank you for your answer. I am between a beginner and intermediate. I will try and if I get stuck which I am sure will be, I will ask for help. Thanks again for your help, much appreciated.

jamescadd commented 5 years ago

The Unity-first project is moving along nicely, I believe the current goal is before end of this year. I can get you an update early next month that may be more precise. Ping me anytime.

YousufAzadSami commented 5 years ago

The Unity-first project is moving along nicely, I believe the current goal is before end of this year. I can get you an update early next month that may be more precise. Ping me anytime.

That is great news! That works just right with the timeline of our project. Will make sure to ping you here for update. Thanks so much!

jamescadd commented 5 years ago

Sure thing! I'd be interested to hear more about how Fraunhofer uses WebRTC, if you want to discuss further my email is jacadd on the Microsoft domain.

YousufAzadSami commented 5 years ago

Hey, is there any update on the project?

The Unity-first project is moving along nicely, I believe the current goal is before end of this year. I can get you an update early next month that may be more precise. Ping me anytime.

I will mail(jacadd@microsoft.com) you shortly about our project at Fraunhofer.

jamescadd commented 5 years ago

Replied to the email, but for visibility it's looking like January unfortunately. If anyone wants to keep an eye on this space check out the MRTK: https://github.com/Microsoft/MixedRealityToolkit-Unity