react-native-convert-ph-asset
Getting started
$ npm install react-native-convert-ph-asset --save
Mostly automatic installation
$ react-native link react-native-convert-ph-asset
Manual installation
iOS
If you are using Cocoapods add the following line to your Podfile:
pod 'RNConvertPhAsset', :path => '../node_modules/react-native-convert-ph-asset'
otherwise follow those steps:
- In XCode, in the project navigator, right click
Libraries
➜Add Files to [your project's name]
- Go to
node_modules
➜react-native-convert-ph-asset
and addRNConvertPhAsset.xcodeproj
- Run your project (
Cmd+R
)<
Usage
; RNConvertPhAsset; // or RNConvertPhAsset;
Props | Type | Default | Notes |
---|---|---|---|
url | String | Video asset | |
id | String | The id of the video asset | |
convertTo | String | Can be mpeg4, m4v or mov | |
quality | String | original | Can be original, high, medium, low |
Response
mimeType: "video/quicktime" path: "file:///var/mobile/Containers/Data/Application/750FEB7F-97E7-49B7-87C2-6ADF301D189F/Documents/C56BC846-94D4-476A-BF33-7E62BC412F2B.mov" filename: "C38AD32D-839F-494A-915F-28E8199177A6.mov" type: "video" duration: 1588
Acknowledgements
react-native-gallery-manager
- original basis of this project