I'm having trouble with the YouTube Player API Reference for iframe Embeds...
Specifically with using http://www.youtube-nocookie.com
(necessary for iOS to allow embeds to play in Safari)
the onPlayerReady function in the demo is not called for for http://www.youtube-nocookie.com (works fine for http://www.youtube.com)
See steps to reproduce below
Step 1: Use the standard api demo: (copy the code found at the link below) https://developers.google.com/youtube/iframe_api_reference#Getting_Started
---> works fine
- Step 2: as instructed in https://developers.google.com/youtube/iframe_api_reference#Loading_a_Video_Player
change
<div id="player"></div>
to (in the demo from Step 1)
<iframe id="player" type="text/html" width="640" height="390" src="http://www.youtube.com/embed/M7lc1UVf-VE?enablejsapi=1&origin=http://example.com" frameborder="0"></iframe>
(make sure to change origin=http://example.com to your domain)
---> works fine
- Step 3: in the iframe tag added in the last step, change
src="http://www.youtube.com/embed/...
to
src="http://www.youtube-nocookie.com/embed/...
---> now the onPlayerReady function is never called
Note: as far as I can tell, this used to work until a few weeks ago...