@ClementRicateau
<button
onclick="window.plugins.socialsharing.shareViaFacebook(
'Message via Facebook',
null /* img */,
null /* url */,
function() {
console.log('share ok')
},
function(error) {
console.error(error)
})"
>msg via Facebook</button>
shareViaInstagram(imagePath, cb) {
let canvas, context, imageDataUrl;
const img = new Image();
img.onload = () => {
canvas = document.createElement('canvas');
canvas.width = img.width;
canvas.height = img.height;
context = canvas.getContext('2d');
context.drawImage(img, 0, 0);
try {
imageDataUrl = canvas.toDataURL('image/jpeg', 1.0);
Instagram.share(imageDataUrl, cb);
}
catch(e) {
cb(e.message);
}
};
img.src = imagePath;
}
Transitions GPU
-webkit-transform: translate3d(0,0,0);
Nouvelle Webview
{
path: "chemin de l'image"
}
{
path: "chemin de l'image",
date: "timestamp de l'image"
}
CameraRoll.getPhotos((photo) => {
// Callback is called as many times as there are photos
// photo is an empty object when loading is finished
}
{
path: "chemin de l'image",
date: "timestamp de l'image",
thumbnailPath: 'Chemin de la miniature',
orientation: 'Orientation de la miniature'
}
background-size: cover;
object-fit: cover;
@ClementRicateau