I am using youtube's iframe API to embed videos, one at a time, on a website that gets lists of videos from reddit.
Yesterday everything was working fine, however today I am getting "402 Payment Required" when the iframe makes a call to http://www.youtube.com/get_video_info[...], and the videos doesn't load. This happens every once in a while, it feels like some sort of throttling. I thought it may be related to some changes to the code I've done today, but I was getting the same errors when I reverted to yesterday's code.
I believe the GET requests originates from Youtube's HTML5 player, which is loaded in the iframe, after calling new YT.Player:
player = new YT.Player(
'player', {
playerVars: {
// 'controls': 0 // TODO: Hide controls.
},
videoId: vidid,
events: {
'onReady': onPlayerReady,
'onStateChange': checkState
}
}
GET http://www.youtube.com/get_video_info?html5=1&video_id=bV3W1a_rY7k&eurl=http%3A%2F%2Flocalhost%2Fderp.html&el=embedded&hl=en_US&splay=1 Response: 402 Payment Required
You can see the example live here: