This is a demo app of using WebRTC with React Native. It's built with Expo and uses a custom development build.
| Join | Outgoing call | Incoming call | On call |
|---|---|---|---|
![]() |
![]() |
![]() |
![]() |
The easy way to build this app is to use Expo's build service (EAS). Although you can build it locally if you prefer.
Before you can build the app you need a few things:
- An Expo account
- Create a new project on EAS
- Update
extra.eas.projectIdinclient/app.jsonwith your project ID
After you linked your project to EAS, you can run yarn build:dev on the client directory to start a dev build.
This will generate a custom Expo client that contains react-native-webrtc and other packages that are not available on the Expo Go app.
Take a look at client/package.json to see other build scripts.
- Clone this repo
- Run
yarn installon bothclientandserverdirectories (in separate terminals) - Update
EXPO_PUBLIC_SIGNALING_SERVER_URLinclient/.envwith your signaling server URL (this can be your computer's IP address) - Run
yarn starton bothclientandserverdirectories - Install the custom dev client on your mobile devices
- Make sure the server and both devices are on the same network
- Open the app on two devices and start a video call
For the client, there are three files that you want to take a look at (the rest can be ignored):
client/App.tsx- This is the main entry point of the app. It contains the UI and links everything together.client/src/signaling.ts- This contains a class that lets you create signaling channels.client/src/useWebRTC.ts- This is the most interesting file. It contains all the logic for creating and managing WebRTC connections.
The server is only used for signling. It's a simple Socket.IO server that relays messages between clients.



