1.0.9 • Published 3 years ago
@hashiprobr/expo-camera v1.0.9
expo-camera
A modified version of expo-camera with automatic ratio in Android and additional configurability
Peer dependencies
{
"@hashiprobr/react-use-mount-and-update": "1.0.5",
"expo": "45.0.0",
"expo-camera": "12.2.0",
"hoist-non-react-statics": "3.3.2",
"react": "17.0.2",
"react-native": "0.68.2"
}Install
With npm:
npm install @hashiprobr/expo-cameraWith yarn:
yarn add @hashiprobr/expo-cameraWith expo:
expo install @hashiprobr/expo-cameraIf using Expo, add the module to webpack.config.js:
const createExpoWebpackConfigAsync = require('@expo/webpack-config');
module.exports = async function (env, argv) {
const config = await createExpoWebpackConfigAsync({
...env,
babel: {
dangerouslyAddModulePathsToTranspile: [
'@hashiprobr/expo-camera',
],
},
}, argv);
return config;
};If webpack.config.js does not exist, create it with:
expo customize:webRemoved props
| name | description |
|---|---|
| ratio | automatically chosen as the closer to the component ratio |
Added props
| name | description |
|---|---|
| padColor | color of the padding when the ratio and the component ratio are different |
| crop | if true, the preview is cropped to a square area |
| cropColor | color of the crop |
| cropAlpha | opacity of the crop |