Wed, 02 Jun 2021 09:01:26 GMT
Join the conversation at slack.cordova.io
Tue, 01 Jun 2021 15:19:41 GMT
@pieter.vanpoyer says
Just a newbee question. What‘s the difference between cordova-plugin-camera and cordova-plugin-media-capture. https://github.com/apache/cordova-plugin-camera vs https://github.com/apache/cordova-plugin-media-capture For example to take photo’s on Android and Ios and select images from Android and Ios. Can I use any of these plugins?
Tue, 01 Jun 2021 15:24:22 GMT
@dpogue says
My recommendation is always to start with
<input type="file">
and only look at plugins if you absolutely need to
Tue, 01 Jun 2021 15:25:27 GMT
@dpogue says
cordova-plugin-camera is intended to handle taking photos, some basic cropping/editing, and picking from the gallery. I think cordova-plugin-media-capture is more intended for audio/video stuff
Tue, 01 Jun 2021 15:26:19 GMT
@dpogue says
(although on newer versions of iOS you should be able to use
getUserMedia
and standard media APIs, so cordova-plugin-media-capture shouldn't be necessary)
Tue, 01 Jun 2021 15:31:13 GMT
@pieter.vanpoyer says
Thanks. I've never tried the input type=“file” in a Cordova app. Interesting, are you able to open the camera for example without a plugin? Or should you be able to open the camera without a plugin? Seems like I should be experimenting with the type=“file” and the media-capture plugin to get a good notion of the capabilities.
Tue, 01 Jun 2021 15:32:30 GMT
@dpogue says
<input type="file" accept="image/*">
should give you a picker to open from gallery or camera, provided you also add the right permissions to Info.plist or AndroidManifest.xml
Tue, 01 Jun 2021 15:33:15 GMT
@dpogue says
I have never used either of those plugins, but several of my apps support uploading images
Tue, 01 Jun 2021 15:40:44 GMT
@jcesarmobile says
One of those was supposed to be deprecated, or maybe it was the media, but we didn’t do it in the end
Tue, 01 Jun 2021 15:41:40 GMT
@jcesarmobile says
Input file probably needs some cordova-android changes to properly work, on iOS is provided by the webview, should “just work “