Demo for usage of apiRTC.js with React Native.
ApiRTC is full WebRTC API SDK provided by Apizee: https://apirtc.com/
This demo is also using react-native-webrtc: https://github.com/react-native-webrtc/react-native-webrtc
npm install
. pod update
from ios folder (cd ios)npm run ios
or run project from Xcode workspacenpm run android
or run project from Android StudioFor this demo we use the ApiKey "myDemoApiKey". Please register on our website to get your own private ApiKey
Here is the list of supported feature depending on mobile OS
Feature | Android | iOS |
---|---|---|
Audio / video conf | :white_check_mark: | :white_check_mark: |
Mute audio | :white_check_mark: | :white_check_mark: |
Mute video | :white_check_mark: | :white_check_mark: |
Switch camera | :white_check_mark: | :white_check_mark: |
Media routing : SFU | :white_check_mark: | :white_check_mark: |
Media routing : Mesh | :white_check_mark: | :white_check_mark: |
Chat | :white_check_mark: | :white_check_mark: |
Record | :white_check_mark: | :white_check_mark: |
Screensharing | :white_check_mark: | :white_check_mark: |
Option in application sample :
Start application on your mobile, and connect to a room. Then you can open apiRTC Conference demo in the browser of your computer, and connect to the same room.
For Android, edit your AndroidManifest.xml file by adding :
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Screen sharing -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
For iOS, edit your Info.plist file by adding :
<key>NSCameraUsageDescription</key>
<string>Camera permission description</string>
<key>NSMicrophoneUsageDescription</key>
<string>Microphone permission description</string>
<key>RTCScreenSharingExtension</key>
<string>org.reactjs.native.example.reactNativeApiRTC.screenSharing-Extension</string>
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>fetch</string>
<string>processing</string>
<string>remote-notification</string>
<string>voip</string>
</array>
Make sure that you have set ANDROID_HOME value
Sample for mac : nano ~/.bash_profile add following lines in bash_profile file:
export ANDROID_HOME=/Users/fred/Library/Android/sdk/
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
source ~/.bash_profile //To apply modifications
echo $ANDROID_HOME //To check modifications
Our application includes the possibility to share screen on iOS. Several steps are needed to add this feature on your application : Here is the documentation to help you in this task.
NodeJs version 20.5.1 . (Check NVM if you need to have several nodeJs version)