-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Conversation
Example/package.json
Outdated
"react-native": "~0.40.0", | ||
"react-native-camera": "file:../" | ||
"react-native-camera": "~0.10.1", | ||
"react-native-windows": "^0.40.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset. #Closed
package.json
Outdated
@@ -20,7 +20,8 @@ | |||
"barcode" | |||
], | |||
"dependencies": { | |||
"prop-types": "^15.5.10" | |||
"prop-types": "^15.5.10", | |||
"react": "^15.4.0" | |||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete #Closed
package.json
Outdated
@@ -4,7 +4,7 @@ | |||
"type": "git", | |||
"url": "https://github.com/lwansbrough/react-native-camera.git" | |||
}, | |||
"version": "0.10.0", | |||
"version": "0.10.1", | |||
"description": "A Camera component for React Native. Also reads barcodes.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reset #Closed
windows/RNCamera/RCTCameraModule.cs
Outdated
mediaCapture.AudioDeviceController.Muted = options.Value<bool>("audio"); | ||
|
||
// TODO: test orientation | ||
var orientation = options.ContainsKey("orientation") ? options.Value<int>("orientation") : cameraForView.Orientation; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Example/package.json
Outdated
@@ -6,8 +6,12 @@ | |||
"start": "node node_modules/react-native/local-cli/cli.js start" | |||
}, | |||
"dependencies": { | |||
"react": "~15.4.0", | |||
"react": "^15.4.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ [](start = 14, length = 1)
Reset. #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi...Can you please share the steps to integrate this library in react-native-windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just great @rozele ! Since I'm running vmware and windows from time to time I will def make sure to help out reviewing this! |
awesome! with the number of platform support inconsistencies across iOS, android and windows, I am thinking we are going to need a docs overhaul to better communicate what works where. |
@ptomasroos When you accept the PR? |
@rozele as I don't use windows much, I've added you as a contributor so we can help us maintain this code, feel free to merge this if it is stable enough |
Hi...Can you please share the steps to integrate this library in react-native-windows? |
Can i Just access RNCamera from react-native-camera for windows? |
I followed this code to implement barcode support in react-native-windows. But got this error when importing Camera. @rozele Can you please help? |
Any updates?? |
RNCamera is only for RN for now, u need to use RCTCamera on Windows I don't like how to link this on windows |
Thanks for the update. Can anyone help me with linking with windows or suggest a plugin to implement barcode scan in windows? Any tutorial link or proper documentation? because the implementation steps mentioned are not clear and also very old. |
Seems like this version won't work with react-native-windows above 0.52 because of |
@kozorezal can u try to update this branch to fix this? or send a new pr ? |
This adds basic support for capturing photos and videos from either the front or back panel cameras, with some support for video quality, orientation, etc. This also uses ZXing.Net to support barcode scanning from the video preview frames. It also supports torch and flash modes. Videos and photos saved to disk (or camera roll / temporary folder) also supports some file metadata (e.g., lat/long). There are a number of features that have not yet been implemented: - Support `playSoundOnCapture` for default shutter sounds - Add orientation metadata properties on photo / video files - Support all barcode formats in ZXing.Net - Additional file metadata (like description) - Photo quality settings with `quality` and `jpegQuality` - Image post-processing with `mirrorImage` and `fixOrientation` - Support event listeners for `onZoomChanged` & `onFocusChanged` - Device authorization checks as supported on iOS
Can anyone please provide documentation for react-native-camera windows support |
I am getting "unable to get property 'Aspect ' of undefined or null".
|
@rozele, thank you very much for this effort - the library works really well on Windows and reads QR codes just fine! I'm running I am not sure, what is actually blocking this from being merged - can someone elaborate on that? I would love to help out with this PR, even though I have no experience with Windows programming, but I will try my best. For everyone being stuck with the
PS: as @sibelius mentioned, you have to use |
Can we merge? |
I would say not yet, I was too optimistic after it actually showed the camera stream and returned data for a QR code. But the PR is still missing some things - here are two that I noticed already:
I will try this library out some more and will also try to contribute as much as I can so we can get Windows supported 🙂 |
@gtRfnk, on UWP app when I call takePictureAsync I get error '[JS Info] 'err: ', [TypeError: Object doesn't support property or method 'takePictureAsync']'. `import Camera from 'react-native-camera'; takePicture = async () => { render() { What I'm doing wrong? |
@expectpin
|
Open issues if something in this PR is not working well We can improve it in another PRs |
🎉 This PR is included in version 1.5.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@gtRfnkN @expectpin any thoughts on what I am doing wrong here? I can't make react-native-camera work on UWP for some reason. import React, { Component } from "react";
import { StyleSheet, Text, View } from "react-native";
import Camera from "react-native-camera";
export class CameraComp extends Component {
_takePicture = async () => {
if (this.camera) {
const options = { quality: 0.5, base64: true };
const data = await this.camera.takePictureAsync(options);
console.log(data.uri);
}
};
render() {
return (
<View style={styles.container}>
<Camera
ref={ref => {
this.camera = ref;
}}
permissionDialogTitle={"Permission to use camera"}
permissionDialogMessage={
"We need your permission to use your camera phone"
}
style={styles.preview}
>
<View
style={{ flex: 0, flexDirection: "row", justifyContent: "center" }}
>
<Text style={styles.capture} onPress={() => this._takePicture()}>
[CAPTURE]
</Text>
</View>
</Camera>
</View>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
flexDirection: "column",
backgroundColor: "black"
},
preview: {
flex: 1,
justifyContent: "flex-end",
alignItems: "center"
},
capture: {
flex: 0,
backgroundColor: "#fff",
borderRadius: 5,
padding: 15,
paddingHorizontal: 20,
alignSelf: "center",
margin: 20
}
}); thanks for your help! |
nevermind...looks like Camera cannot have any children. |
@rozele Is there any further update in this? I want to scan a barcode that needs to be integrated into a UWP app. |
@npmun Is the camera access working for you for UWP app? |
@vikmis007 Yes it does. But my use case is very basic. |
as RCTCamera was removed, you can send a PR renaming RCTCamera usage on UWP to RNCamera and it will probably work |
This adds basic support for capturing photos and videos from either the front or back panel cameras, with some support for video quality, orientation, etc. This also uses ZXing.Net to support barcode scanning from the video preview frames. It also supports torch and flash modes. Videos and photos saved to disk (or camera roll / temporary folder) also supports some file metadata (e.g., lat/long).
There are a number of features that have not yet been implemented:
playSoundOnCapture
for default shutter soundsquality
andjpegQuality
mirrorImage
andfixOrientation
onZoomChanged
&onFocusChanged