gre / react-native-view-shot

Snapshot a React Native view and save it to an image
https://github.com/gre/react-native-view-shot-example
MIT License
2.64k stars 344 forks source link

Camera is rendered above other layers (broken zIndex?) #288

Open martinheidegger opened 4 years ago

martinheidegger commented 4 years ago

bug report

Both with .captureRef and .captureScreen a camera in the screen is always rendered above other elements.

Here are two screenshots of the Consento Screen

Taken with Android device screenshot: ↓

Taken with react-native-view-shot: ↓

Version & Platform

consento-mobile@1.0.0 /Users/m/Documents/consento/mobile
├─┬ expo@36.0.2
│ └── react-native-view-shot@3.0.2
└── react-native@0.61.4

Platform: Android

Expected behavior

Camera is rendered with the correct z-Index. If elements are above: they are rendered above.

Actual behavior

Camera is rendered above all other elements.

Steps to reproduce the behavior

  1. create a camera react-native element
  2. place another element above
  3. take a screenshot.
Dlessi commented 4 years ago

some issues

LillyBrainy commented 4 years ago

same issues, any luck ?

kruupos commented 3 years ago

Not really a solution but you can disable the rendering of the camera before taking the screenshot. I had the problem with using react-navigation as well. See https://github.com/react-native-camera/react-native-camera/blob/master/docs/react-navigation.md