-
Follow the official instructions to install React Native:
-
Install Node 8.3 or newer
-
Run the command in a shell:
$ npm install -g react-native-cli
-
Install Android Studio or Xcode for mobile application development
-
-
Clone this project. Install essential node modules with npm tool
$ npm install
-
Check the IP address of your computer. Set the parameter of your server host address (in
App.js
=>let host = "10.1.7.19"
). -
Connect your device to your computer. Build the app and install it on your mobile device. The following code is for an android device.
$ react-native start $ react-native run-android
-
Launch Janus server, backend server and Nginx server. (See janus-demo-docker)
-
Open this app in your mobile device. Press the button to communicate with Janus server and backend server.
-
Check the log of your Docker server to see if connection is successful.
The janus.js
and App.js
are based on a project which is no longer maintained and cannot work due to
obsolete APIs. By updating the use of some APIs, this demo can work now but needs amending.
Please regularly check the updating of the related library react-native-webrtc