Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
react-native-reanimated-player
Advanced tools
Readme
`JSThread` to `JSThread`, `UIThread` to `UIThread`.
This is the react-native-video version, If you use Expo, please check out expo-reanimated-av-player!
First you have to follow installation instructions of:
If react-native-gesture-handler
version >= 2:
yarn add react-native-reanimated-player
else use v1:
yarn add react-native-reanimated-player@1
import VideoPlayer from 'react-native-reanimated-player';
import { useSharedValue } from 'react-native-reanimated';
export const Example = () => {
const videoHeight = useSharedValue(0);
const isFullScreen = useSharedValue(false);
const { paused, setPaused } = useContext(false);
return (
<VideoPlayer
source={uri}
headerTitle={'Title in full screen mode'}
onTapBack={() => {
Alert.alert('onTapBack');
}}
onTapMore={() => {
Alert.alert('onTapMore');
}}
onPausedChange={state => {
Alert.alert(`onPausedChange: ${state}`);
setPaused(state);
}}
videoHeight={videoHeight}
paused={paused}
isFullScreen={isFullScreen}
/>
);
};
TypeScript
.react-native-reanimated
and react-native-gusture-handler
.expo-av
supportThe <VideoPlayer/>
component has the following configuration properties:
Name | Type | Description | Required | Default Value |
theme | object | The slider theme color | ❌ | { // Color to fill the progress in the seekbar minimumTrackTintColor: string, // Color to fill the background in the seekbar maximumTrackTintColor: string, // Color to fill the cache in the seekbar cacheTrackTintColor: string, // Color to fill the bubble backgroundColor disableMinTrackTintColor: string, // Disabled color to fill the progress in the seekbar bubbleBackgroundColor: string } |
showOnStart | boolean | control view init show | ❌ | false |
onEnterFullscreen | function | on enter fullscreen callback | ❌ | undefined |
onExitFullscreen | function | on exit fullscreen callback | ❌ | undefined |
controlTimeout | nubmer | How long to hide the control view after showing | ❌ | 2000 |
videoDefaultHeight | number | video default height | ❌ | screenWidth * (9 / 16) |
headerBarTitle | string | header bar title on fullscreen mode | ❌ | undefined |
onTapBack | function | tap header bar Icon-'Back' callback | ❌ | undefined |
navigation | any | navigation | ❌ | undefined |
autoPlay | boolean | auto play | ❌ | false |
onToggleAutoPlay | function | on toggle auto play | ❌ | undefined |
onTapMore | function | tap headerbar Icon-'More' callback | ❌ | undefined |
doubleTapInterval | number | double tap interval | ❌ | undefined |
paused | boolean | video paused | ✅ | undefined |
onPausedChange | boolean | on change video paused | ❌ | undefined |
onTapPause | function | on tap video paused | ❌ | undefined |
sliderProps | object | react-native-awesome-slider props | ❌ | undefined |
videoHeight | Animated.SharedValue | video height | ✅ | width * (9 / 16); |
customAnimationStyle | Animated Viewstyle | video height | ❌ | width * (9 / 16); |
onCustomPanGesture | PanGesture | custom pan gesture | ❌ | width * (9 / 16); |
isFullScreen | Animated ShareValue | fullScreen status | ✅ | undefined |
disableControl | boolean | control view status | ❌ | undefined |
renderBackIcon | JSX | custom back icon | ❌ | undefined |
renderFullScreenBackIcon | JSX | custom full's fullscreen icon | ❌ | undefined |
renderMore | JSX | custom more icon | ❌ | undefined |
renderFullScreen | JSX | custom fullscreen icon | ❌ | undefined |
children | JSX | child components to be rendered under video player controls | ❌ | undefined |
onPostProgress | function | callback function that is called every progressUpdateInterval milliseconds with info about which position the media is currently playing | ❌ | undefined |
onPostSeek | function | callback function that is called when a seek completes | ❌ | undefined |
FAQs
A react-native video player that interacts like Youtube player, built upon Reanimted v2 & react-native-gesture-handle
The npm package react-native-reanimated-player receives a total of 17 weekly downloads. As such, react-native-reanimated-player popularity was classified as not popular.
We found that react-native-reanimated-player demonstrated a not healthy version release cadence and project activity because the last version was released 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.