hashiprobr / expo-camera

A modified version of expo-camera with automatic ratio in Android and additional configurability

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

expo-camera

[PROJECT DISCONTINUED]

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

About

A modified version of expo-camera with automatic ratio in Android and additional configurability

License:ISC License


Languages

Language:JavaScript 100.0%