Is the D7 version capable of displaying YouTube videos yet?

I have tried using a media field with a YouTube wrapper, a text field with a simple YouTube-link and setting up the vfl player (jwplayer) in the lightbox2 settings page.

Following the documentation as it is, it should be a matter of simply adding rel="lightvideo" to a YouTube link. But that can't be right.

Has anyone successfully used lightbox2 to display a YouTube video?

Comments

Anonymous’s picture

Changing rel="lightvideo" to rel="lightframe" actually shows the lightframe. The content is however completely empty.

This is the HTML source:

<iframe width="600" scrolling="auto" height="400" src="http://www.youtube.com/watch?v=GHWDKc49eJU" style="z-index: 10500;" id="lightboxFrame"></iframe>

Anonymous’s picture

I couldn't get this to work and decided to use shadowbox.module instead, which was very easy to setup.

I'll leave this open because I'm still curious but it's not urgent anymore.

kyawzayl’s picture

Hi Guys,

I was also having this problem but found the workaround for this. Basically we can't use the new embed code form YouTube but to use the old embed code. The below is the working sample.

Watch Video

We gotta use the old embed code from YouTube and grab that url in href then it works just fine.
Hope it helps someone out there.

poman31’s picture

I have this working for Youtube embed videos.

First use a normal href tag (link). Point the link to the youtube video. Second make sure to edit the HTML and add rel=lightframe to the tag after the href tag.

So the raw html should look like

also you can add ?autoplay=1 to the end of the url to auto play. ie "http://www.youtube.com/embed/C4q9vkSD8VE?autoplay=1
You don't even have to enable or setup a FLV player.

Make sure to not include all the iframe code just the link.