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.

13 comments:

Unknown 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?

Youtube.com/robertodidonato said...

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

Unknown said...

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

Paraphrasing Matters said...

Check out my YouTube Videos

Unknown said...

Wow, What an Outstanding post. I found this too much informatics. It is what I was seeking for. I would like to recommend you that please keep sharing such type of info.If possible, Thanks. investigate this site

John said...

Want to clean up pet dander and other hairy situations at home? These cordless vacuums can make them disappear.

augustwalker said...

how to connect hp deskjet 2652 to new wifi. You can also download and install the latest version software of printer drivers for Windows 10.

Scott Stayris said...

If you need any accounting software to track and manage business data, then Quickbooks is the best software to manage all financial data. How to backup Quickbooks Online?

Firmware File said...

Firmware is a set of instructions that are stored in the flash ROM of a hardware device. If you want to upgrade or reinstall the operating system on your smartphone, you can download the firmware file. It can get back your phone in factory format.
Micromax a106 flash tool

Lucas Smith said...
This comment has been removed by the author.
Lucas Smith said...

To connect your HP printer to your network, be it home or office, you're going to need to know the find ip address on my hp printer, and we're here to help

kevin hart said...

Is your hp printer not printing? This can be brought about by various factors, for example, an obsolete HP printer drivers or awful designs in Windows.

Printer Repair City said...

Amazing, learn how to resolve Canon Printer Error u052 and solve canon printer error 6a81 Also canon printer error 5200 and this is good Canon Printer Error Code 1007 find out canon printer error e04 as well as canon printer error code p22