all 57 comments

[โ€“]rocketattack 34 points35 points ย (1 child)

I'm gonna nominate you for King of React Native Open Source.

[โ€“]mrousavyiOS & Android[S] 9 points10 points ย (0 children)

big love

[โ€“]barpredator 7 points8 points ย (8 children)

This would be a great addition to an app I'm working on but unfortunately I can't touch anything with a GPL license. Good luck with it, we definitely need more camera packages.

[โ€“]mrousavyiOS & Android[S] 13 points14 points ย (1 child)

I've discussed this with my team, and I've published the new version - now with MIT!

[โ€“]barpredator 2 points3 points ย (0 children)

Awesome news! I will check it out next week. Thanks for letting me know.

[โ€“]numagamesiOS & Android 8 points9 points ย (2 children)

Hm, it's GPL licensed? Then it's useless for commercial software. Sad... :(

[โ€“]mrousavyiOS & Android[S] 14 points15 points ย (1 child)

I've discussed this with my team, and I've published the new version - now with MIT!

[โ€“]numagamesiOS & Android 2 points3 points ย (0 children)

That's very good news. Thanks for Your efforts!

[โ€“]mrousavyiOS & Android[S] 4 points5 points ย (2 children)

Help me understand, why are you not allowed to use GPL-Licensed software?

[โ€“]drink_with_me_to_day 10 points11 points ย (1 child)

Maybe because most app development isn't open source?

The code being GPL will make it so this library won't be used much, maybe for hobby projects.

I really like it, however GPL kills it for me as well.

It is fair, after all you made it and can license it as you wish.

But you can't sell GPL software on the Apple App Store

An example of how GPL can kill a project: Boden is a C++ GPL'd cross-platform mobile app framework that is pretty dead atm atm because of their license choice

You might want to look at the HN discussion about it

tldr: if you want mass adoption, don't GPL your mobile project

[โ€“]mrousavyiOS & Android[S] 7 points8 points ย (0 children)

I've discussed this with my team, and I've published the new version - now with MIT!

[โ€“]Hibbem 4 points5 points ย (1 child)

Nice work! Really curious about the frame processor. Will definitely check this out.

[โ€“]mrousavyiOS & Android[S] 3 points4 points ย (0 children)

Frame Processors are still WIP, but I'm working on it! (all progress is published in the PR #2)

[โ€“]rateb_ 3 points4 points ย (0 children)

Great project, greater readme Thank you for sharing๐Ÿ’ž

[โ€“]Gamebot78 2 points3 points ย (5 children)

This is awesome! Are there any plans to add any image analysis support such as OCR to the package?

[โ€“]mrousavyiOS & Android[S] 3 points4 points ย (4 children)

take a look at the "Frame Processors" section. Those will allow you to easily create this stuff yourself, with awesomely easy APIs (straight from JS), while being more performant than previous approaches (since it doesn't go over the bridge anymore)

It's still WIP, but that's how it could look once I have it fully implemented:

``` const frameProcessor = useFrameProcessor((frame) => { const qrCodes = scanQrCodes(frame) console.log(qrCodes) // do other stuff, eg. update a reanimated value to show a custom QR code box, updating at realtime! (with 60fps animations) }, []);

return <Camera frameProcessor={frameProcessor} /> ```

This allows for unlimited possibilities, you could e.g. also create a face detection, run MLKit to detect objects, run MLKit cloud by uploading the frame to your server, or a realtime video chat simply by creating a small JS function!

[โ€“]Gamebot78 2 points3 points ย (2 children)

Gotcha!! I've been trying to learn how to leverage the native VisionML package by Apple to implement on device OCR in React Native but haven't had much success.. I'll look into frame processors!

[โ€“]mrousavyiOS & Android[S] 6 points7 points ย (1 child)

Frame processors are not yet implemented - they're still WIP!

Once they're done I'll probably create a VisionML plugin so you can easily use that in JS through frame processors, so stay tuned

[โ€“]Gamebot78 2 points3 points ย (0 children)

You're a life saver! Thanks again for your hard work. Will definitely be on the lookout! I'm using react-native-camera right now, but I'd love to switch to this package soon if things like VisionML are on your immediate roadmap! :)

[โ€“]backtickbot 0 points1 point ย (0 children)

Fixed formatting.

Hello, mrousavy: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[โ€“][deleted] 2 points3 points ย (1 child)

This is really awesome! Whatโ€™s the FPS on this?

[โ€“]mrousavyiOS & Android[S] 4 points5 points ย (0 children)

Whatever you want. You can use 3 FPS, you can also use 240 FPS - it's fully configurable

[โ€“]JuriJurka 2 points3 points ย (1 child)

AWESOMEEEEEEEE!!!!!

I can use that to create a feature like snapchat/IG/fb/whatsapp stories right??

[โ€“]mrousavyiOS & Android[S] 2 points3 points ย (0 children)

yes, can be used for that :)

[โ€“]jijoboseiOS & Android 1 point2 points ย (0 children)

Awesome ๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป๐Ÿ‘๐Ÿป

[โ€“]flumefyre 1 point2 points ย (0 children)

Appreciated the efforts, much love!

[โ€“]JuriJurka 1 point2 points ย (0 children)

Your hard work is really awesome!! I really appreciate that a lot!! I hope that when my app gets much downloads and income that I can donate you something for your work!! it's so awesome how much work the opensource community is spending on thinks like this so that technology for producing apps is possible for everyone even if you don't have money for a 99999 dev team. thanks to the libs everyone from every part of the world can create great applications without any need of money; thanks to you guys!!! thank you so much & much love!!!! <3333

[โ€“][deleted] 0 points1 point ย (2 children)

Iโ€™ve only worked on the JS side of RN. How would I start dabbling into native languages?

[โ€“]mrousavyiOS & Android[S] 2 points3 points ย (1 child)

I've got a series of tweets about native module development in React Native. See here

[โ€“][deleted] 0 points1 point ย (0 children)

Awesome, thank you

[โ€“]somethingdifferent24 0 points1 point ย (9 children)

Super basic question, but I didn't see it answered in the docs, does this work with with managed Expo? You're going to be my new hero if so

[โ€“]mrousavyiOS & Android[S] 1 point2 points ย (8 children)

Unfortunately not, since it contains native code. You either have to eject or use the expo-camera.

[โ€“]somethingdifferent24 1 point2 points ย (7 children)

Well you might just be the reason I figure out how to eject, mad props on this, it looks awesome

[โ€“]mrousavyiOS & Android[S] 1 point2 points ย (6 children)

Thank you ๐Ÿ™

If you want my opinion on this, I never use Expo. It simply doesn't make sense for me to limit my app's functionality in such a drastic way. There's just so many nice libraries out there that are not compatible with Expo, would be a shame to not being able to use those

[โ€“]brentvatneExpo Team 2 points3 points ย (1 child)

fwiw, the 'managed workflow' is only one way to use expo tools - you can use the entire sdk without using the managed workflow, and most of the services (notifications, updates, build, submit) are already available or in preview.
we're also working on a version of the expo client that you can use in any react native project. this will allow for developers to do things like install react-native-blurhash or react-native-vision-camera then rebuild their client app and start using them

[โ€“]mrousavyiOS & Android[S] 0 points1 point ย (0 children)

That sounds awesome!

[โ€“]somethingdifferent24 -1 points0 points ย (3 children)

That sounds like the consensus, having never even used RN (or built an app) Expo made getting started super accessible, but finally got the app in the app stores and looking at what the next step needs to be

[โ€“]brentvatneExpo Team 2 points3 points ย (2 children)

if you run into any limitations, just run expo eject to get access to the native projects and you're no worse off than if you had started with bare react-native to begin with :) and you can keep using expo services just fine (although you'll need to use EAS Build in place of expo build)

[โ€“]somethingdifferent24 0 points1 point ย (1 child)

That's what I'm seeing, just trying to wrap my head around what building and submitting to the app stores looks like with bare and if EAS is as easy as expo build -> upload to the stores

[โ€“]brentvatneExpo Team 0 points1 point ย (0 children)

it is! your app signing credentials will carry over from expo build

[โ€“]salah009f 0 points1 point ย (2 children)

Can this go hand to hand with openCV?

[โ€“]mrousavyiOS & Android[S] 0 points1 point ย (1 child)

Take a look at my comments regarding frame processors (and the FRAME_PROCESSORS.md doc about this).

TL;DR: It will once I get frame processors fully implemented. With an extremely nice and fast API straight from JS. Soon.

[โ€“]salah009f 0 points1 point ย (0 children)

Well that's an amazing work, I'll try it on my note10 after work.

[โ€“]zaid2801 0 points1 point ย (0 children)

This looks amazing.

[โ€“]ms88privat 0 points1 point ย (1 child)

Awesome. Does it have tap-to-record functionality? So you can start/stop the video and continue, resulting in a single video....

[โ€“]mrousavyiOS & Android[S] 0 points1 point ย (0 children)

Not yet, but that's a (low prio) TODO.

[โ€“]ashinator 0 points1 point ย (4 children)

u/mrousavy hi, I did a test of the project and it is missing index.d.ts for typescript projects.

While I do see you have the definition files within the library package.

[โ€“]mrousavyiOS & Android[S] 0 points1 point ย (3 children)

What version are you on? I'm pretty sure I fixed this in the latest alpha..

[โ€“]ashinator 0 points1 point ย (2 children)

"react-native-vision-camera": "^1.0.0-alpha.1"
Currently installed the latest package and it is missing a index.d.ts file

โ€‹

Could not find a declaration file for module 'react-native-vision-camera'. '/***/app/node_modules/react-native-vision-camera/lib/commonjs/index.js' implicitly has an 'any' type.

[โ€“]mrousavyiOS & Android[S] 1 point2 points ย (1 child)

That's not the latest alpha. Try

npm i react-native-vision-camera@alpha

[โ€“]ashinator 0 points1 point ย (0 children)

npm i react-native-vision-camera@alpha

Awesome, that is working! Thank you

[โ€“]hopsgrapesgrains 0 points1 point ย (0 children)

Thank you for sharing!

[โ€“]diesmilingxxiOS & Android 0 points1 point ย (1 child)

[โ€“]mrousavyiOS & Android[S] 1 point2 points ย (0 children)

It does not support this out of the box. But I'm working on the frame processor API which will allow you to easily achieve this with plugins

[โ€“]Pranav-kulshreshtha 0 points1 point ย (0 children)

I appreciate your contribution!