cordova-plugin-mediaPicker
cordova-plugin-mediaPicker copied to clipboard
defaultSelectedList option
defaultSelectedList Option
Hello Sir,
Firstly, Thanks For Great Work.
Secondly,
is defaultSelectedList option work? how use it?
Can load only media in specific directory?
Best Regards Alaa Nasr
sorry sir, defaultSelectedList option can't support on ios.
i don't want it for ios, but i need it for android
After selecting the picture, if you enter the selection interface again, the LIST you passed in will be selected by default.
thanks for replying,
i am sorry for more questions
is the LISTs can be modified? How To Manage It from JS?
Best Regards
var args = { 'selectMode': 101, //101=picker image and video , 100=image , 102=video 'maxSelectCount': 40, //default 40 (Optional) 'maxSelectSize': 188743680, //188743680=180M (Optional) }; MediaPicker.getMedias(args, function(medias) { args.defaultSelectedList = medias; })
Maybe we can add a getAlbumList function to return a object which has key of assetCollectionSubtype and value as localizedTitle, and then we can let the user to choose the default collection when they call getMedia. And I think the default collection should be the user's camera roll, which subtype is PHAssetCollectionSubtypeSmartAlbumUserLibrary. Because this collection has the all the medias.
This default option is related to the issue I raised yesterday about the index pointer code defect.
I will submit a PR for fixing this later :)