Skip to main content
Version: 2.x.x

Known Issues - React Native

This page lists known issues in React Native SDK 2.x, along with workarounds where available.

Issue: On Android, the camera and microphone stay off for a host​

On Android, the SDK does not ask the user for camera and microphone access, and it does not start the camera or microphone without it. iOS asks on its own.

Fix: Ask for access with requestPermission() from useMediaDevice before a host calls join().

import { Button } from "react-native";
import {
Constants,
useMediaDevice,
useRoom,
} from "@videosdk.live/react-native-sdk";

function JoinAsHostButton() {
const { join } = useRoom();
const { requestPermission } = useMediaDevice();

const joinAsHost = async () => {
try {
await requestPermission(Constants.permission.AUDIO_AND_VIDEO);
await join();
} catch (error) {
console.error("Failed to join the live stream", error);
}
};

return <Button title="Join as Host" onPress={joinAsHost} />;
}
  • If you use joinWithoutUserInteraction, ask before you render RoomProvider.
  • Also ask before changeMode("SEND_AND_RECV") turns a viewer into a host.

Issue: The SDK works in a debug build but not in a minified release build​

If you shrink your Android release build with R8 or ProGuard, R8 removes or renames the SDK's videosdk.org classes.

Fix: Add these rules to android/app/proguard-rules.pro:

android/app/proguard-rules.pro
-keep class videosdk.org.** { *; }
-dontwarn videosdk.org.**

Keep the -dontwarn line, because the keep rule alone fails the R8 step with a missing-class error. A v1.x.x rule for org.webrtc.** no longer matches anything, so replace it with these two lines.

Issue: The build fails after upgrading from v1.x.x​

The build fails with errors about react-native-webrtc, :rnwebrtc or WebRTCModulePackage, or the app throws a TypeError for register when it starts.

Fix: v2.0.0 does not use react-native-webrtc or @videosdk.live/react-native-incallmanager. Remove the v1.x.x setup:

  • every register() import and call;
  • the :rnwebrtc lines in android/settings.gradle and android/app/build.gradle, and WebRTCModulePackage in MainApplication;
  • every live.videosdk.rnwebrtc entry in AndroidManifest.xml;
  • the react-native-webrtc pod in your Podfile.

Then add the v2.0.0 setup, including the VideoSDKRTC pod on iOS, as shown in Client Setup. With Expo, upgrade @videosdk.live/expo-config-plugin to version 2 and run npx expo prebuild --clean. The Migration Guide covers each step.

Issue: Virtual background from @videosdk.live/react-native-media-effects does not work​

@videosdk.live/react-native-media-effects does not work with v2.0.0, and it breaks the native build.

Fix: Uninstall @videosdk.live/react-native-media-effects. v2.0.0 has no background blur or background replacement. setVideoEffects() offers auto-framing, low-light, style and colour filter effects.

Issue: Audio Session Management Conflict in HLS​

On iOS, the SDK and react-native-video both configure the AVAudioSession. When both do, the mic can drop, Bluetooth routing can reset, or the app can stop responding.

Fix: Set disableAudioSessionManagement={true} to prevent react-native-video from managing the audio session. For audio output changes, use VideoSDK's setAudioDevice() method from useRoom().

import Video from 'react-native-video';

<Video
source={{ uri: hlsUrls.playbackHlsUrl }}
style={{ flex: 1 }}
paused={pause}
disableAudioSessionManagement={true}
/>

This is iOS only. If you use another library that also configures the audio session (for example, react-native-track-player), apply the same principle: only one library should manage the audio session during the room.

Got a Question? Ask us on discord