GitHub user TanaseButcaru opened a pull request: https://github.com/apache/cordova-plugin-camera/pull/168
CB-10369: Added getVideo() feature with thumbnail creation (readded) I've implemented the `getVideo` function for cordova-plugin-camera which gives the user the ability to record a video with default camera app. You can create a sample cordova app and copy the www files from `samples/android/www_getVideo` and run an interactive test of this feature with all the options, as follows: * `quality`: points to `Camera.VideoQuality`, * `sourceType`: points to `Camera.VideoSourceType`, * `encodingType`: points to `Camera.VideoEncodingType`, * `mediaType`: points to `Camera.MediaType`, * `mediaThumbnail`: points to `Camera.MediaThumbnail`, * `mediaDurationLimit`: numeric value, 0 = disabled * `mediaSizeLimit`: numeric value, 0 = disabled ... where: ```js VideoEncodingType:{ /** Return 3GP encoded video */ GPP: 2, /** Return MP4 encoded video */ MP4: 3, /** Return WEBM encoded video */ WEBM: 4, /** Return MKV encoded video */ MKV: 5 }, MediaThumbnail:{ /** Media thumbnail disabled */ NONE: 0, /** Creates a thumbnail of 512x384 px */ MINI_KIND: 1, /** Creates a thumbnail of 96x96 px */ MICRO_KIND: 2 }, VideoSourceType:{ /** Choose video from video library */ VIDEOLIBRARY : 0, /** Take video from camera */ CAMERA : 1 }, VideoQuality:{ /** Low quality, suitable for MMS messages */ LOW : 0, /** High quality */ HIGH: 1 }, ``` I always thought that this plugin would launch the camera app in recording mode if `sourceType` set to CAMERA and `mediaType` set to VIDEO, but when I needed this I found that it's not implemented, so I made it myself. I'm just a web dev, not a software developer, but I managed to get it done; this is my first contribution to a cordova plugin with native code, so there might be things that are not written well or missing checks. I'm open to suggestions and contributions for this. Android only for the moment. If there's someone that can port this to iOS would be much appreciated, but in the meantime, I'll try my luck with that too. Tested with two real devices: Sony Xperia Z3 Compact (5.1.1) and Sony Xperia Sola (unofficial 4.4.4) Here are two screenshots with the interactive sample:   You can merge this pull request into a Git repository by running: $ git pull https://github.com/TanaseButcaru/cordova-plugin-camera-unofficial CB-10369 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/cordova-plugin-camera/pull/168.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #168 ---- commit 6fcf212ceeb89c049c046aa937c735fe62cff50b Author: TanaseButcaru <cont...@butcaru.com> Date: 2016-01-14T22:22:11Z getVideo() support commit 6fd443eca382204bdda70683dbc49c9db6f2b7c1 Author: TanaseButcaru <cont...@butcaru.com> Date: 2016-01-15T21:41:14Z getVideo() update + mediaThumbnail commit 5e347284d70a7e25a16a91350508e8da2e103ec6 Author: TanaseButcaru <cont...@butcaru.com> Date: 2016-01-15T21:49:36Z getVideo() fix module already defined error commit 6c6bfae57239f123b7bfffabcdffae1c15993d81 Author: TanaseButcaru <cont...@butcaru.com> Date: 2016-01-16T11:17:53Z getVideo(), createMediaThumbnail, descriptions, full sample commit 11cef088e50858c4b8ce5c6d4a2b17051b26f47b Author: TanaseButcaru <cont...@butcaru.com> Date: 2016-01-16T11:53:57Z add description to MediaThumbnail options commit 8fa7aa19af38bf3f5071504672ee4babe5f9a9bd Author: Tanase Butcaru <tanasebutc...@users.noreply.github.com> Date: 2016-01-17T16:01:13Z Merge pull request #1 from apache/master Sync with apache/cordova-plugin-camera commit 2b5f25b933d31413609959e9a859f92a3c8fe244 Author: TanaseButcaru <cont...@butcaru.com> Date: 2016-02-04T21:00:40Z Merge branch 'master' of https://github.com/apache/cordova-plugin-camera ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@cordova.apache.org For additional commands, e-mail: dev-h...@cordova.apache.org