Youtube video

We try a few different ways of embedding Youtube videos, with varying degrees of success.

Youtube is one of the most common media types that the students embed into their blogs (although, as we get more embeddable things, this may change).

Here are a few tests.

Youtube link

I just wanted to include the link to the video I’m using, and the only way I could do it was to use a preformatted block! LOL.

https://www.youtube.com/watch?v=-17TliuArs8

Youtube URL embed (Youtube block)

This is actually really easy to use, because you don’t even have to select the Youtube embed block – or any block, for that matter. Just hit enter, to start a new block, and paste in the URL of the Youtube video. When you hit enter, WordPress will know that it is a Youtube URL and create a Youtube embed block out of it. Neat!

Note that some Youtube creators do not permit embedding on an external website – this is their choice, and not a problem with WordPress

I posted this as Super Admin. I can use the fullscreen option.
I added this as a blog admin.

Youtube embed code (using Custom HTML block)

This may or may not work for blog admins. Since this is inconsistent, I don’t recommend using this method for Youtube – especially when there is a better available option (above).

As a super admin, I can post the embed code and it will work – but blog admins, authors, etc. will have their code stripped by WordPress, for security purposes.

Here is the original embed code copied from Youtube:

<iframe width="560" height="315" src="https://www.youtube.com/embed/-17TliuArs8" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>

I first added it using a “Super Admin” account, and it worked fine (with fullscreen options)

Next, I tried using a “Blog Administrator” account. Not only was the code stripped for the new video (below) BUT it stripped the code of the above video. Both play, but the fullscreen option does not work.

This is what the stripped code looks like:

<iframe width="560" height="315" src="https://www.youtube.com/embed/-17TliuArs8" frameborder="0">

Leave a Reply

Your email address will not be published. Required fields are marked *