I have created a content type. I want to add a cck field to the content type where I can paste the youtube video embed code.

So that when I display the value of that field, a youtube video should display where I should be able to click on the play button and the video should play then.

Any module or any other idea for this problem?


Use Drupal's Embedded Media Field. Here is a quote about it (from the module's project page):

This extensible module will create fields for content types that can be used to display video, image, and audio files from various third party providers. When entering the content, the user will simply paste the URL or embed code from the third party, and the module will automatically determine which content provider is being used. When displaying the content, the proper embedding format will be used.

The module is only an engine, and requires a supported module to function. These include 'Embedded Image Field', 'Embedded Video Field' and 'Embedded Audio Field'. These modules are included in the contrib folder of the module, so they can be easily activated from the module administration page.

| improve this answer | |
  • I install this module but it is not working. – Ahmad Jul 4 '12 at 4:47
  • @Ahmad What problem are you having? – frazras Jul 4 '12 at 4:55
  • I have installed the module. and then add a cck field of type file and select the widget "embedded media field". then I add a content of that content type and place the youtube video embed code which is the iframe code. It gives me this error "Found no valid media with that url." – Ahmad Jul 4 '12 at 4:59
  • you should only add the video URL eg youtube.com/watch?v=1BUZMlogs9s – frazras Jul 4 '12 at 5:04
  • I also tried this. but I get the same error. – Ahmad Jul 4 '12 at 5:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.