add instructions for CocoaPods setup
This commit is contained in:
parent
82edb959d8
commit
4cc984d5da
26
README.md
26
README.md
@ -50,6 +50,32 @@ If you would like to allow other apps to play music over your video component, a
|
||||
Note: you can also use the `ignoreSilentSwitch` prop, shown below.
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>iOS (CocoaPods)</summary>
|
||||
Setup your Podfile like it is described in the [react-native documentation](https://facebook.github.io/react-native/docs/integration-with-existing-apps#configuring-cocoapods-dependencies).
|
||||
|
||||
Depending on your requirements you have to choose between the two possible subpodspecs:
|
||||
|
||||
video only:
|
||||
|
||||
```diff
|
||||
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
|
||||
|
||||
+ `pod 'react-native-video', :path => '../node_modules/react-native-video/react-native-video.podspec'`
|
||||
end
|
||||
```
|
||||
|
||||
video with caching (you can learn more about caching [here](docs/caching.md):
|
||||
|
||||
```diff
|
||||
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
|
||||
|
||||
+ `pod 'react-native-video/VideoCaching', :path => '../node_modules/react-native-video/react-native-video.podspec'`
|
||||
end
|
||||
```
|
||||
|
||||
</details>
|
||||
|
||||
<details>
|
||||
<summary>tvOS</summary>
|
||||
|
||||
|
16
docs/caching.md
Normal file
16
docs/caching.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Caching
|
||||
|
||||
Caching is currently only supported on `iOS` platforms with a CocoaPods setup.
|
||||
|
||||
# Technology
|
||||
|
||||
The cache is backed by [SPTPersistentCache](https://github.com/spotify/SPTPersistentCache) and [DVAssetLoaderDelegate](https://github.com/vdugnist/DVAssetLoaderDelegate).
|
||||
|
||||
# How Does It Work
|
||||
|
||||
The caching is based on the url of the asset.
|
||||
SPTPersistentCache is a LRU ([last recently used](https://en.wikipedia.org/wiki/Cache_replacement_policies#Least_recently_used_(LRU))) cache.
|
||||
|
||||
By default files expire after 30 days and the maxmimum cache size is 100mb.
|
||||
|
||||
In a future release the cache might have more configurable options.
|
Loading…
Reference in New Issue
Block a user