tuanpq / react-native-webrtc-peerjs

Simple Video Call application implemented in React Native.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Native WebRTC PeerJS

This is a simple application illustrating video call written in React Native with WebRTC and PeerJS.

Screenshot

alt text

Implementation flow

TODO:

Setup development environment

https://reactnative.dev/docs/environment-setup

3rd Libraries

npm install react-native-webrtc@~1.100.1
npm install react-native-peerjs

iOS

Run on iOS simulator

  1. $npm install
  2. $npx pod-install ios
  3. $npx react-native start
  4. Open a seperate Terminal and run $npx react-native run-ios

Build debug ipa

  1. Open ios/LMS.xcworkspace file by Xcode
  2. Configure project's Build settings
  3. From Xcode's Product menu, choose Archive

Android

Run on Android simulator

  1. $npm install
  2. $npx react-native start
  3. $cd android
  4. $./gradlew assembleDebug --warning-mode all
  5. Open a seperate Terminal and run $npx react-native run-android

Build debug apk

  1. $mkdir android/app/assets
  2. $mkdir android/app/src/main/assets
  3. $npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
  4. $cd android/
  5. $./gradlew assembleDebug
  6. $cd app/build/outputs/apk/debug

Upgrade project

https://reactnative.dev/docs/upgrading

Troubleshooting

Build error

rm -rf node_modules
rm package-lock.json
rm yarn.lock
rm -rf ios/Pods
rm ios/Podfile.lock
npm install
npx pod-install ios
npx react-native start --reset-cache

3rd libraries

Here are some reference links to 3rd libraries.

About

Simple Video Call application implemented in React Native.

License:MIT License


Languages

Language:Java 34.3%Language:C++ 20.2%Language:JavaScript 16.8%Language:Objective-C++ 12.3%Language:Objective-C 6.7%Language:Ruby 4.5%Language:Shell 2.7%Language:Starlark 1.7%Language:CMake 0.8%