<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Streaming FLV From YouTube" width="300" height="250" thumbnail="">
  <Require feature="ads"/>
  <Require feature="flash"/>
</ModulePrefs>
<UserPref name="clickurl" datatype="hidden" default_value=""/>
<UserPref name="aiturl" datatype="hidden" default_value=""/>
<Content type="html"><![CDATA[
  <style>
    body {
      font-size: 0.9em;
    }
    a {
      color: #00c;
    }
    div#player {
      width: 300px;
      height: 250px;
      background-color: #000;
      text-align: center;
      color: #fff;
    }
    div#click {
      color: #000;
      width: 150px;
      padding: 10px 0px;
      margin: 0px auto;
      background-color: #eef;
      font-weight: bold;
      font-size: 1.2em;
      position: relative;
      top: 100px;
      cursor: pointer;
    }
  </style>
  
  <div id="player">
    Here's the <a id="flvLink" target="_top">FLV link</a>
    for this <a target="_top" href="http://www.youtube.com/watch?v=WWyJJQbFago">YouTube video</a>.
    <div id="click" onclick="javascript:play();">Click to Play</div>
  </div>

  <script>
    // Create the link to the FLV file on YouTube
    var flvURL = '__YOUTUBE_VIDEO_URL(WWyJJQbFago)__';
    
    // Set the href attribute so the user can see what it looks like
    _gel('flvLink').href = flvURL;
    
    function play() {    
      // Embed my own Flash player using the FLV from YouTube
      _IG_EmbedCachedFlash("http://gadgetads.googlecode.com/svn/trunk/tutorial_content/small_player.swf", "player", {
          swf_version: 8, 
          width: 300, 
          height: 250, 
          flashvars: 'flvURL=' + _esc(flvURL)
        });
    }
  </script>
]]></Content>
</Module>
