Hau Vo 0ee4dee465 Add example | 7 gadus atpakaļ | |
---|---|---|
Example | 7 gadus atpakaļ | |
android | 7 gadus atpakaļ | |
ios | 7 gadus atpakaļ | |
.gitattributes | 7 gadus atpakaļ | |
.gitignore | 7 gadus atpakaļ | |
.npmignore | 7 gadus atpakaļ | |
README.md | 7 gadus atpakaļ | |
index.js | 7 gadus atpakaļ | |
package.json | 7 gadus atpakaļ | |
yarn.lock | 7 gadus atpakaļ |
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')
RNThumbnail.sln
in node_modules/react-native-thumbnail/windows/RNThumbnail.sln
folder to their solution, reference from their app.MainPage.cs
app
using Com.Reactlibrary.RNThumbnail;
to the usings at the top of the filenew RNThumbnailPackage()
to the List<IReactPackage>
returned by the Packages
methodimport RNThumbnail from 'react-native-thumbnail';
RNThumbnail.get(filepath).then((result) => {
console.log(result.path); // thumbnail path
})