
Research
NPM targeted by malware campaign mimicking familiar library names
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
react-native-video-trimmer-ui
Advanced tools
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 6 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.
Research
Socket uncovered npm malware campaign mimicking popular Node.js libraries and packages from other ecosystems; packages steal data and execute remote code.
Research
Socket's research uncovers three dangerous Go modules that contain obfuscated disk-wiping malware, threatening complete data loss.
Research
Socket uncovers malicious packages on PyPI using Gmail's SMTP protocol for command and control (C2) to exfiltrate data and execute commands.