Setup - React Native
Setting up react native sdk
@videosdk.live/react-native-sdk is a React Native library for real-time communication.
Minimum OS/SDK versions
@videosdk.live/react-native-sdk supports the following OS/SDK versions.
Android: minSdkVersion >= 24
iOS: >= 18.0
To run in the iOS Simulator, use a Mac with Apple silicon.
React: >= 18.0
React Native: >= 0.74
Install the library in React Native
The easiest way to get started is by installing @videosdk.live/react-native-sdk in your app.
- NPM
- YARN
npm install @videosdk.live/react-native-sdk@2.0.0
yarn add @videosdk.live/react-native-sdk@2.0.0
This is the only VideoSDK package you need.
Follow below link if you are setting up for specific platform
If you use Expo, you need a development build. Follow the Expo setup guide.
SDK-level functions
Functions that do not belong to a room are named exports of @videosdk.live/react-native-sdk. Import each one by name.
import { setLogLevel, getLogLevel } from "@videosdk.live/react-native-sdk";
const enableDebugLogs = async () => {
await setLogLevel("DEBUG");
console.log("Log level:", getLogLevel());
};
| Function | What it does |
|---|---|
setLogLevel(level?) | Sets how much the SDK logs. level defaults to "INFO". Returns a Promise. See Log Level. |
getLogLevel() | Returns the level last set with setLogLevel(). |
setKeyProvider(provider) | Registers the end-to-end encryption key provider. See useKeyProvider. |
getKeyProvider() | Returns the registered key provider, or null. |
removeKeyProvider() | Turns end-to-end encryption off. |
setParticipantKey(participantId, key) | Sets, rotates or removes one participant's key. |
setScreenFlash(flash) | true lights the screen for front-camera captures, false or null clears it. |
createCameraVideoTrack(options) | Creates a custom camera track. See Custom Tracks. |
createMicrophoneAudioTrack(options) | Creates a custom microphone track. |
createScreenShareVideoTrack(options?) | Creates a custom screen share track. |
runPreCallTest(options, onStatsChange?) | Tests the camera, microphone and network before a call. See Pre-call Test. |
stopPreCallTest() | Stops the pre-call test that is running. |
setVideoEffects(config) | Applies video effects. See Video Effects. |
getAppliedVideoEffectsConfig() | Resolves the video effects configuration in force. |
publishFramingSubject(cx, cy, width, height) | Publishes the subject auto-framing follows. |
To list cameras, microphones and audio devices, and to ask for camera and microphone access, use the useMediaDevice hook.
Got a Question? Ask us on discord

