Skip to content

Commit 18fd5c6

Browse files
committed
fix: updated README and example
1 parent 599f345 commit 18fd5c6

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# react-native-video-trimmer-ui
22

3-
React Native Video Trimmer is a powerful and easy-to-use component that allows you to add video trimming functionality to your React Native applications. With this library, users can easily select a specific portion of a video to trim, making it perfect for video editing apps, social media platforms, or any application that requires video manipulation.
3+
React Native Video Trimmer is a powerful and easy-to-use component that adds video trimming functionality to your React Native applications. Perfect for video editing apps, social media platforms, or any application requiring video manipulation.
44

55
## Key Features
66

@@ -12,7 +12,7 @@ React Native Video Trimmer is a powerful and easy-to-use component that allows y
1212
- Cross-platform compatibility (iOS and Android)
1313
- Easy integration with existing React Native projects
1414

15-
This library leverages native video processing capabilities to ensure smooth performance and high-quality output. Whether you're building a video editing app or simply need to add trimming functionality to your existing project, react-native-video-trimmer provides a robust solution with a simple API.
15+
This library leverages native video processing capabilities to ensure smooth performance and high-quality output.
1616

1717
## Installation
1818

example/src/App.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import VideoTrimmer from 'react-native-video-trimmer-ui';
44
export default function App() {
55
return (
66
<View style={styles.container}>
7-
<VideoTrimmer source={require('../assets/sample.mp4')} />
7+
<VideoTrimmer
8+
source={require('../assets/sample.mp4')}
9+
onSelected={console.info}
10+
/>
811
</View>
912
);
1013
}

src/components/VideoTrimmer.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ function VideoTrimmer(props: VideoTrimmerProps, ref: Ref<unknown>) {
5757
start = stop - 0.5;
5858
}
5959
}
60-
console.info('start, stop', start, stop);
60+
start = parseFloat(start.toFixed(2));
61+
stop = parseFloat(stop.toFixed(2));
6162
setThumbs([start, stop]);
6263
if (onSelected) onSelected(start, stop);
6364
seek(start);
@@ -70,7 +71,7 @@ function VideoTrimmer(props: VideoTrimmerProps, ref: Ref<unknown>) {
7071
};
7172

7273
const onLoad = (data: OnLoadData) => {
73-
console.info('duration', data.duration);
74+
// console.info('duration', data.duration);
7475
if (duration) {
7576
return;
7677
}

0 commit comments

Comments
 (0)