Video block

This is a demonstration of the “video” block in WordPress. It serves a number of purposes, including displaying video uploaded to the blog itself (which we don’t recommend for blog.ryerson.ca) and embedding video hosted on an external site (like Youtube).

The video block

This is what the “Video” block looks like as of 2020, WP 5.5

This block offers the following main options:

  • Upload a video to the media library (not recommended for blog.ryerson.ca)
  • Media Library – Embed a video already uploaded to the media library (not recommended for blog.ryerson.ca)
  • Insert from URL – Embed a video using the URL of a compatible video streaming service (Youtube and Vimeo will both work here)

Note that there is no option here to paste in embed code. WordPress doesn’t always work well with embed code, for security reasons. It may strip out portions of the code, rendering it unusable or only partially functional. If a URL-based embed won’t work, you may try to paste the embed code into a Custom HTML block… but be aware that it may not work as expected.

Insert from URL – Youtube example

The URL of this Youtube video was pasted into the Video block. WP recognized that it was a Youtube URL and effectively converted this to a Youtube block.

Upload / Media Library ~ why these are not recommended for blog.ryerson.ca

Our blog.ryerson.ca network has a limited amount of space, spread across many blogs. As such, we limit each blog to a certain amount of space. Video files can take up quite a lot of space – and most are larger than the 2MB per file limit.

Instead, we recommend uploading videos to external video streaming and hosting services, then embedding them in your blog post/page.

Other pages on this site demonstrate ways to embed video content from Google Drive (which is a Ryerson-supported solution), Youtube and other sources.

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">