Engineering and Developers Blog
What's happening with engineering and developers at YouTube
Cleaning Up Our Embeds
Friday, October 30, 2009
For the longest time, official YouTube video embed codes have contained embarrassingly malformed URLs; the first URL parameter (at the end of URLs) should always start with a ? character, but our URL parameters begin with &. That looks something like this:
http://www.youtube.com/v/0XjwoVqM_qE&feature=player_embedded&fs=1 (incorrect)
http://www.youtube.com/v/0XjwoVqM_qE?feature=player_embedded&fs=1 (correct)
Fortunately, we've found a way to use correct URLs without breaking old browsers and we can't wait to do it.
Speaking of changes to the embed code, we'll also be tweaking the HTML content. The new YouTube embed code is leaner and still works on everything from ancient desktop browsers to modern smart phones. You won't find another snippet of HTML that's as battle-tested and mother-approved! Here's a preview of the new, streamlined format:
And here's what the HTML looks like:
<object width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/0XjwoVqM_qE?color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1">
<param name="allowFullScreen" value="true">
<param name="allowScriptAccess" value="always">
<embed src="http://www.youtube.com/v/0XjwoVqM_qE?color1=0xb1b1b1&color2=0xcfcfcf&hl=en&feature=player_embedded&fs=1"
type="application/x-shockwave-flash" allowfullscreen="true"
allowScriptAccess="always" width="425" height="344">
</object>
If you grab YouTube embed codes by hand from YouTube.com, or from the YouTube Player APIs or oEmbed, you'll start getting this updated HTML soon. As for all the embeds already on the web: worry not, those will continue to work forever.
No comments :
Post a Comment
Labels
.net
acceleration
access control
accessibility
actionscript
activities
activity
android
announcements
apis
app engine
appengine
apps script
as2
as3
atom
authentication
authorization
authsub
best practices
blackops
bootcamp
captions
categories
channels
charts
chrome
chromeless
client library
clientlibraries
clientlogin
code
color
comments
compositing
create
curation
custom player
decommission
default
deprecation
devs
direct
discovery
docs
Documentation RSS
dotnet
education
embed
embedding
events
extension
feeds
flash
format
friendactivity
friends
fun
gears
google developers live
google group
googlegamedev
googleio
html5
https
iframe
insight
io12
io2011
ios
iphone
irc
issue tracker
java
javascript
json
json-c
jsonc
knight
legacy
Live Streaming API
LiveBroadcasts API
logo
mashups
media:keywords keywords tags metadata
metadata
mobile
mozilla
news
oauth
oauth2
office hours
open source
partial
partial response
partial update
partners
patch
php
player
playlists
policy
previews
pubsubhubbub
push
python
quota
rails
releases
rendering
reports
responses
resumable
ruby
samples
sandbox
shortform
ssl https certificate staging stage
stack overflow
stage video
staging
standard feeds
storify
storyful
subscription
sup
survey
tdd
theme
tos
tutorials
updates
uploads
v2
v3
video
voting
watch history
watchlater
webvtt
youtube
youtube api
youtube developers live
youtube direct
ytd
Archive
2015
December
November
October
May
April
March
January
2014
October
September
August
May
March
2013
December
October
September
August
July
June
May
April
March
February
2012
December
November
September
August
July
June
May
April
March
February
January
2011
December
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
July
June
May
April
March
February
January
2009
November
October
Cleaning Up Our Embeds
The ActionScript 3 YouTube Chromeless Player is No...
Direct Uploads Server Migration
oEmbed support
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
2007
December
November
August
June
May
Feed
YouTube
on
Follow @youtubedev
No comments :
Post a Comment