nativescript-video-editor
by Osei Fortune | v0.0.1
A NativeScript plugin to edit videos.
npm i --save nativescript-video-editor

NativeScript Video Editor

Build Status NPM version Downloads Twitter Follow

Prerequisites / Requirements

Note Android min-sdk is 18

Installation

Describe your plugin installation steps. Ideally it would be something like:

tns plugin add nativescript-video-editor

Usage

Transcode

import { VideoEditor } from 'nativescript-video-editor';
// parameters passed to transcodeVideo
VideoEditor.transcodeVideo(
filePath, // the path to the video on the device
'outputFileName', // the file name for the transcoded video
width,
height,
videoBitrate,
fps,
saveToLibrary, // optional, defaults to true
function(progress) {} // info will be a number from 0 to 100
).then(function(file){})
.catch(function(error) {})

Create a JPEG thumbnail from a video

import { VideoEditor } from 'nativescript-video-editor';
VideoEditor.createThumbnail(
filePath, // the path to the video on the device
'outputFileName', // the file name for the JPEG image
60, // optional, location in the video to create the thumbnail (in seconds)
320, // optional, width of the thumbnail
480, // optional, height of the thumbnail
100 // optional, quality of the thumbnail (between 1 and 100)
)
.then(function(file){})
.catch(function(error) {})

Get info on a video (width, height, orientation, duration, size, & bitrate)

import { VideoEditor } from 'nativescript-video-editor';
VideoEditor.getVideoInfo(
filePath, // the path to the video on the device
).then(function(info){})
.catch(function(error) {})

License

Apache License Version 2.0, January 2004