I guess this is similar to what Facebook does, but...I haven't worked out how to follow what they do and if this is a dupe, I apologise.
The idea is to have a thumbnail-size player (width="220px"
height="180px"
) that, when clicked, resizes to a 'normal' size (normal is arbitrary, of course, but for the sake of this example, if we go with width="445px"
, height="364px"
as the Youtube default) and then plays.
I'm assuming that the onClick event should change the height and width properties defined in the <object>
and <embed>
tags, but since the object is flash I assume the flash player 'captures' the clicks rather than reporting them to the browser?
The following video is one of those I intend to use, and is here to give a real-world example:
<object class="yt" width="445" height="364">
<param name="movie" value="http://www.youtube.com/v/2ieLb3RAblA&hl=en&fs=1&color1=0x3a3a3a&color2=0x999999&border=1"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="http://www.youtube.com/v/2ieLb3RAblA&hl=en&fs=1&color1=0x3a3a3a&color2=0x999999&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="445" height="364"></embed>
</object>
As an addenda, this is likely to be used in a static html page for a short while, and be moved to a php (5.2) site shortly afterwards, both php and html have jQuery 1.3.2 linked, and I'm more than happy to use a third-party plugin if such exists to do this easily.
Any and all help is appreciated, I'm sorry for asking what may -and does, to me- appear to be a dumb question. It should be obvious, I guess.
Thanks in advance.