React Native library for caching streaming video to improve playback performance. Version 1.2.4 supports iOS via KTVHTTPCache and Android via AndroidVideoCache, wrapping them in a unified JS API. Provides synchronous and asynchronous proxy URL conversion, optional request headers, cache existence checks, and cache clearing (all or single URL). Ships TypeScript type definitions. Low maintenance cadence; last release 2023.
npm install react-native-video-cache-controlNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Synchronous video caching: convert URL to proxy URL and render with react-native-video.
Add maven { url "$rootDir/../node_modules/react-native-video-cache-control/android/libs" } to allprojects/repositories in android/build.gradle.Use the async convertAsync function in performance-critical paths.
Pass the full URL object (with headers if originally used) to clearCache to delete a single cache entry.
Always wrap convertAsync in try/catch or use .catch() to handle potential caching failures.
Use isCached only for full cached files; partial caching is not exposed by this library.
Run 'cd ios && pod install' and rebuild the app. Ensure react-native link is done for autolinking.
Run 'yarn add react-native-video-cache-control' or 'npm install react-native-video-cache-control'.
Use 'import convertToProxyURL from 'react-native-video-cache-control'' (default import).