Dealing with YouTube videos that you can't embed


If you are using the YouTube Player APIs you will notice that some videos will refuse to load on your site. This is because the owner of that video has requested that embedding be disabled. You can tell on the video watch page because it will say "Embedding disabled by request" in place of the standard embed code:

http://www.youtube.com/watch?v=juPxfHO50oo

If you are retrieving videos to display using the Data API you should use the format parameter set to 5 in order to filter out non-embeddable videos:

http://gdata.youtube.com/feeds/api/videos?v=2&format=5

The Data API also has the <yt:noembed> tag included in the video entry when the video cannot be embedded. A video entry can be retrieved using:

http://gdata.youtube.com/feeds/api/videos/VIDEO_ID

If you are using the Player JavaScript or AS2 API you should also handle the onError event.

4 comments:

Hugh said...

Dear Jeff,

I am not technical enough to program with the YouTube API.

I embed YouTube videos on my web site.

Is there a way to check if any video has "embed disabled by request", using site-checking software?

Removed videos return a 303 error, so that is fine.

However, embedded videos that for some reason change to "embed disabled by request" do not seem to return a 303 error.

Is there a simple way to check for the?

PREVIEWFILMS.NET said...

i too like Hugh would like to know how to incorporate into a link checker

kosovohp said...

Girl Xinh | Hot Girl | Cute Girl | Sexy Girl | Hot Girl Asian
Hot Girl | Lexi Belle | Sexy Girl | Cute Girl | Hot Asian Girl | Leah Dizon | Hot Girl Asian | Girl Xinh
socks proxy | socks5 | proxy free |proxy list

alex said...

Thank you for this useful information. Visit my site- Youtube Support Call Toll Free No +1-800-231-4635.