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

rn-floating-video-player

v1.0.1

Published

A smooth, draggable floating video player for React Native with Picture-in-Picture (PiP), full controls, and edge snapping

Readme

rn-floating-video-player

A smooth, draggable floating video player for React Native — with Picture-in-Picture (PiP) mode, full playback controls, edge snapping, and buttery spring animations.

Features

  • 🎬 Full-screen video player with all standard controls
  • 🪟 Floating mini player (PiP) — drag it anywhere on screen
  • 🧲 Edge snapping — mini player snaps to left/right edges on release
  • 🎛️ Complete controls — play/pause, seek, volume, mute, skip ±10s, fullscreen
  • 💫 Smooth animations — spring physics on drag, fade in/out controls
  • 🎨 Themeable — dark/light mode + custom accent color
  • 🔧 Imperative API — control the player via ref
  • 📱 iOS + Android support

Installation

npm install rn-floating-video-player react-native-video
# or
yarn add rn-floating-video-player react-native-video

iOS

npx pod-install

Android

No extra setup needed beyond react-native-video's own setup.

Usage

Basic

import { FloatingVideoPlayer } from 'rn-floating-video-player';

export default function App() {
  return (
    <FloatingVideoPlayer
      source={{ uri: 'https://example.com/video.mp4' }}
      autoPlay
    />
  );
}

With minimize/maximize

import React, { useState } from 'react';
import { View } from 'react-native';
import { FloatingVideoPlayer } from 'rn-floating-video-player';

export default function App() {
  const [visible, setVisible] = useState(true);

  if (!visible) return null;

  return (
    <View style={{ flex: 1 }}>
      {/* Your app content here */}

      <FloatingVideoPlayer
        source={{ uri: 'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4' }}
        accentColor="#FF6B6B"
        theme="dark"
        autoPlay
        snapToEdge
        onClose={() => setVisible(false)}
        onMinimize={() => console.log('Minimized!')}
        onMaximize={() => console.log('Maximized!')}
        onProgress={(currentTime, duration) => {
          console.log(`${currentTime} / ${duration}`);
        }}
      />
    </View>
  );
}

Using the imperative ref

import React, { useRef } from 'react';
import { Button, View } from 'react-native';
import { FloatingVideoPlayer, FloatingVideoPlayerRef } from 'rn-floating-video-player';

export default function App() {
  const playerRef = useRef<FloatingVideoPlayerRef>(null);

  return (
    <View style={{ flex: 1 }}>
      <FloatingVideoPlayer
        ref={playerRef}
        source={{ uri: 'https://example.com/video.mp4' }}
      />

      <Button title="Play" onPress={() => playerRef.current?.play()} />
      <Button title="Pause" onPress={() => playerRef.current?.pause()} />
      <Button title="Seek to 30s" onPress={() => playerRef.current?.seekTo(30)} />
      <Button title="Minimize" onPress={() => playerRef.current?.minimize()} />
    </View>
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | source | ReactVideoSource | required | Video source (same as react-native-video) | | style | StyleProp<ViewStyle> | — | Container style override | | initialPosition | { x: number, y: number } | Bottom-right | Initial position of mini player | | onMinimize | () => void | — | Called when minimized | | onMaximize | () => void | — | Called when restored | | onClose | () => void | — | Called when close is pressed | | onProgress | (currentTime, duration) => void | — | Playback progress | | onEnd | () => void | — | Video ended | | onError | (error) => void | — | Playback error | | theme | 'dark' \| 'light' | 'dark' | Color theme | | accentColor | string | '#6C63FF' | Progress bar / button color | | autoPlay | boolean | false | Auto-play on mount | | showCloseButton | boolean | true | Show close/dismiss button | | snapToEdge | boolean | true | Mini player snaps to screen edges |

Ref Methods

| Method | Signature | Description | |--------|-----------|-------------| | play | () => void | Play the video | | pause | () => void | Pause the video | | seekTo | (time: number) => void | Seek to time in seconds | | minimize | () => void | Enter PiP/mini mode | | maximize | () => void | Exit PiP/mini mode | | close | () => void | Dismiss the player |

Architecture

src/
├── FloatingVideoPlayer.tsx   # Main component
├── Controls.tsx              # Overlay controls (seekbar, buttons)
├── types.ts                  # TypeScript types & interfaces
├── index.ts                  # Package entry point
└── hooks/
    ├── useVideoState.ts       # Playback state management
    └── useFloatingPosition.ts # Drag, snap, spring physics

Dependencies

No other native dependencies required.

License

MIT