Skip to content

This plugin allows you to save local Video file to the iOS Camera Roll.

License

Notifications You must be signed in to change notification settings

doremir/cordova-plugin-save-video

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cordova-Plugin-Save-Video (IOS only)

This plugin allows you to save local Video file to the iOS Camera Roll. The video file to be saved to the Library/Gallery must be available on the device.

The plugin is based on code seen in several other existing plugins:

  1. SaveVideo By quiply
  2. Canvas2VideoPlugin by Tommy-Carlos Williams
  3. ImgDownloader by Nomia
  4. cordova-camera-roll by Max Lynch

Thanks to all of the above mentioned authors for sharing their code openly.

cordova plugin add https://github.com/AnasFullStack/cordova-plugin-save-video.git --nofetch

Methods

  • cordova.plugins.saveVideoToGallery

Properties

none

API reference

saveVideoToGallery

Save a local video to the device gallery.

window.cordova.plugins.saveVideoToGallery(nativePathToVideo, successCallback, errorCallback);

Supported Platforms

  • iOS

Usage Example

Call the window.cordova.plugins.saveVideoToGallery() method passing 3 parameters:

  1. The native video path for the video to be saved
  2. success callback
  3. error callback

Example

// iOS with file prefix: var nativePathToVideo = 'file:///var/mobile/Containers/Data/Application/<UUID>/Library/NoCloud/some_dir/some_video.mp4'
// iOS without file prefix: var nativePathToVideo = '/var/mobile/Containers/Data/Application/<UUID>/Library/NoCloud/some_dir/some_video.mp4'

window.cordova.plugins.saveVideoToGallery(nativePathToVideo, onSaveVideoSuccess, onSaveVideoError);

function onSaveVideoSuccess() {
    console.log('--------------success');
}

function onSaveVideoError(error) {
    console.log('--------------error: ' + error);
}

About

This plugin allows you to save local Video file to the iOS Camera Roll.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published