-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[image_picker] Added maxDuration property to pickVideo method #2048
Conversation
This way, we can limit the length of recorded video to a certain number of seconds.
|
image_picker有压缩图片的api吗 |
cyanglaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR. Looks good overall, left some comments.
|
Finally, this is awesome :) When will be this feature available? I need this ASAP. Thanks |
cyanglaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took another round of review, left some more comments.
...s/image_picker/android/src/main/java/io/flutter/plugins/imagepicker/ImagePickerDelegate.java
Outdated
Show resolved
Hide resolved
packages/image_picker/example/ios/Runner.xcodeproj/project.pbxproj
Outdated
Show resolved
Hide resolved
packages/image_picker/example/ios/Runner.xcodeproj/project.pbxproj
Outdated
Show resolved
Hide resolved
|
Hey, what's happening with this PR? Nothing? 15 days.... |
|
Any news on this? Please help me |
|
@derTuca It is been a while since I reviewed this PR. Do you still want to continue to work on this? |
|
@derTuca Do you think you still want to work on this? If anyone is interested to open another PR to work on this, I am happy to review it. |
|
Can you fix the problems in the conflicting files @cyanglaz? and then just simple attach to the code base? It is a must to have feature, and I need this before last month :) |
|
Sorry for the huge delays, I am caught up with some stuff at this time. I have adopted the proposed changes, @cyanglaz if you could review it again it would be great. |
cyanglaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks a lot for the good work! Please rebase master and fix any CI issues, I will merge this once the CI is green!
|
Hi @derTuca could you kindly rebase to latest master and have another look at the CHANGELOG.md changes? The formatting for many entries is still a bit off. |
|
@derTuca Please also add a jUnit test to test the max duration property in Android. |
…s into image_picker_max_duration
|
@derTuca There are some existing junit test cases in this plugin. You can take a look and see how they are constructed. |
|
Hello all, any way to add this PR to the source code now? Last time I wrote was 2019 nov 14. This is very slooooooooooooooow. |
…_max_duration # Conflicts: # packages/image_picker/CHANGELOG.md # packages/image_picker/pubspec.yaml
|
@cyanglaz Done, thanks for the info! |
cyanglaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for adding the java tests. We can also add iOS unit testing. There should be some unit test cases in this plugin as well.
Do you have any tips on how I can start on this? I have seen the other tests, but there are none testing passing a parameter to the controller per se (as far as I can tell), and I don't really know what to test here. |
|
@derTuca I would:
|
|
For the life of everything, I swear that (with all the free time everybody suddenly has) I've looked into this, but I can't figure out how to check the duration in the controller. I can do the Android approach, where we just check if it returns the file path with the argument passed, but with the controller being private and all (so I can't mock it), I don't know how to check its maxDuration. @cyanglaz am I missing the magic sauce? Or is it just straight up not possible to check it without modifying the plugin code? |
|
@derTuca In my opinion, It is totally legit to modify the code in order to make them testable. Feel free to do so. Let me know if you still face troubles. :) |
|
@derTuca Just checking in how you are doing :) Are you able to continue working on this PR? |
|
@derTuca, curious about your progress here too. This is something I'm looking into as well too. If there's something I can help with here, I can try to do so as well too. |
|
@derTuca It seems the pull request went to a wrong branch. Could you create another PR to the correct branch to fix that? |
|
Done. #2643. |
Description
Adds a
maxDurationproperty so a maximum recording duration can be set.Related Issues
flutter/flutter#40035
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze) does not report any problems on my PR.Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?