Video Thumbnail

Create video thumbnails from video files on Android
Lewis Barnes1.0.00
platforms: android
$ cordova plugin add

This plugin provides support for rendering video thumbnails within Cordova, After looking around the web for a video thumbnail plugin, I couldn't seem to find a plugin that worked 'out the box'. I decided I would create one myself that unlike some of the similar plugins, generates a base64 encoded string that can be used via an image element or via CSS styling with a background url property.


cordova plugin add

Supported Platforms

  • Android


navigator.videoThumbnail.createThumbnail(source, success, failure);


Path to the video file. Example:
Successful callback. This function will be fired when the thumbnail has been created without any errors.
Fail callback. This function will be fired if there are any errors that have occured during the creation of the thumbnail.


navigator.videoThumbnail.createThumbnail(fileURI, function(imageData) {
    console.log(imageData); //Will display the base64 encoded string in console.
}, function(err) {
    alert("Error: " + err); //Fire an alert if any errors occur.