OK, I'm stuck and I don't know what's wrong even after following Google's docs and reading suggestions here on Stackoverflow. Why can't I control Youtube embeds in my web page?
If I create an HTML file with the <body> being:
<object id="o1" width="480" height="295">
<param name="movie"
value="http://www.youtube.com/v/qCTLCNmnlKU&hl=en_US&fs=1&enablejsapi=1&">
</param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed id="e1"
src="http://www.youtube.com/v/qCTLCNmnlKU&hl=en_US&fs=1&enablejsapi=1&"
type="application/x-shockwave-flash"
allowscriptaccess="always" allowfullscreen="true" width="480" height="295">
</embed>
</object>
Even when I attempt to do:
// I get an object. Yay.
document.getElementById('e1');
// This generates "...playVideo is not a function"
document.getElementById('e1').playVideo();
Help! What am I doing wrong? Thanks.