Control Quality of Video Recording for Cordova apps
Have a Cordova app - or any Cordova based hybrid app implementation like Meteor, Ionic, Phonegap etc. - and need to use video recording?
You might want to lower the quality of your video recording to handle use cases were the video does not just get stored locally but has to be transferred over the network?
The standard Cordova plugin forces you to rely on asking users to go into the settings of their device and limit the quality of video recordings from there.
That’s were a library like VideoCapturePlus might come in real handy. Built on the original cordova plugin it allows for control of the quality (low vs high) of your video recordings.
This means the recording will be made in either the lowest or default resolution of the used device on both Android and iOS.1
There was however one.little, problem… the library is not compatible with Android 6 style permissions. Meaning it does not ask you for just in time permissions. This means your app won’t build with this plugin if it uses Target SDK 23 (Android N or 6.0).
Therefore we have created a Fork of the original Plugin and updated it to use the ‘new’ just-in-time permission system.
For devices using earlier Android versions nothing changes - the plugin specifies the required permissions in the AndroidManifest to ask them upon installation.
Take a look at this GitHub repo to find the updated plugin.
We have tested on Devices with Android 4.4.2 (Huawei & Samsung S4 Mini), 4.4.3 (Sony Xperia), 5.1 (HTC One M8) and 6.0 (HTC One M9)
EDIT (Feb. 2017): We have also tested this feature on Android 6.0 (OnePlus 3T) and Android 7.0 (OnePlus 3T), iOS 9 and 10.2 (iPhone 5s & iPhone 7)
1 For iOS that means 720p video nowadays. For Android however that puts you up with MMS quality video.
This is a technical limitation with the default Android MediaStore API (present since the early Android days).