2

I've got an application in React Native to be developed in Android and iOS, in which I'd like to take the camera stream, make some processing, and render it multiple times.

Imagine an app like Instagram, in which you can add filters to the camera live and it shows the applied filters with on live previews. It would be more or less the same.

I need to get the camera stream and be able to show it on screen multiple times.

I've tried react-native-camera, but it only lets me to get one instance of the camera to be shown.

With this same library, I've tried to take pictures in intervals of the camera and to render them via <Image> container but, of course, it's a performance kill and the app ends up crashing.

How can I achieve what I'm trying to do? Do you know of any module or any approach that allows me to do so?

Thank you.

6
  • I don't think there any modules that do this explicitly. There's WebRTC module that has this functionality but it would be an overkill to use it just for that.
    – Teivaz
    Dec 12, 2017 at 14:34
  • Thank you @teivaz! I was thinking about some kind of OpenGL module that accepts the camera stream (for example, take a stream from WebRTC module and pass it to multiple OpenGL instances that could render the stream with some processing made). I don't know if that makes any sense, but I don't know not even from where can I start...
    – Unapedra
    Dec 12, 2017 at 14:39
  • there's a couple of libraries that wrap native streams like video-stream or videocore. You can start with them.
    – Teivaz
    Dec 12, 2017 at 18:08
  • Thank you! Those are only for iOS, though! I'll start with them and let's see if I find something more suitable for my project! Thank you for your time and recommendations!
    – Unapedra
    Dec 13, 2017 at 7:45
  • Hey have you found a fix for this?
    – iThompkins
    Aug 12, 2019 at 2:25

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.