-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[Gutenberg]Video insert & upload #9644
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
Conversation
Updated gutenberg-mobile submodule dependency to point to add-video-block branch
Invoke proper functions per media type
Generated by 🚫 dangerJS |
| compileOptions { | ||
| sourceCompatibility JavaVersion.VERSION_1_8 | ||
| targetCompatibility JavaVersion.VERSION_1_8 | ||
| } |
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.
wondering, given this is a React Native requisite, is there a way we can move this gradle block to the RN bridge instead of adding this to the WordPress app? Not sure if it's possible though, but sounds like it belongs there rather than here
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.
Hey @mzorz, thank for the comment.
I tried to put this into the module, but it didn't pass. Let me take one more chance with it, maybe something can be done. I also don't like this, so let try to move it :)
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.
Let me take one more chance with it, maybe something can be done. I also don't like this, so let try to move it :)
👋 @marecar3 , curious what was the result of the extra effort on this one. I'm assuming that since this PR got merged with this change in, the effort didn't lead to something usable but still, can you share your findings if any? Thanks!
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, @hypest for returning on this one. I tried to move those into react-native-gutenberg-bridge but without luck. Also, I have done some googling and tried some of my own ideas but not sure how this can be resolved. If you have some ideas, please share with me and I am willing to try them :)
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.
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.
Maybe this needs to be moved to react-native-video rather than the bridge itself? I agree its not ideal to have this here, but if there's no alternative then we can live with it.
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.
Hey @jtreanor, react-native-video already has set those options https://github.com/wordpress-mobile/react-native-video/blob/enable-android-build-of-standalone-package/android-exoplayer/build.gradle
but for some reason, the main project (WPAndroid) isn't using them in a process of the build.
Not sure how we can force Main project to use those options @hypest @jtreanor
# Conflicts: # libs/gutenberg-mobile
I've checked this on iOS, it works ok, the upload stops if we tap on the ongoing upload and select REMOVE from the dialog
This happens on iOS too, but it is not directly related with video block, happens also on image block and I think should be investigated under a new issue. |
It might be because there aren't multiple tracks on the player and there's nothing to play next ? |
# Conflicts: # libs/gutenberg-mobile
|
Your latest commits @marecar3 fixed the issues reported during my 1st pass over this PR. There are still problems in regards notifications, and media uploads, but I can reproduce them on I think we can merge this Video PR, and reiterate on it later if needed, when the |
|
Thanks @daniloercoli! |
|
Hey @daniloercoli, I have fixed also the problem with uploading multiple videos from WordPress Library. Now when you select more than one, it will be shown in the Post. |
|
Hey @daniloercoli , @pinarol I have found some strange bug on Android.
Result: Last video frame on video block is lost, so it seems that video block is empty, but it isn't as if you click on it, you will see video controls and if you click on the play button, the video will show up. |
|
hey @marecar3 you are turning the device off/on right? I wonder if this is happening when you set controls=false. maybe with controls=true it is starting to fill the video buffer right away and that buffer is reset after device on/off. I am asking because setting controls=false might be something we want in the future to get more close to the designs, we are limited by the fact that Another option would be checking to see if But in any ways, this didn't seem like a big problem to me, I mean they can see the controls with a tap and someone would usually tap to see if there's any response. I suggest we open a new issue for this and inspect later, wdyt? |
|
Hey @pinarol, yeah we can open another ticket for that one. Update: I have opened a new ticket : wordpress-mobile/gutenberg-mobile#974 |
|
Summary of reported issues from @daniloercoli
Fixed.
I think that @pinarol have a point, it's disabled because there isn't the next track for playing.
Fixed.
Fixed. Opened issues :
Hey @daniloercoli is there anything else that we should address from this PR as an issue? |
daniloercoli
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 @marecar3, it works fine now.
LGTM!
|
Thanks @daniloercoli ! :) |

Fixes wordpress-mobile/gutenberg-mobile#855
There are also some more TODO items in this issue: wordpress-mobile/gutenberg-mobile#687 (comment) which are not handled in this PR
gutenberg PR: WordPress/gutenberg#14912
gutenberg-mobile PR: wordpress-mobile/gutenberg-mobile#854
To test:
Prerequisites:
Run
yarn clean:installRun
yarn start -- --reset-cacheTest 1
First of all try all the media upload test cases described here: wordpress-mobile/gutenberg-mobile#855 (Except, in order to fail the upload try turning off the internet and waiting a bit)
Test 2
Try uploading by video capture by selecting

Take a Videoin a real device:Test 3 Media filters
Media is filtered due to the block type with this PR

So you should be able to pick/capture only videos for video block, and only images for image block
Check both blocks and verify that this is true for all the options here:
Test 4 Add caption
Add a video caption text and save the post
Reopen the same post and verify the caption is added
Test 5 Simultaneous uploads
Try adding multiple video and image blocks
And try simultaneous uploads
Verify that there's no confusion and every upload is completed successfully to their intended block
Test 6 Switch to Classic editor
Add a video block and add video in it
Switch to Classic editor
Verify that video is there and it is playable
Update release notes:
RELEASE-NOTES.txt.We aren't shipping the video block to production yet