Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdded video block creation by dropping #8122
Merged
Conversation
Dropping a video file on an insertion point now creates a Video Block instead of a File Block. This was done by adding the corresponding transform for the Video Block It supports immediate preview until upload.
|
Great idea! |
core-blocks/video/edit.js
Outdated
| onFileChange: ( [ { url } ] ) => { | ||
| setAttributes( { src: url } ); | ||
| }, | ||
| allowedType: 'video', |
This comment has been minimized.
This comment has been minimized.
noisysocks
Jul 23, 2018
Member
We'll need to handle any errors that happen during the upload here using onError. See #8066 for an example that fixes the File block.
|
Works well! Thanks @caxco93. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
caxco93 commentedJul 23, 2018
•
edited
Addresses #8021
Description
Dropping a video file on an insertion point now creates a Video Block
instead of a File Block.
This was done by adding the corresponding transform for the Video Block
It supports immediate preview until upload.
How has this been tested?
Included tests and manually
Screenshots
Before:

After:

Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist: