Hello, is there anyway to use colorbox to display youtube videos from a user defined link?

For example: I have a field called trailer (Multimedia asset field with Media file Selector widget) I have the youtube module as well so it allows me to provide youtube links...so far so good.

I want to create a Title Link and display that link on the node and when user clicks on the link it opens up the video in colorbox.

Comments

hutch’s picture

What you want to put into your page is a link something like this:

<a class="colorbox-load" href="http://www.youtube.com/embed/put-your-youtube-number-here?rel=0&width=480&height=390&iframe=true">Watch Video</a>

Adjust the youtube number and height and width to suit your needs.
What tools you use and how you achieve it is up to you.

Desi Raaj’s picture

thank so much i'll give that a try, i was thinking the same thing using wysiwyg as it works well with media module. thank you again.

Desi Raaj’s picture

It worked very well, thank you :)...just had to eliminate "?" before "rel"

minneapolisdan’s picture

Trying to do this in Views, how do I get the YouTube number? I can see it when viewing my YouTube files in the Media/File Browser, but how do I reference that number from within Views? It doesn't seem to be available?

(this isn't so much a Colorbox question, so I should probably ask this elsewhere, now that I think about it)

bryancasler’s picture

Checkout my recent post regarding embedding youtube videos. Feedback welcome.
#1368274: Solved: How to embed Youtube videos

lsolesen’s picture

Status: Active » Closed (fixed)