coomar2841 / android-multipicker-library

Android Multipicker Library
Apache License 2.0
438 stars 107 forks source link

Duration of the video #143

Open robsonlira opened 6 years ago

robsonlira commented 6 years ago

Hello! I'm having a problem capturing video with the camera I gave the duration of 15 minutes and I can only record only 21 seconds MediaStore.EXTRA_DURATION_LIMIT, 900 my device is an XPeria Android 4.4

Would I have to configure something else?

`

private void takeVideo() {
    cameraPicker = new CameraVideoPicker(this);
    cameraPicker.shouldGenerateMetadata(true);
    //cameraPicker.setCacheLocation(CacheLocation.INTERNAL_APP_DIR);
    cameraPicker.setCacheLocation(CacheLocation.EXTERNAL_STORAGE_APP_DIR);
    cameraPicker.shouldGeneratePreviewImages(true);
    Bundle extras = new Bundle();
    // For capturing Low quality videos; Default is 1: HIGH
    extras.putInt(MediaStore.EXTRA_VIDEO_QUALITY, 0);
    // Set the duration of the video
    extras.putInt(MediaStore.EXTRA_DURATION_LIMIT, 900);
    cameraPicker.setExtras(extras);
    cameraPicker.setVideoPickerCallback(this);
    pickerPath = cameraPicker.pickVideo();

}

` I'm sure it's not lib's problem anymore how to fix it? Thanks for your comments Agradeço

jatin-lakhani commented 5 years ago

Also, EXTRA_DURATION_LIMIT is not working for me on device One Plus 3T with OS version 8.0 It working with other devices up to OS 7.0. Any solution for this issue?