cordova-plugin-media-capture
cordova-plugin-media-capture copied to clipboard
(iOS) implement the 'quality' property in captureVideo()
Platforms affected
iOS
Motivation and Context
iOS 13 records video at 360p https://forum.ionicframework.com/t/media-capture-video-is-low-quality/103774/24
Description
@maxpaj made the changes @jcesarmobile asked for in #48 and #65, but I did not see a pull request so I updated the documentation and am submitting his fix.
Checklist
- [x] I've run the tests to see all new and existing tests pass https://github.com/apache/cordova-plugin-media-capture/pull/65#issuecomment-306416412
- [x] Commit is prefixed with
(platform)
if this change only applies to one platform (e.g.(android)
) - [x] I've updated the documentation if necessary
Forgot to push my local change to the repo to fix the build issue. Everything is working now.
Any plans to merge?
@jcesarmobile I have been using my fork in 2 production apps for months now with no issues. I think this is good to go! Thoughts?
@timbru31 so now that jcesarmobile removed their request for review is there anything I can do to help get this merged?
+1 needed it too
Hello! Something can be done to be able to launch this PR into production. I think it would be a great improvement to be able to make high quality videos.
Previously, no videoQuality
was set for pickerController and so it resolved to medium (see doc).
Following this plugin default value of 1
for quality is fine but seems to be a breaking change for iOS.
Based on the decisions from #48 and #65, with work of @maxpaj, @jcesarmobile and others we still go for the values 0
, 0.5
and 1
.
I suggest:
- to remove
quality
from CaptureVideoOptions.js: this object is only used for windows and in tests, and never expectingquality
- to make this plugin follow each platform default quality for its own default config/fallback code
- update README with distinct Android and iOS Quirks about
quality
param as it is not available for other platforms, and making it clear that the default value is different between Android and iOS following each native platform defaults - value of
1
/High is Android default Seems OK right now: we init and optInt with1
, and then the fallback behavior is resolved by Android itself since we directly pass whatever value the user defined (see ref). - value of
0.5
/Medium is iOS default Requires changes on this PR: like
for explicitcase 0: Low; case 10: High; case 5: default: Medium;
0.5
and fallback to resolve both to Medium + more fallback correctness question in my review added below
- update README with distinct Android and iOS Quirks about
May be closed as resolved by #214.
I have confirmed that #214 implemented the quality param for iOS and resolved this PR. Closing out this PR as no longer needed. Thank you for the submission.