Giter Club home page Giter Club logo

blazerroadg / react-native-image-video-picker-editor Goto Github PK

View Code? Open in Web Editor NEW
64.0 3.0 14.0 9.13 MB

iOS/Android image picker with support for camera, video, configurable compression, multiple images,image cropping , video trimming, max video length, photo take, video record, profile mask view

JavaScript 76.47% Starlark 1.17% Java 12.06% Ruby 10.31%
react-native imagepicker image-picker image-editor image-cropper video-trimmer video-compressor video-picker android ios

react-native-image-video-picker-editor's Introduction

react-native-image-video-picker-editor

iOS/Android image picker with support for camera, video, configurable compression, multiple images,image cropping , video trimming, max video lenght, photo take, video record, profile mask view

Result

Important note

I never try it with react-native < 0.60

Install

Step 1

npm i react-native-image-video-picker-editor --save

Step 2 Dependencies

npm install @react-native-community/cameraroll @react-native-community/image-editor @react-native-community/masked-view react-native-camera react-native-vector-icons react-native-video react-native-video-helper react-native-easy-view-transformer

iOS

cd ios
pod install

Android

  • VERY IMPORTANT Add the following to your build.gradle's . (android/App/build.gradle)
android {
  ...
  defaultConfig {
    ...
    missingDimensionStrategy 'react-native-camera', 'general' // <--- insert this line
  }
}

Step 3 link assests

react-native link

Step 4 Permissions

iOS add these to info.plist

Privacy - Photo Library Usage Description  (NSPhotoLibraryUsageDescription)
Privacy - Camera Usage Description (NSCameraUsageDescription)
Privacy - Microphone Usage Description (NSMicrophoneUsageDescription)

Android add these to android/app/src/main/AndroidManifest.xml

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>

Manual Installation

please follow each dependensy document :

Usage

Import library

import MImagePicker from 'react-native-image-video-picker-editor'
import { HandleCrop } from 'react-native-image-video-picker-editor/cropper'
<MImagePicker
    header={{ nextTitle: "Next", cancelTitle: "Cancel" }}
    onCancel={() => { }}
    onNext={async (param) => {
      param.videoMaxLen = 3; // not set or 0 for unlimited
      param.videoQuality = 'low';
      const res = await HandleCrop(param);
      this.setState({ result: res, showResult: true })
    }}
    cropSize={{ width: 200, height: 200 }}
    maxScale={10}  
    max={4}
    cameraConfig = {{ camerPhotoTile: "Photo", cameraVideoTitle: "Video", cameraCancelTitle: "Cancle", maxVideoLen: 0, videoQuality: "480p" }}
  // profile={true}

  />

react-native-image-video-picker-editor's People

Contributors

blazerroad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

react-native-image-video-picker-editor's Issues

How to run on Expo?

I installed this on expo and got an error on ios that says Invariant Violation: Native module cannot be null.
The error on android is CameraManager.checkIfRecordAudioPerssionsAreDefied is not a function

Is there some way to install this on react-native expo?

local file url.

How do i get the local file location for a video ? passing the uri to react native video component is not working.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.