mirror of
https://github.com/zhigang1992/react-native-video-cache.git
synced 2026-01-12 16:42:21 +08:00
27 lines
582 B
Markdown
27 lines
582 B
Markdown
# react-native-video-cache
|
|
|
|
Boost performance on online video loading and caching
|
|
|
|
Use following libraries to do the heavy lifting.
|
|
|
|
- iOS: https://github.com/ChangbaDevs/KTVHTTPCache
|
|
- Android: https://github.com/danikula/AndroidVideoCache
|
|
|
|
|
|
## Getting started
|
|
|
|
`$ yarn add react-native-video-cache`
|
|
|
|
### Mostly automatic installation
|
|
|
|
`$ react-native link react-native-video-cache`
|
|
|
|
## Usage
|
|
```javascript
|
|
import convertToProxyURL from 'react-native-video-cache';
|
|
...
|
|
const localProxiedURL = await convertToProxyURL(originalURL);
|
|
...
|
|
<Video source={{uri: localProxiedURL}} />
|
|
```
|