[Script] Youtube views script For Online Marketer !!
Hi guys.
I found this script in my folder with scripts, I found it somewhere few months ago, tested and added to my collection.
What does this script do?
-Basicly show your video on your website. But don't worry you can set it to bi invisible and to mute audio. So nobody won't know he's "watching your video.
<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("http://www.youtube.com/v/MO8ITTxvdSo?enablejsapi=1&playerapiid=ytplayer&allowFullScreen=true&version=3",
"ytapiplayer", "420", "315", "8", null, null, params, atts);
</script>
And to make it invisible, just add this code below:
<style>#myytplayer{width:1px;height:1px;}</style>
p.s Don't forget to change "MO8ITTxvdSo" with your video ID, I just added this video as example.