peerjs-react-native is a modified version of PeerJS to allow for use within a React Native application as opposed to a web browser.
PeerJS provides a complete, configurable, and easy-to-use peer-to-peer API built on top of WebRTC, supporting both data channels and media streams.
React Native WebRTC
Ensure that the react-native-webrtc package is installed and configured as per their documentation.
Include the library
with npm:
npm install peerjs-react-native
with yarn:
yarn add peerjs-react-native
// The usage -
import Peer from 'peerjs-react-native';
// Use the Peer object as you would via normal PeerJS.
// See documentation links below for reference.
This project exists thanks to all the people who contribute to the official PeerJS project.
PeerJS is licensed under the MIT License.