I am working on a project where i need to get a base64 data from the file in Android and IOS platforms. I tried a lot but i dont get base64 data of a video file. Can anyone suggest a working method?
$cordovaCapture.captureVideo(options).then(function (videoData) {
$cordovaFile.readAsDataURL(videoData[0].localURL)
.then(function (success) {
console.log("==========success==========");
console.log(success);
}, function (error) {
console.log("==========error==========");
console.log(error);
});
}
The following link may be helpful.
http://www.iandevlin.com/blog/2012/09/html5/html5-media-and-data-uri