Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

The following code doesn't show the video, any helps? I'm trying to show this youtube video.

<!DOCTYPE html>
<html>
<body>
<script src="http://www.google.com/jsapi"></script>
<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.1/swfobject.js"></script>
<div id="ytapiplayer">You need Flash player 8+ and JavaScript enabled to view this video.</div>
<script type="text/javascript">
google.load("swfobject", "2.1");
function onYouTubePlayerReady(playerId) {
ytplayer = document.getElementById("myytplayer");
ytplayer.playVideo();
ytplayer.mute();
}
var params = { allowScriptAccess: "always"};
var atts = { id: "myytplayer" };
swfobject.embedSWF("youtube_link_here?enablejsapi=1&playerapiid=ytplayer&allowFullScreen=true&version=3","ytapiplayer", "440", "280", "8", null, null, params, atts);
</script>
</body>
</html>
share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.