Hau Vo dc9af06fce Merge pull request #40 from robwalkerco/patch-1 | il y a 5 ans | |
---|---|---|
Example | il y a 6 ans | |
android | il y a 5 ans | |
ios | il y a 5 ans | |
.gitattributes | il y a 7 ans | |
.gitignore | il y a 7 ans | |
.npmignore | il y a 7 ans | |
LICENSE | il y a 6 ans | |
README.md | il y a 5 ans | |
RNThumbnail.podspec | il y a 6 ans | |
index.js | il y a 7 ans | |
package.json | il y a 6 ans | |
yarn.lock | il y a 6 ans |
Get thumbnail from local media. Currently, it only supports for video.
$ npm install react-native-thumbnail --save
$ react-native link react-native-thumbnail
Libraries
➜ Add Files to [your project's name]
node_modules
➜ react-native-thumbnail
and add RNThumbnail.xcodeproj
libRNThumbnail.a
to your project’s Build Phases
➜ Link Binary With Libraries
Cmd+R
)<android/app/src/main/java/[...]/MainActivity.java
import com.reactlibrary.RNThumbnailPackage;
to the imports at the top of the filenew RNThumbnailPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-thumbnail'
project(':react-native-thumbnail').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-thumbnail/android')
android/app/build.gradle
:
implementation project(':react-native-thumbnail')
import RNThumbnail from 'react-native-thumbnail';
RNThumbnail.get(filepath).then((result) => {
console.log(result.path); // thumbnail path
})