1.2.8 • Published 2 months ago

enx-uikit-react-native v1.2.8

Weekly downloads
-
License
Vcloudx License, ...
Repository
github
Last release
2 months ago

enx-uikit-react-native

Installation:

    npm install  enx-uikit-react-native

Getting started

Pre-Requisites:

  1. Install node.js

  2. Install and update Xcode (you will need a Mac)

  1. Install and update Android Studio
  1. Visual Studio Code (Recommended to use Latest version).

  2. Enablex Developer Account Sign up

  3. Run the following command to install React Native Video SDK

    npm install  enx-rtc-react-native
  1. An iOS or Android Device for testing the Application.

  2. 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

License

MIT © enablexer