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:
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"<EnxVideoViewtoken={tokenObj}embedUrl = {this.state.embedUrl}setting = {this.state.setting}customButtonHandler = {this.customButtonHandler}onDisconnect = {this.onDisconnect}connectError = {this.connectError}onPageSlide={this.onPageSlide}onUserDataReceived={this.onUserDataReceived}/>
Parameter | Description |
---|---|
token | token to join an RTC session with an assigned role for the user |
embedUrl | The Low Code Video Embed URL to obtain the configuration details if you want to import the Embed Tool settings into the UI kit. |
setting | Settings the Video Session Interface.
|
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.|