Skip to content

Black Screen in EffectPlayerView After Successful Initialization (Android / React Native)Β #12

@pareshbbi

Description

@pareshbbi

I am integrating Banuba React Native SDK using @banuba/react-native.
The SDK initializes successfully, the camera is opened, the player is started, and no errors are emitted β€” but the camera preview remains black.

All SDK lifecycle calls appear to succeed, and events confirm that the camera and player are running.


Expected Behavior

After:

  • initialize()
  • attachView(nativeTag)
  • openCamera()
  • startPlayer()

πŸ‘‰ The camera preview should be visible inside EffectPlayerView.


Actual Behavior

  • EffectPlayerView renders
  • SDK initializes successfully
  • Camera opens
  • Player starts
  • Camera facing switch works (no error)
  • Screen stays black
  • No SDK errors are emitted

Logs

πŸ“Ή Permissions not granted yet, skipping
βœ… Camera and Microphone permissions granted
πŸ“Ή Ref is null, skipping initialization
πŸ“Ή EffectPlayerView ref received, starting initialization...
🎬 Initializing Banuba SDK...
βœ… SDK initialized
Attempt 1 - findNodeHandle result: 3
βœ… Attempt 1 - Valid native tag found: 3
🎬 Step 1: Calling attachView...
πŸ“· Step 2: Opening camera...
▢️ Step 3: Starting player...
πŸ”„ Testing camera functionality...
βœ… Camera initialization complete
πŸ“· Set to front camera

No errors are reported via:

  • onError
  • onCameraOpen
  • onVideoRecordingStatus

Environment

  • Platform: Android
  • OS: Android 13 / 14 (tested on emulator & real device)
  • React Native: 0.79.5
  • SDK: @banuba/react-native
  • Architecture: New Architecture disabled
  • JS Engine: Hermes
  • Build Type: Debug
  • Device: Physical + Emulator

Permissions

Permissions are granted successfully at runtime:

  • CAMERA
  • RECORD_AUDIO

Initialization Code (Simplified Flow)

BanubaSdkManager.initialize([], BANUBA_TOKEN);
BanubaSdkManager.attachView(nativeTag);
BanubaSdkManager.openCamera();
BanubaSdkManager.startPlayer();

The nativeTag is obtained via:

findNodeHandle(ref)

which returns a valid numeric value.


What I Have Already Tried

  • Delaying attachView, openCamera, and startPlayer
  • Retrying initialization up to 3 times
  • Switching camera facing (front/back)
  • Testing on multiple devices
  • Verifying permissions
  • Ensuring SDK initializes before attaching the view
  • Verifying token validity (SDK initializes successfully)

Questions / Help Needed

  1. Is there any required order or missing call for Android preview rendering?
  2. Is EffectPlayerView compatible with Fabric / new RN versions?
  3. Does Android require an explicit surface lifecycle callback?
  4. Is there a known issue with black preview but running camera?
  5. Should startPlayer() be called before openCamera() on Android?

Reproducibility

βœ… 100% reproducible on Android
❌ iOS not tested yet


Additional Notes

  • Video recording starts without throwing errors
  • No crash or warning in Logcat
  • onCameraOpen event fires successfully
  • View background remains black (#000)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions