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:

  1. 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?

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

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

    ReplyDelete
  4. 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

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

    ReplyDelete
  6. 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.

    ReplyDelete
  7. 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?

    ReplyDelete
  8. 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

    ReplyDelete
  9. This comment has been removed by the author.

    ReplyDelete
  10. 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

    ReplyDelete
  11. 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.

    ReplyDelete