I used iframe API like this
<iframe id="youtubePlayer" type="text/html" width="100%" height="auto" src="http://www.youtube.com/embed/someid?enablejsapi=1&origin=http://myurl.com" frameborder="0"></iframe>
Notice that I have changed src
to http
and added origin
, but still I got the following error:
Blockquote Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "http://myurl.com". The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
The problem only occurs in Safari. I did some debug and it seems like a Sf()
only gets called in Safari in www-embed.js.
Thanks!