Gutenberg: Video Block doesn't work when inserting YouTube URL

Created on 18 May 2018  Â·  10Comments  Â·  Source: WordPress/gutenberg

Describe the bug
I wanted to insert a video on my page. The Video Block prompts me to "Enter URL of video here...", so I pasted in the YouTube URL for a vid. After saving the page and checking the front-end, the video didn't appear. I then went back to the editor and noticed the _Use URL_ button so I clicked that but the block just produced an error.

People are going to expect to be able to be able to insert YouTube vids into a block that is specifically called a Video Block.

To Reproduce
Steps to reproduce the behavior:

  1. Insert video block
  2. Enter YouTube URL where it says "Enter URL of video here..."
  3. Click save and view site (no video shows)
  4. Go back to Editor and click _Use URL_ button (view error)

Expected behavior
I should be able to paste YouTube/Vimeo URLS into a block that's called a Video Block

Screenshots
gutenberg_videoblock

_macOS Sierra 10.12.1 (16B2659)
Firefox Quantum 60.0 (64-bit)
WordPress 4.9.6
Gutenberg 2.8.0_

Needs Design Feedback [Feature] Block Conversion [Feature] Blocks [Feature] Media [Type] Enhancement

Most helpful comment

Hey peeps, how does this look? It switches to an embed block if you use a youtube URL with a video block.

video-to-embed

All 10 comments

People are going to expect to be able to be able to insert YouTube vids into a block that is specifically called a Video Block.

This seems like a reasonable assumption to me.

Related #5241

People are going to expect to be able to be able to insert YouTube vids into a block that is specifically called a Video Block.

+1 from me! It's literally the first thing I tried to do with it whilst testing in #8299.

+1 here too! Noting feedback from #5671 which I closed as a duplicate:

As a user, I shouldn't have to know that there are separate youtube, vimeo, and native video blocks. All I want to do is put a video in my post.

I am going to suggest a really simple flow that may not be so easy to implement but I think means we don't need to do any design changes.

2018-11-02 at 09 13

Where we have this above, could we just if someone copies in a YouTube URL, transform to the right block?

Where we have this above, could we just if someone copies in a YouTube URL, transform to the right block?

Yes!

The refactor in #10958 exposes some of the embed block's URL->block resolution code, so the video block would be able to use that to resolve the URL to an appropriate embed block.

Hey peeps, how does this look? It switches to an embed block if you use a youtube URL with a video block.

video-to-embed

Thank you both @maddisondesigns for bringing this up and @notnownikki for making the improvement. It's a nice and seemingly obvious UX addition.

Do we have a similar situation with audio blocks?

On Sun, 4 Nov 2018, 18:22 Matias Ventura <[email protected] wrote:

Thank you both @maddisondesigns https://github.com/maddisondesigns for
bringing this up and @notnownikki https://github.com/notnownikki for
making the improvement. It's a nice and seemingly obvious UX addition.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/WordPress/gutenberg/issues/6824#issuecomment-435693244,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ADKSsoK8BU-aJFQgxLdcvsysdMgTadP_ks5urzB5gaJpZM4UEkrV
.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

franz-josef-kaiser picture franz-josef-kaiser  Â·  3Comments

BE-Webdesign picture BE-Webdesign  Â·  3Comments

ellatrix picture ellatrix  Â·  3Comments

davidsword picture davidsword  Â·  3Comments

aduth picture aduth  Â·  3Comments