Testing react native webrtc

What’s the best what to set up a webrtc test that will connect from mobile to web in peer to peer? Does anyone have an example ?

1 Like

@cryptotractor There’s a lot in that question. And “best” is based on your preferences/requirements.
If you don’t care about managing all the details of the connection, then there are lots of abstractions like PeerJs that you can use for the WebRTC part of it.

There are 3 main components that you’ll need:

  1. A web app using the built-in webRTC lib
  2. A signalling server to initiate the new connections, probably using sockets
  3. A native app using this package…react-native-webRTC

Both of the clients will hit the same signalling server back-end, which will negotiate the connection.

I’d recommend tackling this in that order as well. Get a frontend working locally with video calls, then add in a signalling server to connect from one local browser to another. Then attempt them native apps.

I maintain an example project of video calling locally using react-native-webrtc calling here https://github.com/baconcheese113/react-native-webrtc-minimal

2 Likes

Thank you so much for the information it is extremely helpful. I actually used that example and have it working locally. I found an example using socket .io and node.js to build it out but the app that I’m wanting to put it in I’m using AWS for . Another issue it needs to be hipaa compliant my app is and the AWS part is so I guess I need to find an encrypted signaling ? Any recommendations?

Not sure about that, socket.io can handle authentication middleware but I’m not that familiar with hipaa’s requirements

I have tried your webrtc sample example.Can you give some inputs on how to integrate with this my back end server ?

Hi @baconcheese113 thanks for your great advance, i already create a web app and di signaling server and in one device i just got the remote stream id, but why it cannot rendered on RTCView ?

Hi could you please link me to the socket.io and node.js example you found.
would be very helpful thanks