Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera Record quality always set to MMS over High Quality with CameraOptions quality: 1 #183

Open
3 tasks done
rbenzing opened this issue Jul 23, 2020 · 0 comments
Open
3 tasks done

Comments

@rbenzing
Copy link

rbenzing commented Jul 23, 2020

Bug Report

Problem

This is happening on Android 7 phone when we record a video the quality defaults to MMS quality even with the option set for Quality: 1

Information

I looked into the Android Capture.java and noticed the Build Version is looking for > 7 but the Exta Quality setting in Android docs says it should be available for 3+
private void captureVideo(Request req) { if(cameraPermissionInManifest && !PermissionHelper.hasPermission(this, Manifest.permission.CAMERA)) { PermissionHelper.requestPermission(this, req.requestCode, Manifest.permission.CAMERA); } else { Intent intent = new Intent(android.provider.MediaStore.ACTION_VIDEO_CAPTURE); **if(Build.VERSION.SDK_INT > 7){** intent.putExtra("android.intent.extra.durationLimit", req.duration); intent.putExtra("android.intent.extra.videoQuality", req.quality); } this.cordova.startActivityForResult((CordovaPlugin) this, intent, req.requestCode); } }

Command or Code

Should the code look like this instead?
if(Build.VERSION.SDK_INT > 7){ intent.putExtra("android.intent.extra.durationLimit", req.duration); } if(Build.VERSION.SDK_INT > 3){ intent.putExtra("android.intent.extra.videoQuality", req.quality); }

Environment, Platform, Device

Ionic:

Ionic CLI : 6.10.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.2.3
@angular-devkit/build-angular : 0.803.28
@angular-devkit/schematics : 8.3.28
@angular/cli : 8.3.28
@ionic/angular-toolkit : 2.3.0

Capacitor:

Capacitor CLI : 2.3.0
@capacitor/core : 2.3.0

Utility:

cordova-res : not installed
native-run (update available: 1.0.0) : 0.3.0

System:

NodeJS : v12.18.0 (/usr/local/bin/node)
npm : 6.14.7
OS : macOS Catalina

Version information

Android 7, Android 7.1

**Update:
Also noticed it on Android 10 but that does provide the ability to swap from MMS to Full vision which provides the 720p resolution

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant