nativescript-video-editor
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

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

Dependencies (0)

    Dev Dependencies (8)

    Package Sidebar

    Install

    npm i nativescript-video-editor

    Weekly Downloads

    1

    Version

    0.0.1

    License

    Apache-2.0

    Unpacked Size

    127 kB

    Total Files

    11

    Last publish

    Collaborators

    • triniwiz