1.0.6 • Published 4 years ago

react-native-simple-video-trimmer v1.0.6

Weekly downloads
39
License
ISC
Repository
github
Last release
4 years ago

react-native-simple-video-trimmer

All-in-one video trimmer. Pick a video from device then trim it. Component will return the "path to the trimmed video".

npm.io

Installation

Download a copy of repo from github. Add it to your project manually as if it's one of your custom components. Install dependencies below;

  • react-native-image-picker
  • react-native-video
  • react-native-video-processing
  • react-native-fs
npm install react-native-image-picker react-native-video react-native-video-processing react-native-fs

Using these modules, you will be able to pick a file, play it, trim it and save it. Please be aware of that, some video files will not allow you to seek precisely. This could be a codec related issue.

Basic Usage

import React from 'react';
import {View} from 'react-native';
import {VideoTrimmer} from "to/path/of/component";
 
const App = (props) => {
   return (
     <View style={{flex: 1, backgroundColor: 'red'}}>
     <VideoTrimmer onProgressCompleted={(path) => console.log('Path to trimmed video ' + path)}/>
     </View>
   );
 };
 
 export default App;

Properties

PropsTypeDescription
onProgressCompletedfunctionreturns path to trimmed video
progressDialogComponentreact componentCustom dialog component to be displayed while in progress

Customization

By looking at the source code, a mid-level RN developer can easily tell which block of code is doing what task. You can customize it the way you want. You can change the color of the buttons, icons or specify the directory where the file will be saved.

Contribution

Yalçın ÖZER. yalcinozer.com

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago