ApiRTC / reactNativeApiRTC

Demo application of ApiRTC with react-native
https://apirtc.com/
2 stars 0 forks source link
apirtc cpaas webrtc

ReactNativeApiRTC

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

Usage

iOS

Android:

ApiRTC key

For this demo we use the ApiKey "myDemoApiKey". Please register on our website to get your own private ApiKey

Supported Features

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 :

Compatibility

Demo Usage

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.

FAQ

Requirements

Restrictions

What are the authorizations that are need to be declared on application

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>

Android SDK

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

iOS Screensharing

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.

Which node version was used for tutorial testings

NodeJs version 20.5.1 . (Check NVM if you need to have several nodeJs version)