Hau Vo 566b2ee318 Merge pull request #22 from n1ru4l/feature-remove-self-dependency | 6 anos atrás | |
---|---|---|
Example | 7 anos atrás | |
android | 7 anos atrás | |
ios | 7 anos atrás | |
.gitattributes | 7 anos atrás | |
.gitignore | 7 anos atrás | |
.npmignore | 7 anos atrás | |
README.md | 7 anos atrás | |
index.js | 7 anos atrás | |
package.json | 6 anos atrás | |
yarn.lock | 7 anos atrás |
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
:
compile project(':react-native-thumbnail')
import RNThumbnail from 'react-native-thumbnail';
RNThumbnail.get(filepath).then((result) => {
console.log(result.path); // thumbnail path
})