display youtube video with shadowbox

6 messages Options
Embed this post
Permalink
wesley

display youtube video with shadowbox

Reply Threaded More More options
Print post
Permalink
can shadowbox display youtube videos?
Juss

Re: display youtube video with shadowbox

Reply Threaded More More options
Print post
Permalink
Yes of course, but this guy is not mentioning how to do that.

You don't have to worry about any swf player, because you can just use the iframe option

Here is an example:

Youtube Link


When I click on my YouTube links I see the full YouTube web site and not just my video. What is wrong?

You have probably used the wrong form of the YouTube URL. If you used something like http://www.youtube.com/watch?v=3D3kFn_3xRY that will disaply the YouTube website and not just the video. To just get the video use a link that looks like http://www.youtube.com/v/3D3kFn_3xRY.
Juss

Re: display youtube video with shadowbox

Reply Threaded More More options
Print post
Permalink
Example again:

a href="http://www.youtube.com/v/qLcTIpB3XDo" rel="shadowbox;width=405;height=340"

Mike

Re: display youtube video with shadowbox

Reply Threaded More More options
Print post
Permalink
Linking youtube videos like this doesn't seem to work for me for some reason on either Firefox, IE, or Chrome. Opens and displays photos just fine, but not youtube links. tried with Prototype and mootools...

When it comes to the youtube videos, though, all that happens is a darkened screen...

Do I have to set up options specifically to display youtube videos before I initialize Shadowbox? Sounded like shadowbox was supposed to automatically detect the appropriate player to use, etc... what gives?

Juan

Re: display youtube video with shadowbox

Reply Threaded More More options
Print post
Permalink
In reply to this post by wesley
Yes, the code is:

a href="http://www.youtube.com/v/T4y0OLPelMI&rel=1&autoplay=1" rel="shadowbox;width=640;height=480;player=swf"

and the code to run the shadowbox is:

<script type="text/javascript" src="shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({
language: 'en',
players:  ['img', 'html', 'iframe', 'qt', 'wmp', 'swf', 'flv']
});
</script>


Cheers!
Sekhon

Re: display youtube video with shadowbox

Reply Threaded More More options
Print post
Permalink
Thanks a Lot!