Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By ryanblyth on
Through a little trial and error I recently discovered how to add a YouTube video to a Drupal 7 site using a combination of the Media and Media: YouTube modules. I could not find any documentation or posts that documented the configuration and steps necessary to get these two modules to work together, so I've created this post in hopes of saving others a little time.
After you've installed both modules:
- Go to configuration > media > files types > manage file displays and select YouTube Video and YouTube Preview Image.
- Click Save configuration.
- Add the Multimedia Asset field to a content type (make sure you select Video and youtube:// YouTube videos).
- Ensure the format is set to Media under Manage Display.
- Create a node.
- Click Select media and make sure you select the Web tab.
- Paste in your YouTube URL.
- Save the node and enjoy.
Comments
thanks for this! really need
thanks for this! really need it.
Wow Great timing!
I'm working on this tonight. Thank you for taking the time, I'll let you know how mine turns out.
Excellent. Thanks for posting
Thanks for posting these directions. Saved me a lot of time.
Excellent. Travist also gave
Excellent.
Travist also gave a presentation in Dallas last Fall about how to manage and present media (including YouTube videos) on a Drupal 7 site. I know it's posted at a couple of different places, but this one is a little more detailed :)
I recently found I had to
I recently found I had to enable the 'Full Content' view mode as well, otherwise the field was not rendered.
Able to render...
Hello hedley,
I was able to have the video show up in fields instead of 'full content' mode.
Is this still best practice?
Does anyone have any suggestions on the best way to do this since the Multimedia Asset field is being deprecated in Media 2.x? http://drupal.org/node/1436292#mediafieldOrFilefield
Subscribe
Subscribe
also subscribing
also subscribing
sub
sub - never realized there was no way to "follow" a post that's not in the issue queue! wonder why that is?
eureka!
Success. After some more digging in the Media issue queue, found this post, #25 was particularly helpful, but many links to videos here too.
Video Embed Field
@n8j1s, the reason it's deprected is because you either use MediaFront which allows for a video embed field, or use the filefield directly if it's a video stored on the site. That's what I think from my research up to now.
w3c validation
Does anyone have a solution that will pass the w3c validation test. None of the methods I've come across will validate with a youtube iFrame.
Any help would be great.
This is an excellent guide! I
This is an excellent guide!
I was curious... has anyone successfully used the Media module(s) to post a gallery of youtube and image thumbnails, all mixed up amongst each other, on a content item's page? Ideally, images or youtube videos would both open up in lightbox when the thumbnail is clicked.
Is that possible with the Media modules?
Thanks for posting this! This
Thanks for posting this! This really saved me a couple of hours :)