enx-uikit-react-native
v1.2.11
Published
It is a react native component for Enablex users.
Downloads
55
Maintainers
Readme
enx-uikit-react-native
Installation:
npm install enx-uikit-react-native
Getting started
Pre-Requisites:
- React Native iOS installation instructions
- Install and update Android Studio
- React Native Android installation instructions
Visual Studio Code (Recommended to use Latest version).
Enablex Developer Account [Sign up] (https://portal.enablex.io/cpaas/trial-sign-up/)
Run the following command to install React Native Video SDK
npm install enx-rtc-react-native
An iOS or Android Device for testing the Application.
Basic understanding of React Native development
Define Device Permissions: You must have camera and microphone premission
For Android
Open the AndroidManifest.xml file and add the required device permissions to the file.
<manifest>
...
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
...
</manifest>
After adding the permission in AndroidManifest.xml file, do code in your app level to show dialog to grant permissions.
For IOS
Go to you project -> iOS folger -> and open the info.plist
add NSCameraUsageDescription and NSMicrophoneUsageDescription. This is needed to add permission into your application.
Now go to your project folder through terminal > iOS > and install POD using the following command:
pod install
Usage
import React, { Component } from 'react'
import {EnxVideoView} from 'enx-uikit-react-native'
class Example extends Component {
render() {
return(
<EnxVideoView
token={Valid EnableX Token}
onDisconnect = {handle disconnect event}
connectError = {Handle Room error event}
/>
)
}
}
For More Information
To know more about UIKIT SDK , [Go To] (https://www.enablex.io/developer/video/solutions/video-ui-kit/react-native-video-uikit/)
License
MIT © enablexer