Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestions on snapchat clone with different images super-imposed over camera? #2

Open
acomito opened this issue Mar 29, 2017 · 8 comments

Comments

@acomito
Copy link

acomito commented Mar 29, 2017

Have you come across this functionality yet? It sounds like you can use react-native-camera:

Subviews
This component supports subviews, so if you wish to use the camera view as a background or if you want to layout buttons/images/etc. inside the camera then you can do that.

But not sure that shows up in the final snapped pictured.

@spencercarli
Copy link
Owner

Hmm I've never tried that and honestly I'm not sure how it would be done. As it stands right now the camera is actually serving as the background and then the photo button is overlaid on it.

But to add and save a video on it I'm not sure. Maybe take a snapshot of the screen with the item on it? But as I type that it doesn't seem right...

Wish I could be of more help - good luck!

@sheprdinc
Copy link

sheprdinc commented Apr 25, 2017

Hey in Snapchat, when you're in selfie mode, you can decorate your face with filter overlays that stick to your face and follow your face movement around on the screen. Directing this question at @acomito , have you accomplish this yet in React Native app? Is this even possible in React Native? Or would I have to go pure native for that, like Android or iOS?

@acomito
Copy link
Author

acomito commented Apr 25, 2017

@sheprdinc I never ended up pursuing this app. It sounds similar to a card swiping component like tinder, where the card follows your finger around the screen which is the gesture API and animate APIs. But in this case the item isn't following the position of your finger its the position of a face. My guess is it'd be a combination of the animate API moving the decoration around the x/y axis and some sort of facial recognition API playing a similar role to what the gesture API was doing with tinder swipe cards. But I don't know if there's a react-native module for that let alone a native one... maybe helpful to check some of these out:

https://www.reddit.com/r/javascript/comments/4waokb/use_react_native_and_microsoft_face_api_to_a/

https://www.sitepoint.com/use-react-native-to-a-create-a-face-recognition-app/

https://code.tutsplus.com/tutorials/how-to-create-a-face-detection-app-with-react-native--cms-26491

But in summary I'm guessing you need to get gesture-API-like data (that follows the face) and tie that in with react-native animations.

@spencercarli
Copy link
Owner

Man thinking about this it could be a really fun project to hack around on. I was looking at tracking.js (which has a face detection api). My only unknown is how you could get access to the real time video stream from something like react-native-camera. Might toy around with this a bit today.

@acomito
Copy link
Author

acomito commented Apr 28, 2017

@sheprdinc
Copy link

you both have sent in me in the right direction to begin my tinkering... much appreciated @spencercarli @acomito

Also, @twomedia seems to have solved it using SCrecorder library and its React Native wrapper:
rFlex/SCRecorder#220 (comment)
https://github.com/maxs15/react-native-screcorder
https://itunes.apple.com/us/app/sticker-booth-animated-gif/id1157522905?mt=8

@twomedia
Copy link

twomedia commented May 4, 2017

@sheprdinc The iMessage "Sticker Booth" app I built using SCRecorder doesn't use React Native. It's just a standard iMessage app.

@Daniel-TheProgrammer
Copy link

@sheprdinc The iMessage "Sticker Booth" app I built using SCRecorder doesn't use React Native. It's just a standard iMessage app.

That is true @twomedia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants
@spencercarli @twomedia @acomito @sheprdinc @Daniel-TheProgrammer and others