I wanted to pass along news of some upcoming changes to YouTube's
oEmbed service. For those not familiar with YouTube's support for
oEmbed, it's described at http://apiblog.youtube.com/2009/10/oembed-support.html
Starting this Wednesday evening, the dimensions used in the embed code
returned by oEmbed will be changing. Specifically, the height of the
embed will be decreasing by 25px (which corresponds to the size of the
standard YouTube control bar). The dimensions that oEmbed will return
will match the aspect ratio of the source video, without any extra
padding for controls—so for source videos with 16:9 aspect ratios, for
instance, the ratio of the width to the height will be 16 to 9.
This goes hand in hand with another recent change—the control bar is
hidden by default for any video that uses embed dimensions that are in
the exact same ratio as the original video.
I also want to give advanced warning to another change we have planned
for oEmbed. At some point, oEmbed will start returning <iframe> embed
codes by default, instead of the old-style <object>/<embed> codes.
This matches the behavior you would currently see if you used the
iframe=1 parameter to oEmbed. We understand that this change has the
potential to impact a number of developers who rely on <object>/
<embed> responses, so if you fall into that category, please start
explicitly passing in iframe=0 to your oEmbed calls as soon as you
can. This will ensure that once <iframe> is the default you will still
get back <object>/<embed>. An example of an oEmbed request URL that
will continue to return <object>/<embed> tags is
We don't have a firm date for when <iframe> responses will become the
default, but when we do know we'll post again when we're a few weeks
away from the change. Don't wait for that follow-up though; you can
start specifying iframe=0 (or iframe=1) today to request your desired
embed type explicitly.
-Jeff Posnick, YouTube API Team
groups.google.com/group/youtube-api-gdata | apiblog.youtube.com |