Hau Vo 1bc185390d Merge pull request #26 from kevinresol/master | vor 6 Jahren | |
---|---|---|
Example | vor 6 Jahren | |
android | vor 6 Jahren | |
ios | vor 6 Jahren | |
.gitattributes | vor 7 Jahren | |
.gitignore | vor 7 Jahren | |
.npmignore | vor 7 Jahren | |
LICENSE | vor 6 Jahren | |
README.md | vor 6 Jahren | |
RNThumbnail.podspec | vor 6 Jahren | |
index.js | vor 7 Jahren | |
package.json | vor 6 Jahren | |
yarn.lock | vor 6 Jahren |
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
})