WebRTC / Unity setup

Viewed 4536

I want to incorporate "simple" real-time video chat in my app on a Hololens. As far as read WebRTC is the way to go. So I grabbed the convenient NuGet Package of WebRTC for Windows.

PM>Install-Package WebRTC

I checked this two very fine examples:

http://www.cnblogs.com/Yixin-ran/p/webrtc.html

WebRTC for UWP, new RTCPeerConnection() doesn't complete execution

I learned a lot from these examples.

I also looked at the very complex chatterbox example.

My app is created in Unity. There starts my first problem. All the examples are based on WPF examples. You need the following statement.

 WebRTC.Initialize(this.Dispatcher);

This command seems to very important. But "this.Dispatcher" only exist in WPF programs. So I can't export my app as D3D program. More important.Even if I export my unity app as xaml this command only works in the Main.xaml.cs which is always overwritten by every unity export.

According to James Cadd there is a unity setup: https://blogs.windows.com/buildingapps/2017/02/22/real-time-communications-universal-windows-platform-webrtc-ortc/#PgZcxKplL46bdcST.97

Did someone have an idea how to correctly set this up in unity? Also if someone has an API link I would be grateful. I learned the syntax from those two examples so far.

Greets Senador

1 Answers
Related