cordova-plugin-mediaPicker icon indicating copy to clipboard operation
cordova-plugin-mediaPicker copied to clipboard

You can use on ionic 3

Open vijay471 opened this issue 4 years ago • 2 comments

You can use on ionic 3

ionic cordova plugin add https://github.com/DmcSDK/cordova-plugin-mediaPicker.git --variable IOS_PHOTO_LIBRARY_USAGE_DESCRIPTION="your usage message"

let args = {
        "selectMode": 100, //101=picker image and video , 100=image , 102=video
        "maxSelectCount": 5,
        "maxSelectSize": 21000000 // 20mb
};

(window as any).MediaPicker.getMedias(args, (medias: any[]) => {
        console.log(medias);
}, (err: any) => {
        console.log(err)
});

Originally posted by @secretmoo35 in https://github.com/DmcSDK/cordova-plugin-mediaPicker/issues/105#issuecomment-611934047

Not working😞

Error MediaPicker not function

vijay471 avatar Sep 26 '20 11:09 vijay471

Platform you are using?

secretmoo35 avatar Oct 01 '20 09:10 secretmoo35

Hi, I solve this problem. use like this

`
import ~~~
declare var MediaPicker;
@component({})

yourMethod(){
let args = {
        "selectMode": 100, //101=picker image and video , 100=image , 102=video
        "maxSelectCount": 5,
        "maxSelectSize": 21000000 // 20mb
};
MediaPicker.getMedias(args, (medias: any[]) => {
        console.log(medias);
}, (err: any) => {
        console.log(err)
});
}
`

dmlwls95 avatar Jul 09 '21 07:07 dmlwls95