newsof1111 / cordova-plugin-video-picture-preview-picker-V2

MIT License
19 stars 10 forks source link

Select video only? #1

Open victoria168 opened 6 years ago

victoria168 commented 6 years ago

Hi, is there is way that I can select video only? Thanks.

newsof1111 commented 6 years ago

Hi victoria . i created a new project with only videos selection . can you try it and pls give me your feedback ;) https://github.com/newsof1111/cordova-plugin-video-preview-picker-V2

victoria168 commented 6 years ago

Thanks @newsof1111 , the video preview picker works perfectly. Will you consider adding a parameter into the original video-image-preview-picker for users to select whether to pick video, picture, or both?

newsof1111 commented 6 years ago

@victoria168 Great !!! that's will be included in my next update :)

victoria168 commented 6 years ago

Hi @newsof1111 , I just started a new project and found that this plugin conflicts with cordova_plugin_camera.

This is the error: ` BUILD FAILED

Total time: 4.13 secs [16:34:51] lint finished in 7.59 s Error: /Users/Victoria/ionic2/Trip/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':mergeDebugResources'.

[string-fr/multi_app_name] /Users/Victoria/ionic2/Trip/platforms/android/res/values-fr/multiimagechooser_strings_fr.xml [string-fr/multi_app_name] /Users/Victoria/ionic2/Trip/platforms/android/res/values-fr/videoPicturePreview_String.xml: Error: Duplicate resources [string/discard] /Users/Victoria/ionic2/Trip/platforms/android/res/values/multiimagechooser_strings_en.xml [string/discard] /Users/Victoria/ionic2/Trip/platforms/android/res/values/videoPicturePreview_String.xml: Error: Duplicate resources [string/multi_app_name] /Users/Victoria/ionic2/Trip/platforms/android/res/values/multiimagechooser_strings_en.xml [string/multi_app_name] /Users/Victoria/ionic2/Trip/platforms/android/res/values/videoPicturePreview_String.xml: Error: Duplicate resources [string/done] /Users/Victoria/ionic2/Trip/platforms/android/res/values/multiimagechooser_strings_en.xml [string/done] /Users/Victoria/ionic2/Trip/platforms/android/res/values/videoPicturePreview_String.xml: Error: Duplicate resources

[ERROR] An error occurred while running cordova build android (exit code 1).

` Once I remove any one of these two plugins, build can work. Do you have any idea where the problem is? Thanks.

victoria168 commented 6 years ago

Update: the new error was

`* What went wrong: Execution failed for task ':transformClassesWithDexForDebug'.

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;`

newsof1111 commented 6 years ago

@victoria168 made a quick change in the only video plugin . for the "Execution failed for task ':transformClassesWithDexForDebug'." that's means that the both plugins are importing the same lib called ''android-support-v4.jar" so i commented this line in plugin.xml file FROM " " TO " " i already did that for the videos plugin try it and give me your feedback plz

victoria168 commented 6 years ago

Thanks @newsof1111 for your prompt reply. It worked.

I can't install the video only version and don't know why. So I downloaded the original version and manually commented the line of importing 'android-support-v4' in plugin.xml. The error of 'Multiple dex files define xxxx' disappeared.

BTW, the error of 'Execution failed for task ':mergeDebugResources'' was because the confliction between ionic native image picker and your picker. So I uninstalled the native one and the error disappeared.

newsof1111 commented 6 years ago

Hi @victoria168
i will update the origin plugin to make more options 👍 1) choose from pictures / videos or both 2)enable/disable timestamp from videos 3) enable / disable preview and finally remove any sources of conflit . for the android-support-v4 , i will try to find a solution for it to detect if this lib existing in your project or not ( but i'm not sure if it will works )

i will start working on it at tonight ;)

newsof1111 commented 6 years ago

Hi @victoria168
First of all , I want to apologize for this big delay . I was very busy in this last period . So a new version is ready to use . you can test it and I'm happy to hear your feedback

HAPPY NEW YEAR :)

victoria168 commented 6 years ago

Hi @newsof1111 Sorry for the delay. I haven't had time to test yet but I see your updated instructions. Thanks in advance. I'll test and feedback later. btw do you have IOS version for this plugin?

lalit-mohan-negi commented 6 years ago

Hi do you get IOS version for this plugin?