Sometimes an embedded video (or other embedded media) will display on top of other content on your website. This most commonly interferes with a dropdown navigation bar. There is a parameter that can be added to the embed code to prevent this from happening. YouTube doesn't include this parameter by default, but below is what you should add to all of the videos you embed. This fix is only available if you use the "old embed code" that YouTube offers.
Original/Old YouTube Embed Code:
<object width="425" height="349"><param name="movie" value="http://www.youtube.com/v/f135eASB?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/f135eASB?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="425" height="349" allowscriptaccess="always" allowfullscreen="true"></embed></object>
Updated YouTube Embed Code:
<object width="425" height="349"><param name="movie" value="http://www.youtube.com/v/f135eASB?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/f135eASB?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash"wmode="opaque" width="425" height="349" allowscriptaccess="always" allowfullscreen="true"></embed></object>
Note: If you're adding a green screen video to your website, replace "opaque" with "transparent."
Comments
0 comments
Article is closed for comments.