You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/07/23 20:40:13 UTC

[GitHub] [cordova-plugin-media-capture] rbenzing opened a new issue #183: Camera Record quality always set to MMS over High Quality with CameraOptions quality: 1

rbenzing opened a new issue #183:
URL: https://github.com/apache/cordova-plugin-media-capture/issues/183


   # 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?
   `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);
               }
               if(Build.VERSION.SDK_INT > 3){
                   intent.putExtra("android.intent.extra.videoQuality", req.quality);
               }
               this.cordova.startActivityForResult((CordovaPlugin) this, intent, req.requestCode);
           }
       }`
   
   
   
   ### 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
   
   
   
   ## Checklist
   - [X] I searched for existing GitHub issues
   - [X] I updated all Cordova tooling to most recent version
   - [X] I included all the necessary information above
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org