How to Embed ANY Remote Video using Drupal 9’s Media Manager

I love the media manager in Drupal 9 that is no secret, anyone who’s taken my training over the last year has been inundated with my praise of the media manager in Drupal 9 and the fact that you can build a digital asset management system with it. You can really do some amazing things with file replacement, even with embedded pdfs and more etc..

However, there’s been one thing missing and it’s in the area of remote video. How can I embed something besides YouTube and Vimeo videos?

I want to show you exactly how you can embed something other than YouTube and Vimeo, and it’s called oEmbed Providers. You can find it at www.drupal.org/project/oembed_providers.

Download and install it or install it via composer as you would any other module.

Step 1:

Once the module is installed,

1. Hover over Configuration

2. Hover over Configuration / Media

3. Click oEmbed Providers

You will see 3 tabs at the top of this page: General, Allowed Providers, and Custom Providers. The General tab shows every oEmbed provider that has been authorized to work with Drupal. The Allowed Providers tab has a list of all the providers that you can use.

Go ahead and enable RadioPublic, Vimeo, YouTube, and TED.

Technically, you do not need to select YouTube and Vimeo, because they are the defaults. (I’m not sure if that is going to change or not, so select them anyway).

If you want to add your own custom providers, you can do that in the Custom Providers tab by clicking on the blue +Add oEmbed provider button.

NOTE: You can uncheck the Enable external fetch of providers link located on the General tab and that will provide only the custom providers you want.

We have total customization, but for the purpose of this blog, I have kept the general settings, because I like the ease of that.

Step 2:

1. Hover over Structure

2. Hover over Media types

3. Click Remote video

4. Scroll down and select the allowed providers

Even though you’ve allowed them in the configuration of the module, you still need to edit your media type for remote video in order to allow the types just in case you have other remote video types that do not allow them.

5. Click the save button at the bottom

6. Click Structure->Content types->Article->Manage Fields.

7. Add a media field and select Remote Video.

8. Add a couple of nodes: 1) YouTube video, and 2) TED video. In the media field, click add Media and paste the url to either RadioPublic, TED, Vimeo, or YouTube. Click Save.

  1. Click insert selected
  2. Click save

The YouTube video has been embedded.

Be sure to watch the YouTube video for this blog:

Instructor

  • Rod holds two masters degrees and has been training people how to do "things" for over 25 years. Originally from Australia, he grew up in Canada and now resides just outside Cincinnati, Ohio. He has worked in both the non-profit and for-profit worlds, in small companies and large corporations. His extensive open source experience includes WordPress, Joomla and Drupal and he really knows how to help you get the most out of the system you chose. Rod plays ice hockey a couple of times a week and rides his Goldwing motorcycle pretty much everywhere he can.

0 0 votes
Blog Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x