Warning message

The service having id "digg_smart_button" is missing, reactivate its module or save again the list of services.

Uploading, Embedding and Playing Videos in Drupal

Embed Video Today, and while I was working on a Drupal site for one of my clients, I have gone through the problem of uploading and displaying local and remote videos on the same view. After asking a question on Drupal forums, I was able to understand what exactly needs to be done. I hereby share my experience in this topic with you.

The Required Modules:

Steps:

First create the content type that you want to add the video field to. Create a new field with the type file and choose the widget as Media File Selector

In the widget settings configuration window enable both the upload and Web browser plugins. Fill the extensions of the allowed file types, set the allowed remote types to video and enable both the youtube:// and public:// URI schemes.

You can now uploaded or embed a video.

Now to configure the way the files are displayed, go to Configuration > Media > File Types and click on manage file display for the videos. Enable the MediaElement and YouTube displays and give YouTube Video a higher preference (less weight) in the display preference order. This is important; otherwise from my little experience YouTube files won’t be displayed properly.

Finally you need to add the video content field  to your view. The media file field is very well integrated with views and offers a bunch of options. Selecting “Rendered file” as the formatter for the field will display both the embedded and uploaded videos.

This is the final outcome; my view page showing both uploaded and embedded videos.