Skip to content

Commit

Permalink
add Usage into readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sky-code committed Jun 10, 2016
1 parent c972939 commit a44b341
Showing 1 changed file with 22 additions and 1 deletion.
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,28 @@ iOS Cordova plugin for converting images (frames) to video written in Swift.

## Usage

TODO
```javascript
var options = {
filePath: filePath,
width: 320,
height: 150,
fps: 30
};
frames = ["data:image/gif;base64,R0lGODlhMgAyA...", "data:image/gif;base64,R0lGODlhMgAyA..."];
MediaKit.convert(function (fileUrl) {

videoPreviewElement.src = fileUrl;
videoPreviewElement.play();

MediaKit.saveVideoToPhotoLibrary(function(videoLocalIdentifier) {
alert(videoLocalIdentifier);
}, function(error) {
console.log(error);
}, fileUrl);
}, function () {
console.log(error);
}, options, frames);
```

## Useful links

Expand Down

0 comments on commit a44b341

Please sign in to comment.