cordova-plugin-camera icon indicating copy to clipboard operation
cordova-plugin-camera copied to clipboard

Not able to choose video for Photo Library in iOS

Open abhishek0196 opened this issue 3 years ago • 5 comments

Bug Report

Problem

In Version 5.0.2, I was not able to select video from the photo library.

What is expected to happen?

The video should be selected, and the getPicture method should return the path to the selected video.

What does actually happen?

The app crashes on selecting the video.

Command or Code

Git hub link to the sample code, this includes the platforms folder. link

Environment, Platform, Device

Version information

Ionic:

Ionic CLI : 6.10.2 (/usr/local/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 5.6.11 @angular-devkit/build-angular : 12.0.5 @angular-devkit/schematics : 12.0.5 @angular/cli : 12.0.5 @ionic/angular-toolkit : 4.0.0

Cordova:

Cordova CLI : 10.0.0 Cordova Platforms : ios 6.2.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 5 other plugins)

Utility:

cordova-res (update available: 0.15.3) : 0.15.1 native-run (update available: 1.4.0) : 1.0.0

System:

Android SDK Tools : 26.1.1 (/Users/appdeveloper/Library/Android/sdk) ios-deploy : 1.9.4 ios-sim : 8.0.2 NodeJS : v12.16.3 (/usr/local/bin/node) npm : 6.14.4 OS : macOS Catalina Xcode : Xcode 12.4 Build version 12D4e

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

abhishek0196 avatar Jul 21 '21 18:07 abhishek0196

Hey, I had this issue when my phone was connected to xcode while running the app on a physical device, but it did always work on the simulator. I got it working on the physical device when I unplugged the cable and restart the app on my phone. I dont know what causes the issue though. Hope this helps I got everything working now with video uploading on IOS, so if you need some more help contact me.

beckoninghook avatar Jul 28 '21 14:07 beckoninghook

First of all thanks for replying could you please clone the code and check in there ?

abhishek0196 avatar Aug 03 '21 04:08 abhishek0196

Same problem

al-matari avatar Aug 26 '21 14:08 al-matari

I'm having a similar issue, except my app doesn't crash, it just returns null from the getPicture(options) promise. There is no error either.

joshtate avatar Oct 15 '21 21:10 joshtate

The same thing happened to me. I used this fork and now it works correctly: https://github.com/apache/cordova-plugin-camera/pull/760

To use it while the pull request is not merged, use this command:

cordova plugin rm cordova-plugin-camera; cordova plugin add https://github.com/silvanadrian/cordova-plugin-camera.git#fix/video-quality-ios

davidcopano avatar Oct 25 '21 08:10 davidcopano