ASP.NET Core and WebRTC for peer-to-peer video chat

Viewed 17559

What I want to achieve is a POC where two user are chatting in peer-to-peer videocall using ASP.NET Core and WebRTC (if it is necessary SignalR).

Mock screen

I read a lot of documentation about WebRTC and most of the example I found don't work because they show the old implementation of this protocol (for example this tutorial). Also, I saw this implementation on Github but it is using getUserMedia. I got the same error if I use the latest version of adapter.js.

error message

I googled a bit and I found other examples like one article on html5rocks: in this case the indx.html is working locally but if I deploy it on a server I get this error.

enter image description here

The last script I tried to use is Simple Peer.

The new and right way is, if I understood correctly, to use RTCPeerConnection and RTCDataChannel. I can't find a working example.

2 Answers

The getusermedia is only available on websites secured with the https protocol or when running in localhost. If it is http the getusermedia is not available.

Working examples are indeed hard to find. I have this github repository which uses simple-peer, has a signaling server and can connect 2+ users together with video chat. You can also try the DEMO of the repository.

Related