Catalog npm
Back to packageRELEASE DETAILS

2.2.3

npm

42-react-native-reanimated-player

A react-native video player that interacts like Youtube player, built upon Reanimted v2 & react-native-gesture-handle

androidcontroliosreact-nativereact-native-gesture-handlereact-native-reanimtedscrubberslidervideo
Published25 Nov 2022
Direct dependencies31
Transitive dependenciesNot calculated

README

Current package documentation
`JSThread` to `JSThread`, `UIThread` to `UIThread`.

React Native Reanimated Player

Reanimated v2 version npm npm runs with expo

100% written in Typescript video player component, interaction is like Youtube player.

▶️ Watch example video

⚠️ Expo

This is the react-native-video version, If you use Expo, please check out expo-reanimated-av-player!

Installation

First you have to follow installation instructions of:

If react-native-gesture-handler version >= 2:

yarn add react-native-reanimated-player@2

else use v1:

yarn add react-native-reanimated-player@1

Example usage

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}
    />
  );
};

Features

  • 100% written in TypeScript.
  • 100% built upon react-native-reanimated and react-native-gusture-handler.
  • Support gestures switch full screen.
  • Support double tap seek to back or ahead.
  • ...

TODO list

  • Add more custom props
  • Add Previous & Next button
  • Rewrite the gesture section with react-native-gusture-handle V2
  • Add expo-av support
  • ...and more

Configuration

The <VideoPlayer/> component has the following configuration properties:

NameTypeDescriptionRequiredDefault Value
themeobjectThe 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 }
showOnStartbooleancontrol view init show❌false
onEnterFullscreenfunctionon enter fullscreen callback❌undefined
onExitFullscreenfunctionon exit fullscreen callback❌undefined
controlTimeoutnubmerHow long to hide the control view after showing❌2000
videoDefaultHeightnumbervideo default height❌screenWidth * (9 / 16)
headerBarTitlestringheader bar title on fullscreen mode❌undefined
onTapBackfunctiontap header bar Icon-'Back' callback❌undefined
navigationanynavigation❌undefined
autoPlaybooleanauto play❌false
onToggleAutoPlayfunctionon toggle auto play❌undefined
onTapMorefunctiontap headerbar Icon-'More' callback❌undefined
doubleTapIntervalnumberdouble tap interval❌undefined
pausedbooleanvideo paused✅undefined
onPausedChangebooleanon change video paused❌undefined
onTapPausefunctionon tap video paused❌undefined
sliderPropsobjectreact-native-awesome-slider props❌undefined
videoHeightAnimated.SharedValuevideo height✅ width * (9 / 16);
customAnimationStyleAnimated Viewstylevideo height❌width * (9 / 16);
onCustomPanGesturePanGesturecustom pan gesture❌width * (9 / 16);
isFullScreenAnimated ShareValuefullScreen status✅undefined
disableControlbooleancontrol view status❌undefined
renderBackIconJSXcustom back icon❌undefined
renderFullScreenBackIconJSXcustom full's fullscreen icon❌undefined
renderMoreJSXcustom more icon❌undefined
renderFullScreenJSXcustom fullscreen icon❌undefined

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 39

Native requirements
31 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
@gorhom/portal
Environment
{
  "local_name": "@gorhom/portal",
  "alias": false,
  "peer_metadata": null
}
^1.0.12runtime
lodash.padstart
Environment
{
  "local_name": "lodash.padstart",
  "alias": false,
  "peer_metadata": null
}
^4.6.1runtime
@babel/core
Environment
{
  "local_name": "@babel/core",
  "alias": false,
  "peer_metadata": null
}
^7.12.9development
@babel/runtime
Environment
{
  "local_name": "@babel/runtime",
  "alias": false,
  "peer_metadata": null
}
^7.12.5development
@react-native-community/eslint-config
Environment
{
  "local_name": "@react-native-community/eslint-config",
  "alias": false,
  "peer_metadata": null
}
^2.0.0development
@react-navigation/core
Environment
{
  "local_name": "@react-navigation/core",
  "alias": false,
  "peer_metadata": null
}
*development
@release-it/conventional-changelog
Environment
{
  "local_name": "@release-it/conventional-changelog",
  "alias": false,
  "peer_metadata": null
}
^2.0.0development
@types/jest
Environment
{
  "local_name": "@types/jest",
  "alias": false,
  "peer_metadata": null
}
^26.0.23development
@types/react
Environment
{
  "local_name": "@types/react",
  "alias": false,
  "peer_metadata": null
}
17.0.2development
@types/react-native
Environment
{
  "local_name": "@types/react-native",
  "alias": false,
  "peer_metadata": null
}
^0.66.4development
@types/react-native-video
Environment
{
  "local_name": "@types/react-native-video",
  "alias": false,
  "peer_metadata": null
}
^5.0.10development
@types/react-test-renderer
Environment
{
  "local_name": "@types/react-test-renderer",
  "alias": false,
  "peer_metadata": null
}
^17.0.1development
@typescript-eslint/eslint-plugin
Environment
{
  "local_name": "@typescript-eslint/eslint-plugin",
  "alias": false,
  "peer_metadata": null
}
^5.7.0development
@typescript-eslint/parser
Environment
{
  "local_name": "@typescript-eslint/parser",
  "alias": false,
  "peer_metadata": null
}
^5.7.0development
babel-jest
Environment
{
  "local_name": "babel-jest",
  "alias": false,
  "peer_metadata": null
}
^26.6.3development
eslint
Environment
{
  "local_name": "eslint",
  "alias": false,
  "peer_metadata": null
}
^7.14.0development
jest
Environment
{
  "local_name": "jest",
  "alias": false,
  "peer_metadata": null
}
^26.6.3development
lottie-react-native
Environment
{
  "local_name": "lottie-react-native",
  "alias": false,
  "peer_metadata": null
}
^5.0.1development
metro-react-native-babel-preset
Environment
{
  "local_name": "metro-react-native-babel-preset",
  "alias": false,
  "peer_metadata": null
}
^0.66.2development
react-native
Environment
{
  "local_name": "react-native",
  "alias": false,
  "peer_metadata": null
}
0.66.4development
react-native-awesome-slider
Environment
{
  "local_name": "react-native-awesome-slider",
  "alias": false,
  "peer_metadata": null
}
^2.0.4development
react-native-builder-bob
Environment
{
  "local_name": "react-native-builder-bob",
  "alias": false,
  "peer_metadata": null
}
^0.18.2development
react-native-gesture-handler
Environment
{
  "local_name": "react-native-gesture-handler",
  "alias": false,
  "peer_metadata": null
}
^2.3.2development
42-react-native-orientation-locker
Environment
{
  "local_name": "42-react-native-orientation-locker",
  "alias": false,
  "peer_metadata": null
}
*development
react-native-reanimated
Environment
{
  "local_name": "react-native-reanimated",
  "alias": false,
  "peer_metadata": null
}
2.1.0development
react-native-safe-area-context
Environment
{
  "local_name": "react-native-safe-area-context",
  "alias": false,
  "peer_metadata": null
}
^4.2.2development
react-native-video
Environment
{
  "local_name": "react-native-video",
  "alias": false,
  "peer_metadata": null
}
^5.2.0development
react-test-renderer
Environment
{
  "local_name": "react-test-renderer",
  "alias": false,
  "peer_metadata": null
}
17.0.2development
release-it
Environment
{
  "local_name": "release-it",
  "alias": false,
  "peer_metadata": null
}
*development
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
^4.4.4development
@react-navigation/core
Environment
{
  "local_name": "@react-navigation/core",
  "alias": false,
  "peer_metadata": null
}
*peer
lottie-react-native
Environment
{
  "local_name": "lottie-react-native",
  "alias": false,
  "peer_metadata": null
}
>=4.0.0peer
react
Environment
{
  "local_name": "react",
  "alias": false,
  "peer_metadata": null
}
*peer
react-native
Environment
{
  "local_name": "react-native",
  "alias": false,
  "peer_metadata": null
}
*peer
react-native-awesome-slider
Environment
{
  "local_name": "react-native-awesome-slider",
  "alias": false,
  "peer_metadata": null
}
>=2.0.0peer
react-native-gesture-handler
Environment
{
  "local_name": "react-native-gesture-handler",
  "alias": false,
  "peer_metadata": null
}
>=2.0.0peer
42-react-native-orientation-locker
Environment
{
  "local_name": "42-react-native-orientation-locker",
  "alias": false,
  "peer_metadata": null
}
*peer
react-native-reanimated
Environment
{
  "local_name": "react-native-reanimated",
  "alias": false,
  "peer_metadata": null
}
>=2.0.0peer
react-native-safe-area-context
Environment
{
  "local_name": "react-native-safe-area-context",
  "alias": false,
  "peer_metadata": null
}
*peer

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "integrity": "sha512-837xTkTpRYsNG+lJpnMv4yZysV8zeHupvl/qUSWjkdfVVg3ck2Y+9a1nZVCv5YLLRtfE2MJK4mzDQVsMvh7low==",
  "shasum": "f681b29d35dd00fa012e3ae72218a95c2bcb9f08",
  "tarball": "https://registry.npmjs.org/42-react-native-reanimated-player/-/42-react-native-reanimated-player-2.2.3.tgz",
  "fileCount": 87,
  "unpackedSize": 427596,
  "signatures": [
    {
      "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
      "sig": "MEUCIQCU8DRzCJBCDd/iaHMoLsrtaZfVmKbxfouyOquAOlmCqgIgQXbG3hcxKbIeVVjOkkDu1afVGZ9bVScdQyzLjNwWoMk="
    }
  ],
  "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjgDBIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpbkA//czn5p8CSMTSzBnC4DsnvB2Mkak1H0dzGgoYq26+xP4iJ04vs\r\nvH+Ym0HybIbAePJ/h8qg1P8Inq0Zp/yjvs5J98siuR/yq0wKmsdjRf32P7O0\r\nrPok2DGcD5Ni9dsBGdlIsVI11/iJ+fOom7s2GCWiyBqmdF5YuciGeaOEy9Qb\r\n2/qZjDLklfbeBNUtKeUYYwird9LPckZeXKbYGZSyQbkMYD8+CqaBwN2XFfLS\r\nhifpLW6X4EjlL3K6CTA8nbnfPr4Qq0HYwgP0aCRVnN85f0vNJJCbcfqo7DYh\r\nTmmuQDfXhCSEhxddhZTKXT3YkiUFpwv2Jq3iqeqQ7X9owIz0kidQkOlITS8D\r\nYMDhhF2YMNeFMX8zwUzAUR9sf789GpaXxZqa0xePZP9DAHxxJsUKTHoN8XBZ\r\nGKUDqDXVcFrXWYvBBKw2uWxY8fcOtNxcfKvE2nMD1WZ4X1zJnqhdEqQkXdYv\r\nH13Dye6UGNKuifUcbTC7Y4sLi+zCUztHRph5wkWfIA4lyafsjxpyqzxFG099\r\n6NrvGCRX7j6VJd2LtsjAC6fwKmELQuNPdLgJUmsVypw+ze5LTsNOOYMZysxw\r\nobAaY04f2cLlsu6PUNdoFAjQNwzdduI/tCf1dT467mSGzKwC/1hXKJnprFIP\r\nFVHcCePrK5dLIMuM4pSyX5XSJvCBWKfkv+s=\r\n=HQbJ\r\n-----END PGP SIGNATURE-----\r\n"
}

Repository

PENDING
xz870603611/42-react-native-reanimated-player

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 19:59 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:ad4b973ee4ae49985be170fe64033f1d6301924bf4a62dd7ee9e45c8e8ed95b0

Other collected versions

2.2.516 Jan2.2.425 Nov2.2.224 Nov2.2.122 NovView all collected versions →