Given an Youtube video id how can I determine from JavaScript whether the video has embedding disabled?
+2
A:
The tag specifies that a video may not be embedded on other websites. This tag may be included in a request to upload or update a video's metadata. By default, videos can be embedded on other sites unless they are private videos. If a request does not include either the tag or the tag, a video will be embeddable on other websites.
Possibly of Interest:
Jonathan Sampson
2009-06-29 17:14:21
Yeah, that was my question too. Turns out to be different though no event was fired regarding state change. But the js api has an onError callback that I can plug into.
Allain Lalonde
2009-06-29 17:18:14
A:
You'd have to use a server-side script for this, and use some AJAX to call it.
mgroves
2009-06-29 17:17:05
A:
FYI you can get GData responses in JSON format, so you could use javascript to check the embed status before you show the embed player.
If you prefer, you can hook into the onError callback in the player, but that's probably not as nice of a user experience as checking first.
Geoff
2009-07-01 07:10:19