
Security News
Open Source CAI Framework Handles Pen Testing Tasks up to 3,600× Faster Than Humans
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
react-native-video-trimmer-ui
Advanced tools
Supply Chain Security
Vulnerability
Quality
Maintenance
License
React Native Video Trimmer UI is a powerful and easy-to-use UI component that adds video trimming functionality to your React Native applications. It's perfect for video editing apps, social media platforms, or any application requiring video manipulation.
npm install react-native-video react-native-video-trimmer-ui
Import the VideoTrimmerUI component in your React Native application:
import VideoTrimmerUI from 'react-native-video-trimmer-ui';
Then, use the VideoTrimmerUI component in your JSX:
<VideoTrimmerUI
source={{ uri: 'https://example.com/video.mp4' }}
onSelected={(start, end) => console.log(`Selected trim range: ${start} to ${end}`)}
loop={true}
containerStyle={{ height: 300 }}
sliderContainerStyle={{ marginHorizontal: 20 }}
tintColor="#007AFF"
/>
Prop | Type | Default | Description |
---|---|---|---|
source | ReactVideoSource | required | The source of the video (e.g., { uri: 'https://example.com/video.mp4' } ) |
onSelected | function | - | Callback function that receives the selected start and end times (in seconds) when the user finishes trimming |
loop | boolean | true | Whether the video should loop after reaching the end |
containerStyle | ViewStyle | - | Custom styles for the container of the VideoTrimmerUI component |
sliderContainerStyle | ViewStyle | - | Custom styles for the slider container |
tintColor | string | '#24A0ED' | Color of the slider and its components |
minDuration | number | 1 | Minimum duration (in seconds) for the trimmed video section |
You can access the VideoTrimmerUI methods using a ref:
const trimmerRef = useRef(null);
// Later in your component
const [start, end] = trimmerRef.current.getSelection();
console.log(`Current trim range: ${start} to ${end}`);
// In your JSX
<VideoTrimmerUI
ref={trimmerRef}
// ... other props
/>
Available methods:
getSelection()
: Returns an array with the current start and end times of the trim range.After selecting the trim range using the VideoTrimmerUI component, you can use the react-native-video-trimmer-core
library to perform the actual video trimming. For more information on how to use this library, please refer to the react-native-video-trimmer-core npm package.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
Trim videos in react-native
The npm package react-native-video-trimmer-ui receives a total of 19 weekly downloads. As such, react-native-video-trimmer-ui popularity was classified as not popular.
We found that react-native-video-trimmer-ui demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.
Security News
CVEForecast.org uses machine learning to project a record-breaking surge in vulnerability disclosures in 2025.