[Drupal] How to add youtube capability to a content type?

| | 1 min read

We need to develop websites which are capable of handling YouTube video.This feature can be implemented using media YouTube module. Read on to know to add YouTube capability to a content type in a Drupal website.

Follow the steps below to add youtube capability to a content type.

  • Enable media_youtube module in your site.
  • Add a new "file" type field to your content type/entity.
  • Select The widget-type as Media file selector.
  • Edit the field type for handling videos.
    • In Allowed remote media types check 'Video ' option .
    • In Allowed URI schemes check 'youtube:// (YouTube videos)' option.
    • You can select the number of videos to be loaded in a particular content from 'Number of values' select list.

YouTube video formatter options can be set up in Structure ->File types -> Manage file display.

  • You can choose the size,apperance,preview image style etc.

While adding content paste YouTube video url into the Web tab.

You can choose multiple URI schemes for a particular field.