-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Media & Text block - can't take a photo or video #1571
Comments
I can reproduce the issue on WPiOS as well. |
I've reproduced this on Pixel 3a - Android 10 - real device, on: WordPress-Android: Also in It seems that the language "Take a Photo or Video" was introduced in this PR: WordPress/gutenberg#17145, but I couldn't find an underlying implementation which allows for capture of both image or video within a single intent. If such an intent exists, we can launch it for We have I'm not aware of any One solution may be to use the existing photo capture intent and change the language to reflect that. Something like this might work: diff --git a/react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java b/react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java
index 1965d5f..6238c7f 100644
--- a/react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java
+++ b/react-native-gutenberg-bridge/android/src/main/java/org/wordpress/mobile/WPAndroidGlue/WPAndroidGlueCode.java
@@ -182,7 +182,7 @@ public class WPAndroidGlueCode {
public void requestMediaPickerFromDeviceCamera(MediaUploadCallback mediaUploadCallback, MediaType mediaType) {
mMediaPickedByUserOnBlock = true;
mPendingMediaUploadCallback = mediaUploadCallback;
- if (mediaType == MediaType.IMAGE) {
+ if (mediaType == MediaType.IMAGE || mediaType == MediaType.MEDIA) {
mOnMediaLibraryButtonListener.onCapturePhotoButtonClicked();
} else if (mediaType == MediaType.VIDEO) {
mOnMediaLibraryButtonListener.onCaptureVideoButtonClicked(); Another solution could be to prepare an |
I suggest doing this in 2 iterations:
I think this is better than having a button doing nothing and it will give us time to address the whole thing.
|
We could also try having separate options in the bottom sheet: "Take photo" and "Take video" which we should already have the native sides ready since those are the individual actions of the Image block and the Video block. |
That's even better, and it can be a long term solution! Thanks @hypest ! |
Closing since the option has been replaced by two separate ones with #1579. |
Describe the bug
I can't add a photo or video using Media & Text block.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The app opens a camera app I guess?
Screenshots
Smartphone (please complete the following information):
The text was updated successfully, but these errors were encountered: