View Single Post
Old 04-06-2009, 04:34 AM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
coded this just fer u

http://ytmnd.webspacemania.com/replay/?x=xE-OhkFK6-w

lets you play any video in auorepeat mode


heres the source code
save as index.php
call as index.php?x=YOUTUBEID
Code:
<?php
$x = $_GET['x'];
if ($x == ""){
$x = "oDBKCjd6TQQ";
}
?>
<html>
<body>
<script src="http://swfobject.googlecode.com/svn/tags/rc3/swfobject/src/swfobject.js" type="text/javascript"></script>

   <div id="istbp">
    
  </div>
 
  <script type="text/javascript">
 if (window.innerWidth || window.innerHeight){ 
dw = window.innerWidth; 
dh = window.innerHeight; 
} 
if (document.body.clientWidth || document.body.clientHeight){ 
dw = document.body.clientWidth; 
dh = document.body.clientHeight; 
} 
    var params = { allowScriptAccess: "always" };
    var atts = { id: "stbplayer" };
    swfobject.embedSWF("https://youtube.com/v/<?php echo $x; ?>&enablejsapi=1&playerapiid=ytplayer&autoplay_disabled=1&loop=1","istbp", dw, dh, "8", null, null, params, atts);
 


  function onYouTubePlayerReady(playerId) {
      ytplayer = document.getElementById("stbplayer");
      ytplayer.addEventListener("onStateChange", "stb()");
          }



   function stb() {  


   ytplayer = document.getElementById("stbplayer");
   ytplayer.playvideo();
   
  }
  </script>
</body>
</html>
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote