WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.21k forks source link

Youtube video embed block doesn't seem to work #7394

Closed designarti closed 6 years ago

designarti commented 6 years ago

Adding youtube URL in the videoblock. Shows the following code:

<figure class="wp-block-video aligncenter"><video controls="" src="https://youtu.be/OJfOsoUYPts"></video>
    <figcaption>iPhone X – does it still worth 1k?</figcaption>
</figure>

After insertion, both backend and frontend looks like this:

screen shot 2018-06-20 at 10 43 52

And obviously doesn't work. Doesn't load.

Tried to insert both versions of the embeddable URL, youtube.com one and youtu.be one. Same output.

Using underscores theme from Automattic, with no code modifications. It is Gutenber 3.0.1. Running on MAMP Pro, on a Mac, regular setup, nothing wrong with the DE.

tofumatt commented 6 years ago

I just tried this locally and it worked:

2018-06-20 11 01 07

Are you using the YouTube block or the Video block? If you insert a YouTube URL into the Video block it won't work, but the YouTube one will.

designarti commented 6 years ago

I was using the video block. Didn't know it won't work. My issue had "block" in title. You are closing it because it is a known issue, not because for you another widget works, am I right? What you've tried locally doesn't apply to the issue presented.

giphy

tofumatt commented 6 years ago

I guess a cool enhancement to the video block would be detecting certain common urls and changing the block to YouTube, Vimeo, etc if detected. Could you file a feature request issue for that? :-)

On 20 Jun 2018, at 11:37, designarti notifications@github.com wrote:

I was using the video block. Didn't know it won't work.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub, or mute the thread.

tofumatt commented 6 years ago

Nevermind, looks like this is an existing issue already: #6824.

a4jp-com commented 5 years ago

I have a similar problem but when I try and upload an MP4 files to my server. The other thing that is annoying is when the URL goes missing when I click the edit button.