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-video-cache-turbo

v0.3.1

Published

Boost performance on online video loading and caching

Readme

🎥 react-native-video-cache-turbo

🚀 Turbo-powered Video Caching for React Native Seamless online video playback with offline caching using React Native’s modern Turbo Modules.

npm version License: MIT GitHub stars


✨ Features

  • Turbo Modules Support → Modern RN architecture for performance
  • 📱 Cross-Platform → Works on iOS & Android
  • 🔒 Automatic Caching → Transparent offline playback
  • 🎯 Simple API → Just convert(url) and you’re ready
  • ⚙️ Zero Configuration → Works out of the box
  • 🔄 Async + Sync Support → Use whichever suits your flow

📦 Installation

npm install react-native-video-cache-turbo
# or
yarn add react-native-video-cache-turbo

iOS Setup

cd ios && pod install && cd ..

✅ Android setup is automatic — nothing extra required.


🚀 Quick Start

import { convert, convertAsync } from 'react-native-video-cache-turbo';
import Video from 'react-native-video';

const videoUrl = 'https://example.com/video.mp4';

export default function VideoPlayer() {
  return (
    <Video source={{ uri: convert(videoUrl) }} controls style={{ flex: 1 }} />
  );
}

Async Usage:

const cachedUrl = await convertAsync(videoUrl);
console.log('Cached URL:', cachedUrl);

📖 API Reference

🔹 convert(url: string): string

Synchronously converts a video URL to a cached/proxy URL.

const cachedUrl = convert('https://example.com/video.mp4');
// → 'http://localhost:port/proxy/video.mp4'

🔹 convertAsync(url: string): Promise<string>

Asynchronously converts a video URL.

const cachedUrl = await convertAsync('https://example.com/video.mp4');

🎯 Usage with react-native-video

import { convert } from 'react-native-video-cache-turbo';
import Video from 'react-native-video';

export default function App() {
  const videoUrl =
    'https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4';

  return (
    <Video
      source={{ uri: convert(videoUrl) }}
      controls
      resizeMode="contain"
      style={{ width: '100%', height: 300 }}
    />
  );
}

🔧 Advanced Usage

Custom Player Integration

import { convertAsync } from 'react-native-video-cache-turbo';

class CustomVideoPlayer {
  async loadVideo(url: string) {
    try {
      const cachedUrl = await convertAsync(url);
      this.player.src = cachedUrl;
    } catch {
      this.player.src = url; // fallback
    }
    this.player.play();
  }
}

Error Handling

try {
  const cachedUrl = convert(videoUrl);
} catch (e) {
  console.warn('Caching failed. Falling back to original URL.');
}

🏗️ Architecture

This library is built on React Native Turbo Modules 💨

  • 🚀 Performance → Direct native calls, no bridge overhead
  • 🔒 Type Safety → Full TypeScript support
  • 🔗 Automatic Linking → No manual native setup

Under the Hood


📊 Why Use This?

✔ Faster first playback ✔ Reduced bandwidth consumptionOffline playback after first load ✔ Smooth seek support


🐛 Troubleshooting

  • Video not playing? → Ensure internet is available on first play
  • iOS build error? → Run pod install
  • Caching not working? → Validate your video URL

Debugging Example:

const cachedUrl = convert('https://example.com/video.mp4');
console.log({ cachedUrl });

🤝 Contributing

We welcome PRs!

  1. Fork this repo
  2. git checkout -b feature/my-feature
  3. Make changes & test on iOS/Android
  4. Submit PR 🎉

📖 See Contributing Guidelines & Code of Conduct


📄 License

MIT © Yogesh Solanki


🙏 Acknowledgments


📞 Support


Made with ❤️ for the React Native community