Thursday, January 6, 2011

Play Youtube on Your WebSite

You can play youtube videos on your website. Example and HTML code both are below.


Loading...







HTML CODE IS BELOW




<!-- ++Begin Video Search Control Wizard Generated Code++ -->
  <!--
  // Created with a Google AJAX Search Wizard
  // http://code.google.com/apis/ajaxsearch/wizards.html
  -->

  <!--
  // The Following div element will end up holding the Video Search Control.
  // You can place this anywhere on your page.
  -->
  <div id="videoControl">
    <span style="color:#676767;font-size:30px;margin:20px;padding:30px;">Loading...</span>
  </div>

  <!-- Ajax Search Api and Stylesheet
  // Note: If you are already using the AJAX Search API, then do not include it
  //       or its stylesheet again
  -->
                  <script src="http://www.google.com/uds/api?file=uds.js&v=1.0&source=uds-vsw&key=ABQIAAAAHsdbNK0bItMLAYSOVMJfPRTip-2O8lrQTZP_Ui-EVjATdmp-QxQYI3l6uH5FdnBMrXi9nxudUxXCBA"
                    type="text/javascript"></script>
                    <style type="text/css">
                     @import url("http://www.google.com/uds/css/gsearch.css");
                       </style>
                    <!-- Video Search Control and Stylesheet -->
                  <script type="text/javascript">
                    window._uds_vsw_donotrepair = true;
                  </script>
  <script src="http://www.google.com/uds/solutions/videosearch/gsvideosearch.js?mode=new"
    type="text/javascript"></script>
  <style type="text/css">
    @import url("http://www.google.com/uds/solutions/videosearch/gsvideosearch.css");
  </style>

  <script type="text/javascript">
    function LoadVideoSearchControl() {
      var options = {
        twoRowMode : true
      };
      var videoSearch = new GSvideoSearchControl(
                              document.getElementById("videoControl"),
                              [{ query : "Funny"}, { query : "Masti "}, { query : "Bhangra"}, { query : "Hangama"}], null, null, options);
    }
    // arrange for this function to be called during body.onload
    // event processing
    GSearch.setOnLoadCallback(LoadVideoSearchControl);
  </script>
<!-- --End Video Search Control Wizard Generated Code-- -->

No comments:

Post a Comment