npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-custom-min-video-player

v0.1.1

Published

React Native custom video player with floating mini player — YouTube/Netflix-style controls, fullscreen, gestures, and continuous playback across navigation

Readme

react-native-custom-min-video-player

A React Native video player with a custom control UI and a floating mini player that keeps playback going while users navigate your app.

Built for apps that need a YouTube- or Netflix-style watch experience: inline or fullscreen video, scrubbing, double-tap seek, playback speed, and a draggable mini video player that snaps to the screen edge.

MIT License TypeScript npm

📚 Full guide: docs/CUSTOM_VIDEO_PLAYER_GUIDE.md — installation, architecture, props, wiring API data, customization, and troubleshooting.

Features

  • Play / pause / replay
  • Scrubbable progress bar with buffer indicator
  • Current time & duration
  • Loading & error states with retry
  • Fullscreen toggle
  • Auto-hiding controls + tap to reveal
  • Double-tap left/right to seek ±10s
  • Playback speed picker
  • Poster / thumbnail support
  • Resume from timestamp
  • Optional background playback
  • Floating mini player (drag, snap left/right, play/pause, close)
  • Single global player instance (no reload when restoring)

Installation

npm install react-native-custom-min-video-player react-native-video react-native-reanimated react-native-gesture-handler react-native-safe-area-context react-native-worklets
# or
yarn add react-native-custom-min-video-player react-native-video react-native-reanimated react-native-gesture-handler react-native-safe-area-context react-native-worklets

Babel

Add Reanimated’s plugin last in babel.config.js:

module.exports = {
  presets: ['module:@react-native/babel-preset'],
  plugins: ['react-native-reanimated/plugin'],
};

Entry file

import 'react-native-gesture-handler';

iOS:

cd ios && pod install && cd ..

Quick start

import {
  VideoPlayer,
  VideoPlayerProvider,
} from 'react-native-custom-min-video-player';

export default function App() {
  return (
    <VideoPlayerProvider
      onRestoreRequest={() => navigation.navigate('Video', lastParams)}
      onFullscreenBack={() => navigation.goBack()}
    >
      {/* Your navigation tree */}
    </VideoPlayerProvider>
  );
}

On a video screen:

<VideoPlayer
  source={{ uri: videoUrl }}
  videoId="unique-id"
  title="Episode 1"
  autoPlay
  enableMiniPlayer
  enableFullscreen
  enableDoubleTap
  enableGestures
  onProgress={({ currentTime, duration }) => {}}
  onEnd={() => {}}
  onError={(message) => {}}
/>

Pressing back (or the in-player back control) does not stop playback — the session collapses into a floating mini player. Tap the mini player to restore fullscreen from the same timestamp.

Close (✕) on the mini player stops playback and releases resources.

Public API

import {
  VideoPlayer,
  VideoPlayerProvider,
  MiniPlayer,
  useVideoPlayer,
  useMiniPlayer,
  VideoPlayerManager,
} from 'react-native-custom-min-video-player';

| Export | Description | |--------|-------------| | VideoPlayerProvider | Hosts the single native Video surface (fullscreen + mini) | | VideoPlayer | Screen helper — opens / restores a session; enables mini on unmount | | MiniPlayer | API stub (UI is rendered by the provider) | | useVideoPlayer | Reactive player state + controls | | useMiniPlayer | Mini visibility helpers | | VideoPlayerManager | Singleton for advance control / cleanup |

Architecture

VideoPlayerProvider
 └─ App navigation
 └─ VideoHost (ONE react-native-video)
      ├─ fullscreen chrome (controls, gestures)
      └─ mini chrome (drag / snap / close)

VideoPlayerManager is the single source of truth for source, position, play state, mode (idle | fullscreen | mini), and errors.

Example app

yarn
yarn example start
yarn example ios
# or
yarn example android

Demo flow: Home → Video → Back → mini player → Browse → tap mini → fullscreen continues.

Peer dependencies

  • react, react-native
  • react-native-video ≥ 6
  • react-native-reanimated ≥ 3
  • react-native-gesture-handler ≥ 2.12
  • react-native-safe-area-context ≥ 4
  • react-native-worklets (required by Reanimated 4)

Publishing

yarn typecheck
yarn prepare   # builds lib/ via react-native-builder-bob
npm publish --access public

License

MIT © Mohammad Ali