Hello there,
I have a question how to get a image gif from library android, it work for video and image but when I try to select a animation gif then have a error
main.js:1363 ERROR Error: Uncaught (in promise): Couldn't read video at /storage/emulated/0/Download/abc.gif(…)defaultErrorLogger @ main.js:1363
Any suggestion for select a image gif?
What code do you execute here? It seems to think the gif is a video, not an image.
Hello
It video work fine, here my code below
videoLibrary() {
return new Promise((resolve, reject) => {
let options = {
targetWidth: this._setting.width,
targetHeight: this._setting.height,
quality: this._setting.quality,
sourceType: this.Camera.PictureSourceType.PHOTOLIBRARY,
destinationType: this.Camera.DestinationType.FILE_URI,
maximumImagesCount: 1,
mediaType: this.Camera.MediaType.ALLMEDIA
};
this.Camera.getPicture(options).then((file) => {
if (this.util.isAndroid) {
file = 'file://' + file;
}
resolve(file);
}, (err) => {
console.log(err);
reject(err);
});
});
}
}
Hello, and how to display this on the HTML5 code?
<img class=“marcoFoto” [src]=“file” *ngIf=“file”/>
because that is not working.
Could you help me please? Im desperate
I solve it! it is a problem of the “ionic cordova run android --livereload” command, DONT USE THE --livereload