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

fix(ios): video quality

Open silvanadrian opened this issue 4 years ago • 2 comments

Platforms affected

ios

Motivation and Context

I use the cordova-camera-plugin to upload videos to youtube at which time I realized that literally every upload ends up on being sd only even though most smartphones these days are able to record much higher resolution videos. Before the change: Screenshot 2021-08-31 at 22 32 02

After the change: Screenshot 2021-08-31 at 22 21 53

(compression gets skipped, just shows up very shortly)

Closes https://github.com/apache/cordova-plugin-camera/issues/732

Description

At the moment it's more of a quickfix than a proper solution, I guess I can even improve it further by adding a video quality option to the CameraOptions then everyone can choose themselfs if they would want to be able to get higher resolution videos.

Does anyone have an opinion on that?

For reference: https://stackoverflow.com/questions/20190485/how-to-avoid-compression-after-selecting-video-from-uiimagepickercontroller-in-i

Testing

As described tested it by uploading the same video 2 times to youtube from a iPhone to make sure that a higher resolution video got uploaded which was the case.

Checklist

  • [ ] I've run the tests to see all new and existing tests pass
  • [ ] I added automated test coverage as appropriate for this change
  • [x] Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • [ ] I've updated the documentation if necessary

silvanadrian avatar Aug 31 '21 20:08 silvanadrian

Thanks to this fork, I was able to choose videos from iOS devices correctly, with the original plugin the app would close almost immediately. This pull request should be merged as soon as possible.

To future readers, you can install this useful fork executing 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

This fix works only for selecting existing videos from the photo library, not for taking new videos.

Siedlerchr avatar Jan 14 '22 13:01 Siedlerchr