Wednesday 19 September 2012

Image Gallery video in magento

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2/swfobject.js"></script>
<a name="ytplayer"></a>
<div id="ytplayer_div">You need Flash player 8+ and JavaScript enabled to view this video.</div>
<script type="text/javascript">
  swfobject.embedSWF(
    'http://www.youtube.com/v/INSERT_YOUTUBE_VIDEO_ID_1_HERE&enablejsapi=1&rel=0&fs=1',
    'ytplayer_div',
    '425',
    '344',
    '8',
    null,
    null,
    {
      allowScriptAccess: 'always',
      allowFullScreen: 'true'
    },
    {
      id: 'ytplayer_object'
    }
  );
</script>
<script type="text/javascript">
  function ytplayer_loadvideo( id ) {
    var o = document.getElementById( 'ytplayer_object' );
    if( o ) {
      o.loadVideoById( id );
    }
  }
</script>
<div>
<a href="#ytplayer" onClick="ytplayer_loadvideo( 'INSERT_YOUTUBE_VIDEO_ID_1_HERE' );"><img src="http://img.youtube.com/vi/INSERT_YOUTUBE_VIDEO_ID_1_HERE/default.jpg" /></a>
<a href="#ytplayer" onClick="ytplayer_loadvideo( 'INSERT_YOUTUBE_VIDEO_ID_2_HERE' );"><img src="http://img.youtube.com/vi/INSERT_YOUTUBE_VIDEO_ID_2_HERE/default.jpg" /></a>
<a href="#ytplayer" onClick="ytplayer_loadvideo( 'INSERT_YOUTUBE_VIDEO_ID_3_HERE' );"><img src="http://img.youtube.com/vi/INSERT_YOUTUBE_VIDEO_ID_3_HERE/default.jpg" /></a>
.
.
.
<a href="#ytplayer" onClick="ytplayer_loadvideo( 'INSERT_YOUTUBE_VIDEO_ID_N_HERE' );"><img src="http://img.youtube.com/vi/INSERT_YOUTUBE_VIDEO_ID_N_HERE/default.jpg" /></a>
</div>
 ************** end*****************
INSERT_YOUTUBE_VIDEO_ID_1_HERE like= gzDS-Kfd5XQ,il-_s2O3Qt8

No comments:

Post a Comment

Note: only a member of this blog may post a comment.