react-native-nodemediaclient icon indicating copy to clipboard operation
react-native-nodemediaclient copied to clipboard

takePicture on camera during stream

Open canveed opened this issue 5 years ago • 6 comments

Hello,

Trying to make some remote camera. Like Phone 1 streams camera screen to Phone 2. When Phone 2 clicks on "takePicture" red button to make picture, Phone 1 should make shot on camera, not like screenshot.

Right now made two cameras, but it is not a solution. Is it possible to use this library and make camera shots?

Thanks!

canveed avatar Jul 02 '20 07:07 canveed

@CanVeeD Did you find a solution to this?

griffinshuth avatar Jul 20 '20 18:07 griffinshuth

No, still searching for answer

canveed avatar Jul 20 '20 18:07 canveed

Lo ideal es tener el preview de NodeMediaClient desactivado, y utilizar un otro modulo para usar la camara (react-native-camera por ejemplo).

Lo ideal es tener el preview de NodeMediaClient desactivado, y utilizar un otro modulo para usar la camara (react-native-camera por ejemplo).

If you turn of preview of NodeMediaClient and enable react-native-camera to take picture, it'll crash. The only solution - before turning off preview, change camera to frontal and it works, but not as good as we want. When you want resume stream, disable rn camera, turn on NodeMediaClient stream and change it's camera to frontal.

It is looks like solution, but have some problems

canveed avatar Aug 25 '20 11:08 canveed

I think you'll have to release the camera by Id before you can have another camera system access it.

The node media client (on android at least) exposes a "CameraInfo getCameraInfo()" that you can use to get the camera id and release it before you try to access the camera again.

https://github.com/NodeMedia/NodeMediaClient-Android/blob/821cf3a200f820082741cef62b1727d9295038ec/nodemediaclient/src/main/java/cn/nodemedia/NodeCameraView.java#L110

daxaxelrod avatar Sep 02 '20 17:09 daxaxelrod

I know this issue is quite old, but I've just opened a PR #130 with support for capturing pictures during streaming. iOS-only though, would love some help with the Android version.

heuels avatar Dec 05 '20 17:12 heuels