@hashiprobr/expo-camera

1.0.9 • Public • Published

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-camera

With yarn:

yarn add @hashiprobr/expo-camera

With expo:

expo install @hashiprobr/expo-camera

If 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:web

Removed 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

Package Sidebar

Install

npm i @hashiprobr/expo-camera

Weekly Downloads

2

Version

1.0.9

License

ISC

Unpacked Size

10.8 kB

Total Files

6

Last publish

Collaborators

  • hashiprobr