Implement the UI Kit

After the device, mic, and camera permissions are granted and a valid token is obtained, you can start using the enx_uikit_react_native framework.

Prerequisites

To use the enx_uikit_react_native Framework you must have the following:

  • A valid Token to join the room
  • Camera permission
  • Mic permission

Implementation

Import EnxVideoView from the installed UI kit location into your app and pass the token to it to join an RTC session with an assigned role for a user.

import {EnxVideoView} from "enx-uikit-react-native"
<EnxVideoView
token={tokenObj}
embedUrl = {this.state.embedUrl}
setting = {this.state.setting}
customButtonHandler = {this.customButtonHandler}
onDisconnect = {this.onDisconnect}
connectError = {this.connectError}
onPageSlide={this.onPageSlide}
onUserDataReceived={this.onUserDataReceived}/>
ParameterDescription
tokentoken to join an RTC session with an assigned role for the user
embedUrlThe Low Code Video Embed URL to obtain the configuration details if you want to import the Embed Tool settings into the UI kit.
settingSettings the Video Session Interface.
  • Use true to enable a feature; otherwise, use false.
  • Use Color Code to use different elements as needed.

Example given below:

setting: [
/* Enable Tools in Bottombar */
enxRequiredEventOption=[ {AUDIO:true},{VIDEO:true},{SWITCH_CAMERA:true},{SWITCH_AUDIO:true},
{GROUP_CHAT:true},{DISCONNECT:true},
{MUTE_ROOM:true},{RECORDING:true},{SCREEN_SHARE:true},{ANNOTATION:true},
{LOBBY:true},{REQUEST:true},
{ROOM_SETTING:true},{POLLING:true},{QNA:true}
{ CUSTOM_BUTTON: true,
imagePath: require('./image_asset/recording_on.png')
}
],
]

|onDisconnect| Get notified when user gets disconnected from Video Room.| |connectError| Get notified when user fails to connect to Video Room.| |customButtonHandler| To handle event for the custom button.| |onPageSlide| isShow flag true for open page and false for close page.| |OnUserDataReceived|Receive User data when any of the users sending the data ia n session.|