胡斌

video player of AdobeMediaServer Demo,

try to modify to demo liveAssistant
  1 +<!--
  2 +/*
  3 + * (C) Copyright 2011 Adobe Systems Incorporated. All Rights Reserved.
  4 + *
  5 + * NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the
  6 + * terms of the Adobe license agreement accompanying it. If you have received this file from a
  7 + * source other than Adobe, then your use, modification, or distribution of it requires the prior
  8 + * written permission of Adobe.
  9 + * THIS CODE AND INFORMATION IS PROVIDED "AS-IS" WITHOUT WARRANTY OF
  10 + * ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  11 + * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  12 + * PARTICULAR PURPOSE.
  13 + *
  14 + * THIS CODE IS NOT SUPPORTED BY Adobe Systems Incorporated.
  15 + *
  16 + */
  17 +-->
  18 +
  19 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  20 +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  21 +<!-- saved from url=(0014)about:internet -->
  22 +<html xmlns="http://www.w3.org/1999/xhtml">
  23 +<head>
  24 +<title>Adobe Flash Media Server</title>
  25 +<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  26 +
  27 +<style type="text/css">
  28 +td img {display: block;}body {
  29 + background-color: #191919;
  30 +}
  31 +a:link {
  32 + text-decoration: none;
  33 + color: #F00;
  34 +}
  35 +a:hover {
  36 + text-decoration: underline;
  37 + color: #F00;
  38 +}
  39 +a:visited {
  40 + text-decoration: none;
  41 + color: #F00;
  42 +}
  43 +a:active {
  44 + text-decoration: none;
  45 + color: #F00;
  46 +}
  47 +.style22 {
  48 + color: #666666;
  49 +}
  50 +.style23 {
  51 + font-family: Arial, Helvetica, sans-serif;
  52 + font-size: 12px;
  53 +}
  54 +.style31 {
  55 + font-family: "Arial";
  56 + color: #999999;
  57 + font-size: 12px;
  58 + font-weight: bold;
  59 +}
  60 +.style34 {
  61 + font-family: "Arial";
  62 +}
  63 +.style24 { font-size: 11px;
  64 + color: #999999;
  65 + font-family: Arial, Helvetica, sans-serif;
  66 +}
  67 +.style62 {
  68 + font-size: 12px; color: #999999;
  69 + font-family: "myriad Pro";
  70 +}
  71 +.style67 {
  72 + font-family: "myriad Pro";
  73 + color: #999999;
  74 + font-size: 12px;
  75 + font-weight: bold;
  76 +}
  77 +.style69 {
  78 + font-family: "Arial";
  79 + color: #999999;
  80 + font-weight: bold;
  81 +}
  82 +.style1 {
  83 + font-family: Arial, Helvetica, sans-serif;
  84 + color: #999999;
  85 + font-size: 14px;
  86 + font-weight: bold;
  87 +}
  88 +.style3 {
  89 + font-family: "Arial";
  90 + font-size: 12px;
  91 + line-height: normal;
  92 + height: 10px;
  93 +}
  94 +.style71 {
  95 + font-family: "myriad Pro";
  96 +}
  97 +.style73 {
  98 + font-family: Arial;
  99 + color: #999999;
  100 + font-size: 12px;
  101 + font-weight: bold;
  102 +}
  103 +.style74 {
  104 + font-size: 12px;
  105 + color: #999999;
  106 + font-family: Arial;
  107 +}
  108 +.style75 {
  109 + font-family: Arial;
  110 + color: #CCC;
  111 + font-size: 12px;
  112 + font-weight: bold;
  113 +}
  114 +.style76 {
  115 + font-size: 12px;
  116 + font-family: Arial;
  117 + color: #FF0000;
  118 +}
  119 +.style81 {
  120 + font-family: Arial;
  121 +}
  122 +.style82 {
  123 + color: #999999;
  124 + font-size: 12px;
  125 +}
  126 +.style83 {
  127 + font-size: 12px;
  128 + font-weight: bold;
  129 + color: #999999;
  130 +}
  131 +</style>
  132 +
  133 +<!-- functionality -->
  134 +<script type="text/javascript" src="scripts/swfobject.js"></script>
  135 + <script language="javascript">
  136 +
  137 + var queryParameters = new Array();
  138 + var flashVars = "";
  139 + var tag = "";
  140 + var url = "";
  141 +
  142 + window.onload = function ()
  143 + {
  144 + document.getElementById( 'inputURL' ).value = queryParameters['source'];
  145 + document.getElementById('embedField').innerHTML = tag;
  146 +
  147 + for(var i=1 ; i<=10;i++)
  148 + {
  149 + var ids = String("sel"+i.toString());
  150 +
  151 + document.getElementById( ids ).style.visibility = "hidden";
  152 + document.getElementById( ids ).className = "style76";
  153 + }
  154 +
  155 + // mark the entry for that index
  156 + if(queryParameters['idx'] != "")
  157 + {
  158 + document.getElementById("td" + queryParameters['idx'] ).className = "style75";
  159 + document.getElementById("sel" + queryParameters['idx'] ).style.visibility = "visible";
  160 + }
  161 +
  162 + }
  163 +
  164 + function initialise()
  165 + {
  166 +
  167 +
  168 + function getUrlParam( name )
  169 + {
  170 + name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  171 + var regexS = "[\\?&]"+name+"=([^&#]*)";
  172 + var regex = new RegExp( regexS );
  173 + var results = regex.exec( window.location.href );
  174 + if( results == null )
  175 + return "";
  176 + else
  177 + return unescape( results[1] );
  178 + }
  179 +
  180 + queryParameters['source'] = getUrlParam('source');
  181 + queryParameters['type'] = getUrlParam('type');
  182 + queryParameters['idx'] = getUrlParam('idx');
  183 +
  184 + if( queryParameters['source'] == "" )
  185 + queryParameters['source'] = "rtmp://localhost/vod/mp4:sample1_500kbps.f4v";
  186 +
  187 + if( queryParameters['type'] == "" )
  188 + queryParameters['type'] = "recorded";
  189 +
  190 + if( queryParameters['idx'] == "" )
  191 + queryParameters['idx'] = "2";
  192 +
  193 + flashVars += "&src=";
  194 + flashVars += queryParameters['source'];
  195 +
  196 + flashVars += "&autoHideControlBar=";
  197 + flashVars += unescape("true");
  198 +
  199 + flashVars += "&streamType=";
  200 + flashVars += queryParameters['type'];
  201 +
  202 + flashVars += "&autoPlay=";
  203 + flashVars += unescape("true");
  204 +
  205 + flashVars += "&verbose=";
  206 + flashVars += "true";
  207 +
  208 + var soFlashVars = {
  209 + src: queryParameters['source'],
  210 + streamType: queryParameters['type'],
  211 + autoPlay: "true",
  212 + controlBarAutoHide: "true",
  213 + controlBarPosition: "bottom"
  214 + };
  215 +
  216 + tag = "&lt;object width='640' height='377' id='StrobeMediaPlayback' name='StrobeMediaPlayback' type='application/x-shockwave-flash' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' &gt;&lt;param name='movie' value='swfs/StrobeMediaPlayback.swf' /&gt; &lt;param name='quality' value='high' /&gt; &lt;param name='bgcolor' value='#000000' /&gt; &lt;param name='allowfullscreen' value='true' /&gt; &lt;param name='flashvars' value= '"+
  217 + flashVars+"'/&gt;&lt;embed src='swfs/StrobeMediaPlayback.swf' width='640' height='377' id='StrobeMediaPlayback' quality='high' bgcolor='#000000' name='StrobeMediaPlayback' allowfullscreen='true' pluginspage='http://www.adobe.com/go/getflashplayer' flashvars='"+ flashVars +"' type='application/x-shockwave-flash'&gt; &lt;/embed&gt;&lt;/object&gt;";
  218 +
  219 + <!-- For version detection, set to min. required Flash Player version, or 0 (or 0.0.0), for no version detection. -->
  220 + var swfVersionStr = "10.3.0";
  221 + <!-- To use express install, set to playerProductInstall.swf, otherwise the empty string. -->
  222 + var xiSwfUrlStr = "swfs/playerProductInstall.swf";
  223 + var params = {};
  224 + params.quality = "high";
  225 + params.bgcolor = "#000000";
  226 + params.allowscriptaccess = "sameDomain";
  227 + params.allowfullscreen = "true";
  228 + var attributes = {};
  229 + attributes.id = "StrobeMediaPlayback";
  230 + attributes.name = "StrobeMediaPlayback";
  231 + attributes.align = "middle";
  232 + swfobject.embedSWF("swfs/StrobeMediaPlayback.swf", "flashContent", "640", "377", swfVersionStr, xiSwfUrlStr, soFlashVars, params, attributes);
  233 + <!-- JavaScript enabled so display the flashContent div in case it is not replaced with a swf object. -->
  234 + swfobject.createCSS("#flashContent", "display:block;text-align:left;");
  235 + }
  236 +
  237 + function playStream()
  238 + {
  239 + var url = "source=" + document.getElementById('inputURL').value;
  240 + var type;
  241 +
  242 + if(document.getElementById('vodCheckbox').checked==true)
  243 + type="vod";
  244 + else
  245 + type="live";
  246 +
  247 + url += ("&type=" + type);
  248 +
  249 + document.getElementById('playBtn').href="videoplayer.html?" + url;
  250 +
  251 + }
  252 +
  253 + function checkbox(type)
  254 + {
  255 + if(type=="vod")
  256 + {
  257 + if(document.getElementById('liveCheckbox').checked==true)
  258 + {
  259 + document.getElementById('liveCheckbox').checked=false;
  260 + }
  261 + }
  262 + if(type=="live")
  263 + {
  264 + if(document.getElementById('vodCheckbox').checked==true)
  265 + {
  266 + document.getElementById('vodCheckbox').checked=false;
  267 + }
  268 + }
  269 + }
  270 +
  271 + initialise();
  272 +
  273 + </script>
  274 +
  275 +</head>
  276 +<body>
  277 + <table width="100" height="" border="0" align="left" cellpadding="0" cellspacing="0">
  278 +<!-- fwtable fwsrc="080715_fms_splash_fireworks.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "1526025482" fwnested="0" -->
  279 +<tr><td width="41"><img src="images/spacer.gif" width="41" height="1" border="0" alt="" /></td>
  280 + <td width="3"><img src="images/spacer.gif" width="3" height="1" border="0" alt="" /></td>
  281 + <td width="647"><img src="images/spacer.gif" width="636" height="1" border="0" alt="" /></td>
  282 + <td width="361"><img src="images/spacer.gif" width="358" height="1" border="0" alt="" /></td>
  283 + <td width="44"><img src="images/spacer.gif" width="43" height="1" border="0" alt="" /></td>
  284 + </tr>
  285 +
  286 + <tr valign="top">
  287 + <td rowspan="4" bgcolor="#191919"><img src="images/spacer.gif" width="55" height="50" /></td>
  288 + <td rowspan="4"></td>
  289 + <td height="327" colspan="3" bgcolor="#191919"><map name="index_r4_c3MapMap" id="index_r4_c3MapMap">
  290 + <area shape="rect" coords="32,160,308,181" href="fms_adminConsole.htm" target="_blank" />
  291 + <area shape="rect" coords="316,161,433,181" href="#" />
  292 + </map>
  293 + <map name="index_r2_c4MapMap" id="index_r2_c4MapMap">
  294 + <area shape="rect" coords="20,21,55,61" href="http://www.adobe.com" target="_blank" />
  295 + </map>
  296 + <map name="index_r4_c3Map" id="index_r4_c3Map">
  297 + <area shape="rect" coords="32,160,308,181" href="fms_adminConsole.htm" target="_blank" />
  298 + <area shape="rect" coords="316,161,433,181" href="#" />
  299 + </map>
  300 + <map name="index_r2_c4Map" id="index_r2_c4Map">
  301 + <area shape="rect" coords="20,21,55,61" href="http://www.adobe.com" target="_blank" />
  302 + </map>
  303 + <table width="100%" border="0" cellspacing="0" cellpadding="0">
  304 + <tr>
  305 + <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
  306 + <tr>
  307 + <td width="61" colspan="4" bgcolor="#191919"><table width="100" border="0" cellspacing="0" cellpadding="0">
  308 + <tr>
  309 + <td width="93%"><table width="98%" border="0" cellpadding="0" cellspacing="0">
  310 +
  311 + <tr>
  312 + <td colspan="4" align="left" bgcolor="#191919"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  313 + <tr>
  314 + <td><img src="images/top_bar_border.gif" width="1000" height="15" /></td>
  315 + </tr>
  316 + <tr>
  317 + <td><img src="images/title.gif" width="1000" height="66" border="0" usemap="#Map" /></td>
  318 + </tr>
  319 + </table></td>
  320 + </tr>
  321 + <tr>
  322 + <td colspan="4" align="left" bgcolor="#191919"><img src="images/canvas.gif" alt="" name="index_r4_c3" width="1000" height="39" border="0" id="index_r4_c3"/></td>
  323 + </tr>
  324 +
  325 + <tr>
  326 + <td colspan="4" align="left" bgcolor="#191919"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  327 + <tr>
  328 + <td width="64%"><table width="65%" border="0" cellspacing="0" cellpadding="0">
  329 + <tr>
  330 + <!-- Here goes the StrobeMediaPlayback -->
  331 + <td valign="top">
  332 + <!-- SWFObject's dynamic embed method replaces this alternative HTML content with Flash content when enough
  333 + JavaScript and Flash plug-in support is available. The div is initially hidden so that it doesn't show
  334 + when JavaScript is disabled.
  335 + -->
  336 +
  337 + <div id="flashContent">
  338 + <p>To view this page ensure that Adobe Flash Player version 10.3.0 or greater is installed.</p>
  339 + <script type="text/javascript">
  340 + var pageHost = ((document.location.protocol == "https:") ? "https://" : "http://");
  341 + document.write("<a href='http://www.adobe.com/go/getflashplayer'><img src='"
  342 + + pageHost + "www.adobe.com/images/shared/download_buttons/get_flash_player.gif' alt='Get Adobe Flash player' /></a>" );
  343 + </script>
  344 + </div>
  345 + <noscript>
  346 + <a href="http://www.adobe.com/go/getflashplayer/" style="color:black"><img src="images/ERROR_getFlashPlayer.gif" width="640" height="377" /></a>
  347 +
  348 + </noscript>
  349 + </td>
  350 + </tr>
  351 + </table></td>
  352 + <td width="36%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  353 + <tr>
  354 + <td width="359" height="186" background="images/upperright_03.gif"><table width="358" border="0" cellspacing="0" cellpadding="0">
  355 + <tr>
  356 + <td width="35" colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td>
  357 + <td width="323"><span class="style75">SELECT A VIDEO FROM THE LIST BELOW</span></td>
  358 + </tr>
  359 + <tr>
  360 + <td colspan="3"><img src="images/spacer.gif" width="20" height="5" /></td>
  361 + </tr>
  362 + <tr>
  363 + <td colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td>
  364 + <td><span class="style75">SOURCE: /applications/vod/media</span></td>
  365 + </tr>
  366 + <tr>
  367 + <td colspan="3"><img src="images/spacer.gif" width="20" height="5" /></td>
  368 + </tr>
  369 + <tr>
  370 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  371 + <td id="sel1"><span class="style74">&gt;</span></td>
  372 + <td id="td1" class="style76"><a href="videoplayer.html?source=rtmp://localhost/vod/mp4:sample1_150kbps.f4v&type=recorded&idx=1">sample1_150kbps.f4v</a></td>
  373 + </tr>
  374 + <tr>
  375 + <td colspan="3"><img src="images/spacer.gif" width="20" height="10" /></td>
  376 + </tr>
  377 + <tr>
  378 + <td><img src="images/spacer.gif" width="15" height="5" /></td>
  379 + <td id="sel2"><span class="style74">&gt;</span></td>
  380 + <td class="style76" id="td2"> <a href="videoplayer.html?source=rtmp://localhost/vod/mp4:sample1_500kbps.f4v&type=recorded&idx=2">sample1_500kbps.f4v</a></td>
  381 + </tr>
  382 + <tr>
  383 + <td colspan="3"><img src="images/spacer.gif" width="20" height="5" /></td>
  384 + </tr>
  385 + <tr>
  386 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  387 + <td id="sel3"><span class="style74">&gt;</span></td>
  388 + <td id="td3" class="style76"><a href="videoplayer.html?source=rtmp://localhost/vod/mp4:sample1_700kbps.f4v&type=recorded&idx=3">sample1_700kbps.f4v</a></td>
  389 + </tr>
  390 + <tr>
  391 + <td colspan="3"><img src="images/spacer.gif" width="20" height="5" /></td>
  392 + </tr>
  393 + <tr>
  394 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  395 + <td id="sel4"><span class="style74">&gt;</span></td>
  396 + <td id="td4" class="style76"><a href="videoplayer.html?source=rtmp://localhost/vod/mp4:sample1_1000kbps.f4v&type=recorded&idx=4">sample1_1000kbps.f4v</a></td>
  397 + </tr>
  398 + <tr>
  399 + <td colspan="3"><img src="images/spacer.gif" width="20" height="5" /></td>
  400 + </tr>
  401 + <tr>
  402 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  403 + <td id="sel5"><span class="style74">&gt;</span></td>
  404 + <td id="td5" class="style76"><a href="videoplayer.html?source=rtmp://localhost/vod/mp4:sample1_1500kbps.f4v&type=recorded&idx=5">sample1_1500kbps.f4v</a></td>
  405 + </tr>
  406 + <tr>
  407 + <td colspan="3"><img src="images/spacer.gif" width="20" height="5" /></td>
  408 + </tr>
  409 + <tr>
  410 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  411 + <td id="sel6"><span class="style74">&gt;</span></td>
  412 + <td id="td6" class="style76"><a href="videoplayer.html?source=rtmp://localhost/vod/sample&type=recorded&idx=6">sample.flv</a></td>
  413 + </tr>
  414 + </table></td>
  415 + </tr>
  416 + <tr>
  417 + <td width="359" height="114" background="images/middleright_05.gif"><table width="358" border="0" cellspacing="0" cellpadding="0">
  418 + <tr>
  419 + <td colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td>
  420 + <td width="323" class="style75">SOURCE: /webroot/vod</td>
  421 + </tr>
  422 + <tr>
  423 + <td colspan="2"><img src="images/spacer.gif" width="20" height="5" /></td>
  424 + </tr>
  425 + <tr>
  426 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  427 + <td id="sel7"><span class="style74">&gt;</span></td>
  428 + <td id="td7" class="style76"><a href="videoplayer.html?source=hds_sample1_manifest.f4m&type=recorded&idx=7" title="Only works when viewed from localhost.">hds_sample1_manifest.f4m</a></td>
  429 + </tr>
  430 + <tr>
  431 + <td colspan="2"><img src="images/spacer.gif" width="20" height="5" /></td>
  432 + </tr>
  433 + <tr>
  434 + </tr><tr>
  435 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  436 + <td id="sel8"><span class="style74">&gt;</span></td>
  437 + <td id="td8" class="style76"><a href="videoplayer.html?source=rtmp_sample1_manifest.f4m&type=recorded&idx=8" title="Only works when viewed from localhost.">rtmp_sample1_manifest.f4m</a></td>
  438 + </tr>
  439 + <tr>
  440 + <td colspan="2"><img src="images/spacer.gif" width="20" height="5" /></td>
  441 + </tr>
  442 + <tr>
  443 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  444 + <td id="sel9"><span class="style74">&gt;</span></td>
  445 + <td id="td9" class="style76"><a href="videoplayer.html?source=http://localhost/vod/sample2_1000kbps.f4v&type=recorded&idx=9">sample2_1000kbps.f4v (http progressive)</a></td>
  446 + </tr>
  447 + <tr>
  448 + <td colspan="2"><img src="images/spacer.gif" width="20" height="5" /></td>
  449 + </tr>
  450 + <tr>
  451 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  452 + <td id="sel10"><span class="style74">&gt;</span></td>
  453 + <td id="td10" class="style76"><a href="videoplayer.html?source=rtmp://localhost/vod/mp4:sample2_1000kbps.f4v&type=recorded&idx=10">sample2_1000kbps.f4v (rtmp)</a></td>
  454 + </tr>
  455 +
  456 +
  457 + </table></td>
  458 + </tr>
  459 + <tr>
  460 + <td width="359" height="77" background="images/lowerright_07.gif"><table width="358" border="0" cellspacing="0" cellpadding="0">
  461 +
  462 + <tr>
  463 + <td colspan="2"><img src="images/spacer.gif" width="20" height="10" /></td>
  464 + <td width="322" class="style75">SOURCE: /applications/live</td>
  465 + </tr>
  466 + <tr>
  467 + <td colspan="2"><img src="images/spacer.gif" width="20" height="5" /></td>
  468 + </tr>
  469 + <tr>
  470 + <td><img src="images/spacer.gif" width="20" height="10" /></td>
  471 + <td id="sel11"><span class="style74">&gt;</span></td>
  472 + <td id="td11" class="style76"><a href="videoplayer.html?source=rtmp://localhost/live/livestream&type=live&idx=11">livestream</a></td>
  473 + </tr>
  474 + </table></td>
  475 + </tr>
  476 + </table></td>
  477 + </tr>
  478 + </table></td>
  479 + </tr>
  480 + </table></td>
  481 + <td width="7%">&nbsp;</td>
  482 + </tr>
  483 + </table></td>
  484 + </tr>
  485 +
  486 + </table></td>
  487 + </tr>
  488 + </table></td>
  489 + </tr>
  490 + <tr>
  491 + <td colspan="2" valign="top" bgcolor="#191919"><table width="100" border="0" align="left" cellpadding="0" cellspacing="0">
  492 + <!-- fwtable fwsrc="080715_fms_splash_fireworks.png" fwbase="index.gif" fwstyle="Dreamweaver" fwdocid = "1526025482" fwnested="0" -->
  493 + <tr>
  494 + <td colspan="3" valign="top"><img src="images/spacer.gif" width="55" height="40" /></td>
  495 + </tr>
  496 + <tr>
  497 + <td colspan="3" valign="top"><table width="87%" border="0" cellspacing="0" cellpadding="0">
  498 + <tr>
  499 + <td><span class="style69">STREAM YOUR OWN VIDEO</span></td>
  500 + </tr>
  501 + <tr>
  502 + <td bgcolor="#666666"><img src="images/spacer.gif" width="20" height="3" /></td>
  503 + </tr>
  504 +
  505 + <tr>
  506 + <td><img src="images/spacer.gif" width="55" height="10" /></td>
  507 + </tr>
  508 + <tr>
  509 + <td><table width="1000" border="0" align="left" cellpadding="0" cellspacing="0">
  510 + <tr>
  511 + <td width="8%"><table width="86" border="0" cellspacing="0" cellpadding="0">
  512 + <tr>
  513 + <td align="left"><span class="style73">STREAM URL:</span></td>
  514 + </tr>
  515 + </table></td>
  516 + <td align="left"></td>
  517 + <td align="left"><input name="inputURL" type="text" id="inputURL" size="80" maxlength="80" /></td>
  518 + <td width="42%" align="left"><table width="100" border="0" cellspacing="0" cellpadding="0">
  519 + <tr>
  520 + <td width="5%" align="left"><img src="images/spacer.gif" width="10" height="10" /></td>
  521 + <td width="7%" align="left"><table width="0" >
  522 + <tr>
  523 + <td align="left"><div align="center">
  524 + <input type="checkbox" name="checkbox" id="vodCheckbox" checked onclick="checkbox('vod');" />
  525 + </div></td>
  526 + </tr>
  527 + </table></td>
  528 + <td width="2%" align="left"><img src="images/spacer.gif" width="10" height="10" /></td>
  529 + <td width="6%" align="left"><div align="center"><span class="style31">VOD</span></div></td>
  530 + <td width="5%" align="left"><img src="images/spacer.gif" width="10" height="10" /></td>
  531 + <td width="5%" align="left"><div align="center">
  532 + <input type="checkbox" name="checkbox2" id="liveCheckbox" onclick="checkbox('live');" />
  533 + </div></td>
  534 + <td width="2%" align="left"><img src="images/spacer.gif" width="10" height="10" /></td>
  535 + <td width="6%" align="left"><span class="style31">LIVE</span></td>
  536 + <td width="5%" align="left"><img src="images/spacer.gif" width="10" height="10" /></td>
  537 + <td width="27%" align="left"><a id="playBtn" onclick="javascript:playStream();"><img src="images/playstream_10.gif" width="104" height="25" /></a></td>
  538 + <td align="left">&nbsp;</td>
  539 + </tr>
  540 + </table></td>
  541 + </tr>
  542 + <tr>
  543 + <td colspan="2">&nbsp;</td>
  544 + <td align="left" class="style74">URL Syntax: [protocol]://[servername]/[application]/[codecID:][streamname][.extension]</td>
  545 + <td>&nbsp;</td>
  546 + </tr>
  547 + <tr>
  548 + <td colspan="4">&nbsp;</td>
  549 + </tr>
  550 + </table></td>
  551 + </tr>
  552 + </table></td>
  553 + </tr>
  554 + <tr>
  555 + <td colspan="3" valign="top"><table width="100" border="0" cellspacing="0" cellpadding="0">
  556 + <tr>
  557 + <td colspan="3">&nbsp;</td>
  558 + </tr>
  559 + <tr>
  560 + <td colspan="3"><span class="style73"></span></td>
  561 + </tr>
  562 + <tr>
  563 + <td colspan="3"><span class="style75"></span></td>
  564 + </tr>
  565 + <tr>
  566 + <td colspan="3"><span class="style67"><img src="images/spacer.gif" width="56" height="10" /></span></td>
  567 + </tr>
  568 + <tr>
  569 + <td width="32%" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  570 +
  571 + <tr>
  572 + <td valign="top" class="style73">RTMP STREAMING</td>
  573 + </tr>
  574 + <tr>
  575 + <td valign="top" class="style75">from the folder: /webroot/vod</td>
  576 + </tr>
  577 +
  578 + <tr>
  579 + <td valign="top"><img src="images/spacer.gif" width="40" height="5" border="0" /></td>
  580 + </tr>
  581 + <tr>
  582 + <td bgcolor="#666666"><img src="images/spacer.gif" width="490" height="3" /></td>
  583 + </tr>
  584 + <tr>
  585 + <td valign="top"><img src="images/spacer.gif" width="56" height="20" /></td>
  586 + </tr>
  587 + <tr>
  588 + <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  589 + <tr>
  590 + <td valign="top" class="style34"><table width="490" border="0" cellspacing="0" cellpadding="0">
  591 + <tr>
  592 + <td width="7%" valign="top" class="style74">1)</td>
  593 + <td width="93%" class="style74">[<strong>protocol</strong>]: You can use the following protocols: rtmp, rtmpt, rtmpe, rtmpte, rtmps.</td>
  594 + </tr>
  595 + <tr>
  596 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="15" /></td>
  597 + </tr>
  598 + <tr>
  599 + <td valign="top" class="style74">2)</td>
  600 + <td class="style74">[<strong>servername</strong>]: This is the IP Address or the domain name of your server (for example, localhost).</td>
  601 + </tr>
  602 + <tr>
  603 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="15" /></td>
  604 + </tr>
  605 + <tr>
  606 + <td valign="top" class="style74">3)</td>
  607 + <td class="style74">[<strong>application</strong>]: Use "vod" unless you have changed the name of the folder.</td>
  608 + </tr>
  609 + <tr>
  610 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="15" /></td>
  611 + </tr>
  612 + <tr>
  613 + <td valign="top" class="style74">4)</td>
  614 + <td class="style74">[<strong>codecID</strong>]: </td>
  615 + </tr>
  616 + <tr>
  617 + <td colspan="2" valign="top" class="style24"><img src="images/spacer.gif" width="5" height="10" /></td>
  618 + </tr>
  619 + <tr>
  620 + <td valign="top" class="style62">&nbsp;</td>
  621 + <td class="style74"><blockquote>
  622 + <p> For H264/mov/F4V use "mp4:".<br />
  623 + For FLV files, do not specify a codecID.</p>
  624 + </blockquote></td>
  625 + </tr>
  626 + <tr>
  627 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="15" /></td>
  628 + </tr>
  629 + <tr>
  630 + <td valign="top" class="style74">5)</td>
  631 + <td class="style74">[<strong>streamname</strong>]: Use the name of your video file. </td>
  632 + </tr>
  633 + <tr>
  634 + <td colspan="2" class="style24"><img src="images/spacer.gif" width="5" height="10" /></td>
  635 + </tr>
  636 + <tr>
  637 + <td valign="top" class="style74">6)</td>
  638 + <td class="style74">[<strong>extension</strong>]: </td>
  639 + </tr>
  640 + <tr>
  641 + <td colspan="2" class="style24"><img src="images/spacer.gif" width="5" height="10" /></td>
  642 + </tr>
  643 + <tr>
  644 + <td valign="top" class="style62">&nbsp;</td>
  645 + <td class="style74"><blockquote>
  646 + <p>For F4V/MP4 files, specify a file extension.<br />
  647 + For MP3 and FLV, do not specify a file extension.</p>
  648 + </blockquote></td>
  649 + </tr>
  650 + <tr>
  651 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="15" /></td>
  652 + </tr>
  653 + <tr>
  654 + <td class="style62">&nbsp;</td>
  655 + <td class="style74"><strong>EXAMPLE URLS</strong></td>
  656 + </tr>
  657 + <tr>
  658 + <td class="style62">&nbsp;</td>
  659 + <td class="style74">rtmp://localhost/vod/mp4:mystream.f4v</td>
  660 + </tr>
  661 + <tr>
  662 + <td class="style62">&nbsp;</td>
  663 + <td class="style74">rtmpe://192.168.0.1/vod/myvideo</td>
  664 + </tr>
  665 + </table></td>
  666 + </tr>
  667 +
  668 + </table> <span class="style34"></span></td>
  669 + </tr>
  670 + <tr>
  671 + <td valign="top">&nbsp;</td>
  672 + </tr>
  673 +
  674 + </table></td>
  675 + <td width="30%"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  676 + <tr>
  677 + <td align="center" valign="middle"><img src="images/spacer.gif" width="20" height="50" /></td>
  678 + </tr>
  679 + </table></td>
  680 + <td width="38%" valign="top"><table width="100" border="0" align="center" cellpadding="0" cellspacing="0">
  681 + <tr>
  682 + <td valign="top" class="style67"><span class="style73">HTTP DYNAMIC STREAMING</span><br /></td>
  683 + </tr>
  684 + <tr>
  685 + <td valign="top" class="style75">from the folder: /webroot/vod</td>
  686 + </tr>
  687 + <tr>
  688 + <td valign="top"><img src="images/spacer.gif" width="40" height="5" border="0" /></td>
  689 + </tr>
  690 + <tr>
  691 + <td bgcolor="#666666"><img src="images/spacer.gif" width="490" height="3" /></td>
  692 + </tr>
  693 + <tr>
  694 + <td valign="top"><img src="images/spacer.gif" width="56" height="20" /></td>
  695 + </tr>
  696 + <tr>
  697 + <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  698 + <tr>
  699 + <td valign="top" class="style34"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  700 + <tr>
  701 + <td valign="top" class="style34"><table width="489" border="0" cellspacing="0" cellpadding="0">
  702 + <tr>
  703 + <td width="7%" valign="top" class="style74">1)</td>
  704 + <td width="93%" class="style74">[<strong>protocol</strong>]: HTTP</td>
  705 + </tr>
  706 + <tr>
  707 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="15" /></td>
  708 + </tr>
  709 + <tr>
  710 + <td valign="top" class="style74">2)</td>
  711 + <td class="style74">[<strong>server</strong>]: This is the IP Address or the domain name of your server (for example, localhost).</td>
  712 + </tr>
  713 + <tr>
  714 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="15" /></td>
  715 + </tr>
  716 + <tr>
  717 + <td valign="top" class="style74">3)</td>
  718 + <td class="style74">[<strong>application</strong>]: </td>
  719 + </tr>
  720 + <tr>
  721 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="15" /></td>
  722 + </tr>
  723 + <tr>
  724 + <td valign="top" class="style62">&nbsp;</td>
  725 + <td valign="top" class="style74">
  726 +<table width="100%" border="0" cellspacing="0" cellpadding="0">
  727 +<tr>
  728 +<td width="31%" valign="top" class="style74"><strong>For VOD</strong><br /> Flash: "hds-vod"</td>
  729 +<td width="69%" valign="top" class="style74"><strong>For LIVE</strong><br /> Flash: "/hds-live/livepkgr/_definst_/liveevent/"</td>
  730 +</tr></table>
  731 +</td>
  732 + </tr>
  733 + <tr>
  734 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="15" /></td>
  735 + </tr>
  736 + <tr>
  737 + <td valign="top" class="style74">4)</td>
  738 + <td class="style74">[<strong>codecID</strong>]: Not required</td>
  739 + </tr>
  740 + <tr>
  741 + <td colspan="2" valign="top" class="style62"><img src="images/spacer.gif" width="5" height="10" /></td>
  742 + </tr>
  743 + <tr>
  744 + <td valign="top" class="style74">5)</td>
  745 + <td class="style74">[<strong>streamname</strong>]: The name of the MP4/F4V media file</td>
  746 + </tr>
  747 + <tr>
  748 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="5" height="10" /></td>
  749 + </tr>
  750 + <tr>
  751 + <td valign="top" class="style74">6)</td>
  752 + <td class="style74">[<strong>extension</strong>]: The extension of the media file + &quot;.f4m. </td>
  753 + </tr>
  754 + <tr>
  755 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="5" /></td>
  756 + </tr>
  757 + <tr>
  758 + <td class="style62">&nbsp;</td>
  759 + <td class="style73">EXAMPLE VOD URL</td>
  760 + </tr>
  761 + <tr>
  762 + <td class="style62">&nbsp;</td>
  763 + <td class="style74">http://localhost/hds-vod/sample1_500kbps.f4v.f4m</td>
  764 + </tr>
  765 + <tr>
  766 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="5" /></td>
  767 + </tr>
  768 + <tr>
  769 + <td class="style62">&nbsp;</td>
  770 + <td class="style73">EXAMPLE LIVE URL</td>
  771 + </tr>
  772 + <tr>
  773 + <td class="style62">&nbsp;</td>
  774 + <td class="style74">
  775 + http://localhost/hds-live/livepkgr/_definst_/liveevent/livestream.f4m</td>
  776 + </tr>
  777 + <tr>
  778 + <td colspan="2" class="style62"><img src="images/spacer.gif" width="10" height="5" /></td>
  779 + </tr>
  780 + <tr>
  781 + <td class="style62">&nbsp;</td>
  782 + <td class="style73">EXAMPLE LIVE PUBLISHING URLS (IN FLASH MEDIA LIVE ENCODER)</td>
  783 + </tr>
  784 + <tr>
  785 + <td class="style62">&nbsp;</td>
  786 + <td class="style74">
  787 +a. <strong>FMS Server URL:</strong> rtmp://localhost/livepkgr<br />
  788 +&nbsp;&nbsp;&nbsp;&nbsp;<strong>Note:</strong> Publish the stream to the server over the RTMP protocol.<br />
  789 +c. <strong>Stream Name (Single Bitrate):</strong>
  790 +livestream?adbe-live-event=liveevent<br />
  791 +d. <strong>Stream Name (Adaptive Bitrate):</strong>
  792 +livestream%i?adbe-live-event=liveevent<br />
  793 +
  794 +</td>
  795 + </tr>
  796 + </table></td>
  797 + </tr>
  798 + <tr>
  799 + <td class="style34">&nbsp;</td>
  800 + </tr>
  801 + </table></td>
  802 + </tr>
  803 +
  804 + </table>
  805 + <span class="style34"></span></td>
  806 + </tr>
  807 +
  808 + </table></td>
  809 + </tr>
  810 +
  811 + <tr>
  812 + <td colspan="3">&nbsp;</td>
  813 + </tr>
  814 + </table>
  815 + <table width="1000" border="0" cellspacing="0" cellpadding="0">
  816 + <tr>
  817 + <td valign="bottom" class="style67"><span class="style1"><span class="style73">EMBED CODE</span><br />
  818 + </span></td>
  819 + </tr>
  820 + <tr>
  821 + <td valign="top" class="style67"><span class="style1"><img src="images/spacer.gif" width="40" height="5" /></span></td>
  822 + </tr>
  823 + <tr>
  824 + <td bgcolor="#666666" class="style67"><img src="images/spacer.gif" width="306" height="3" /></td>
  825 + </tr>
  826 + <tr>
  827 + <td class="style67">&nbsp;</td>
  828 + </tr>
  829 + <tr>
  830 + <td class="style74">Copy and paste the following code into an HTML file to embed the video player in a web page. Place the HTML page in the /webroot folder. <br />
  831 + TIP: If you enter a Stream URL above, this embed code updates automatically. </td>
  832 + </tr>
  833 + <tr>
  834 + <td><table width="1000" border="0" cellspacing="0" cellpadding="0">
  835 + <tr>
  836 + <td colspan="5">&nbsp;</td>
  837 + </tr>
  838 + <tr>
  839 + <td colspan="5" bgcolor="#FFFFFF" class="style3"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  840 + <tr>
  841 + <td width="1%"><img src="images/spacer.gif" width="15" height="5" /></td>
  842 + <td width="97%" class="style71" id="embedField" >
  843 + &lt;object width='640' height='377' id='StrobeMediaPlayback' name='StrobeMediaPlayback' type='application/x-shockwave-flash' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' &gt;&lt;param name='movie' value='swfs/StrobeMediaPlayback.swf' /&gt; &lt;param name='quality' value='high' /&gt; &lt;param name='bgcolor' value='#000000' /&gt; &lt;param name='allowfullscreen' value='true' /&gt; &lt;param name='flashvars' value='&amp;videoWidth=0&amp;videoHeight=0&amp;dsControl=manual&amp;dsSensitivity=100&amp;serverURL=rtmp://localhost/vod/mp4:sample1_500kbps.f4v&amp;streamType=vod&amp;autoStart=true'/&gt; &lt;embed src='swfs/StrobeMediaPlayback.swf' width='640' height='377' id='StrobeMediaPlayback' quality='high' bgcolor='#000000' name='StrobeMediaPlayback' allowfullscreen='true' pluginspage='http://www.adobe.com/go/getflashplayer 'flashvars='&amp;videoWidth=0&amp;videoHeight=0&amp;dsControl=manual&amp;dsSensitivity=100&amp;serverURL=rtmp://localhost/vod/mp4:sample1_500kbps.f4v&amp;streamType=vod&amp;autoStart=true' type='application/x-shockwave-flash'&gt; &lt;/embed&gt;&lt;/object&gt;</td>
  844 + <td width="2%"><img src="images/spacer.gif" width="10" height="5" /></td>
  845 + </tr>
  846 + </table>
  847 + <br /></td>
  848 + </tr>
  849 + <tr>
  850 + <td colspan="5">&nbsp;</td>
  851 + </tr>
  852 + </table></td>
  853 + </tr>
  854 + </table> </td>
  855 + </tr>
  856 + <tr>
  857 + <td width="1012" colspan="3" valign="top">&nbsp;</td>
  858 + </tr>
  859 +
  860 + </table></td>
  861 + </tr>
  862 +
  863 + <tr>
  864 + <td colspan="2" valign="top" bgcolor="#191919"><table width="1000" border="0" cellspacing="0" cellpadding="0">
  865 + <tr>
  866 + <td width="1000" height="24" valign="middle" background="images/footer_bar.gif"><table width="99%" border="0" cellspacing="0" cellpadding="0">
  867 + <tr>
  868 + <td width="1000"><div align="right" class="style81"><span class="style82">Copyright © 2011 Adobe Systems Incorporated.&nbsp; &nbsp;</span><span class="style83">All rights reserved.</span></div></td>
  869 + </tr>
  870 + </table></td>
  871 + </tr>
  872 + <tr>
  873 + <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  874 + <tr>
  875 + <td width="99%" valign="top"><div align="right" class="style22">
  876 + <div align="right"><span class="style23">Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy</span>.</div>
  877 + </div></td>
  878 + <td width="1%" valign="top"><img src="images/spacer.gif" width="13" height="10" /></td>
  879 + </tr>
  880 + </table></td>
  881 + </tr>
  882 + </table></td>
  883 + </tr>
  884 + <tr>
  885 + <td colspan="2" valign="top" bgcolor="#191919"><img src="images/spacer.gif" width="55" height="60" /></td>
  886 + </tr>
  887 +</table>
  888 +
  889 +
  890 +
  891 +<map name="Map" id="Map"><area shape="rect" coords="948,12,985,57" href="http://www.adobe.com" target="_blank" />
  892 +</map></body>
  893 +</html>
  1 +<manifest xmlns="http://ns.adobe.com/f4m/2.0">
  2 +
  3 +<media href="http://localhost/hds-vod/sample1_150kbps.f4v.f4m" bitrate="150"/>
  4 +
  5 +<media href="http://localhost/hds-vod/sample1_500kbps.f4v.f4m" bitrate="500"/>
  6 +
  7 +<media href="http://localhost/hds-vod/sample1_700kbps.f4v.f4m" bitrate="700"/>
  8 +
  9 +<media href="http://localhost/hds-vod/sample1_1000kbps.f4v.f4m" bitrate="1000"/>
  10 +
  11 +<media href="http://localhost/hds-vod/sample1_1500kbps.f4v.f4m" bitrate="1500"/>
  12 +
  13 +</manifest>
不能预览此文件类型
  1 +<manifest xmlns="http://ns.adobe.com/f4m/1.0">
  2 +
  3 +<id>Dynamic Streaming</id>
  4 +
  5 +<baseURL>rtmp://localhost/vod/</baseURL>
  6 +
  7 +<mimeType>video/mp4</mimeType>
  8 +
  9 +<streamType>recorded</streamType>
  10 +
  11 +<media url="mp4:sample1_150kbps.f4v" bitrate="150"/>
  12 +
  13 +<media url="mp4:sample1_500kbps.f4v" bitrate="500"/>
  14 +
  15 +<media url="mp4:sample1_700kbps.f4v" bitrate="700"/>
  16 +
  17 +<media url="mp4:sample1_1000kbps.f4v" bitrate="1000"/>
  18 +
  19 +<media url="mp4:sample1_1500kbps.f4v" bitrate="1500"/>
  20 +
  21 +</manifest>
  1 +/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
  2 + is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
  3 +*/
  4 +
  5 +var swfobject = function() {
  6 +
  7 + var UNDEF = "undefined",
  8 + OBJECT = "object",
  9 + SHOCKWAVE_FLASH = "Shockwave Flash",
  10 + SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
  11 + FLASH_MIME_TYPE = "application/x-shockwave-flash",
  12 + EXPRESS_INSTALL_ID = "SWFObjectExprInst",
  13 + ON_READY_STATE_CHANGE = "onreadystatechange",
  14 +
  15 + win = window,
  16 + doc = document,
  17 + nav = navigator,
  18 +
  19 + plugin = false,
  20 + domLoadFnArr = [main],
  21 + regObjArr = [],
  22 + objIdArr = [],
  23 + listenersArr = [],
  24 + storedAltContent,
  25 + storedAltContentId,
  26 + storedCallbackFn,
  27 + storedCallbackObj,
  28 + isDomLoaded = false,
  29 + isExpressInstallActive = false,
  30 + dynamicStylesheet,
  31 + dynamicStylesheetMedia,
  32 + autoHideShow = true,
  33 +
  34 + /* Centralized function for browser feature detection
  35 + - User agent string detection is only used when no good alternative is possible
  36 + - Is executed directly for optimal performance
  37 + */
  38 + ua = function() {
  39 + var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
  40 + u = nav.userAgent.toLowerCase(),
  41 + p = nav.platform.toLowerCase(),
  42 + windows = p ? /win/.test(p) : /win/.test(u),
  43 + mac = p ? /mac/.test(p) : /mac/.test(u),
  44 + webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
  45 + ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
  46 + playerVersion = [0,0,0],
  47 + d = null;
  48 + if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
  49 + d = nav.plugins[SHOCKWAVE_FLASH].description;
  50 + if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
  51 + plugin = true;
  52 + ie = false; // cascaded feature detection for Internet Explorer
  53 + d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
  54 + playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
  55 + playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
  56 + playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
  57 + }
  58 + }
  59 + else if (typeof win.ActiveXObject != UNDEF) {
  60 + try {
  61 + var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
  62 + if (a) { // a will return null when ActiveX is disabled
  63 + d = a.GetVariable("$version");
  64 + if (d) {
  65 + ie = true; // cascaded feature detection for Internet Explorer
  66 + d = d.split(" ")[1].split(",");
  67 + playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
  68 + }
  69 + }
  70 + }
  71 + catch(e) {}
  72 + }
  73 + return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
  74 + }(),
  75 +
  76 + /* Cross-browser onDomLoad
  77 + - Will fire an event as soon as the DOM of a web page is loaded
  78 + - Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
  79 + - Regular onload serves as fallback
  80 + */
  81 + onDomLoad = function() {
  82 + if (!ua.w3) { return; }
  83 + if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
  84 + callDomLoadFunctions();
  85 + }
  86 + if (!isDomLoaded) {
  87 + if (typeof doc.addEventListener != UNDEF) {
  88 + doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
  89 + }
  90 + if (ua.ie && ua.win) {
  91 + doc.attachEvent(ON_READY_STATE_CHANGE, function() {
  92 + if (doc.readyState == "complete") {
  93 + doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
  94 + callDomLoadFunctions();
  95 + }
  96 + });
  97 + if (win == top) { // if not inside an iframe
  98 + (function(){
  99 + if (isDomLoaded) { return; }
  100 + try {
  101 + doc.documentElement.doScroll("left");
  102 + }
  103 + catch(e) {
  104 + setTimeout(arguments.callee, 0);
  105 + return;
  106 + }
  107 + callDomLoadFunctions();
  108 + })();
  109 + }
  110 + }
  111 + if (ua.wk) {
  112 + (function(){
  113 + if (isDomLoaded) { return; }
  114 + if (!/loaded|complete/.test(doc.readyState)) {
  115 + setTimeout(arguments.callee, 0);
  116 + return;
  117 + }
  118 + callDomLoadFunctions();
  119 + })();
  120 + }
  121 + addLoadEvent(callDomLoadFunctions);
  122 + }
  123 + }();
  124 +
  125 + function callDomLoadFunctions() {
  126 + if (isDomLoaded) { return; }
  127 + try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
  128 + var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
  129 + t.parentNode.removeChild(t);
  130 + }
  131 + catch (e) { return; }
  132 + isDomLoaded = true;
  133 + var dl = domLoadFnArr.length;
  134 + for (var i = 0; i < dl; i++) {
  135 + domLoadFnArr[i]();
  136 + }
  137 + }
  138 +
  139 + function addDomLoadEvent(fn) {
  140 + if (isDomLoaded) {
  141 + fn();
  142 + }
  143 + else {
  144 + domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
  145 + }
  146 + }
  147 +
  148 + /* Cross-browser onload
  149 + - Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
  150 + - Will fire an event as soon as a web page including all of its assets are loaded
  151 + */
  152 + function addLoadEvent(fn) {
  153 + if (typeof win.addEventListener != UNDEF) {
  154 + win.addEventListener("load", fn, false);
  155 + }
  156 + else if (typeof doc.addEventListener != UNDEF) {
  157 + doc.addEventListener("load", fn, false);
  158 + }
  159 + else if (typeof win.attachEvent != UNDEF) {
  160 + addListener(win, "onload", fn);
  161 + }
  162 + else if (typeof win.onload == "function") {
  163 + var fnOld = win.onload;
  164 + win.onload = function() {
  165 + fnOld();
  166 + fn();
  167 + };
  168 + }
  169 + else {
  170 + win.onload = fn;
  171 + }
  172 + }
  173 +
  174 + /* Main function
  175 + - Will preferably execute onDomLoad, otherwise onload (as a fallback)
  176 + */
  177 + function main() {
  178 + if (plugin) {
  179 + testPlayerVersion();
  180 + }
  181 + else {
  182 + matchVersions();
  183 + }
  184 + }
  185 +
  186 + /* Detect the Flash Player version for non-Internet Explorer browsers
  187 + - Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
  188 + a. Both release and build numbers can be detected
  189 + b. Avoid wrong descriptions by corrupt installers provided by Adobe
  190 + c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
  191 + - Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
  192 + */
  193 + function testPlayerVersion() {
  194 + var b = doc.getElementsByTagName("body")[0];
  195 + var o = createElement(OBJECT);
  196 + o.setAttribute("type", FLASH_MIME_TYPE);
  197 + var t = b.appendChild(o);
  198 + if (t) {
  199 + var counter = 0;
  200 + (function(){
  201 + if (typeof t.GetVariable != UNDEF) {
  202 + var d = t.GetVariable("$version");
  203 + if (d) {
  204 + d = d.split(" ")[1].split(",");
  205 + ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
  206 + }
  207 + }
  208 + else if (counter < 10) {
  209 + counter++;
  210 + setTimeout(arguments.callee, 10);
  211 + return;
  212 + }
  213 + b.removeChild(o);
  214 + t = null;
  215 + matchVersions();
  216 + })();
  217 + }
  218 + else {
  219 + matchVersions();
  220 + }
  221 + }
  222 +
  223 + /* Perform Flash Player and SWF version matching; static publishing only
  224 + */
  225 + function matchVersions() {
  226 + var rl = regObjArr.length;
  227 + if (rl > 0) {
  228 + for (var i = 0; i < rl; i++) { // for each registered object element
  229 + var id = regObjArr[i].id;
  230 + var cb = regObjArr[i].callbackFn;
  231 + var cbObj = {success:false, id:id};
  232 + if (ua.pv[0] > 0) {
  233 + var obj = getElementById(id);
  234 + if (obj) {
  235 + if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
  236 + setVisibility(id, true);
  237 + if (cb) {
  238 + cbObj.success = true;
  239 + cbObj.ref = getObjectById(id);
  240 + cb(cbObj);
  241 + }
  242 + }
  243 + else if (regObjArr[i].expressInstall && canExpressInstall()) { // show the Adobe Express Install dialog if set by the web page author and if supported
  244 + var att = {};
  245 + att.data = regObjArr[i].expressInstall;
  246 + att.width = obj.getAttribute("width") || "0";
  247 + att.height = obj.getAttribute("height") || "0";
  248 + if (obj.getAttribute("class")) { att.styleclass = obj.getAttribute("class"); }
  249 + if (obj.getAttribute("align")) { att.align = obj.getAttribute("align"); }
  250 + // parse HTML object param element's name-value pairs
  251 + var par = {};
  252 + var p = obj.getElementsByTagName("param");
  253 + var pl = p.length;
  254 + for (var j = 0; j < pl; j++) {
  255 + if (p[j].getAttribute("name").toLowerCase() != "movie") {
  256 + par[p[j].getAttribute("name")] = p[j].getAttribute("value");
  257 + }
  258 + }
  259 + showExpressInstall(att, par, id, cb);
  260 + }
  261 + else { // Flash Player and SWF version mismatch or an older Webkit engine that ignores the HTML object element's nested param elements: display alternative content instead of SWF
  262 + displayAltContent(obj);
  263 + if (cb) { cb(cbObj); }
  264 + }
  265 + }
  266 + }
  267 + else { // if no Flash Player is installed or the fp version cannot be detected we let the HTML object element do its job (either show a SWF or alternative content)
  268 + setVisibility(id, true);
  269 + if (cb) {
  270 + var o = getObjectById(id); // test whether there is an HTML object element or not
  271 + if (o && typeof o.SetVariable != UNDEF) {
  272 + cbObj.success = true;
  273 + cbObj.ref = o;
  274 + }
  275 + cb(cbObj);
  276 + }
  277 + }
  278 + }
  279 + }
  280 + }
  281 +
  282 + function getObjectById(objectIdStr) {
  283 + var r = null;
  284 + var o = getElementById(objectIdStr);
  285 + if (o && o.nodeName == "OBJECT") {
  286 + if (typeof o.SetVariable != UNDEF) {
  287 + r = o;
  288 + }
  289 + else {
  290 + var n = o.getElementsByTagName(OBJECT)[0];
  291 + if (n) {
  292 + r = n;
  293 + }
  294 + }
  295 + }
  296 + return r;
  297 + }
  298 +
  299 + /* Requirements for Adobe Express Install
  300 + - only one instance can be active at a time
  301 + - fp 6.0.65 or higher
  302 + - Win/Mac OS only
  303 + - no Webkit engines older than version 312
  304 + */
  305 + function canExpressInstall() {
  306 + return !isExpressInstallActive && hasPlayerVersion("6.0.65") && (ua.win || ua.mac) && !(ua.wk && ua.wk < 312);
  307 + }
  308 +
  309 + /* Show the Adobe Express Install dialog
  310 + - Reference: http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=6a253b75
  311 + */
  312 + function showExpressInstall(att, par, replaceElemIdStr, callbackFn) {
  313 + isExpressInstallActive = true;
  314 + storedCallbackFn = callbackFn || null;
  315 + storedCallbackObj = {success:false, id:replaceElemIdStr};
  316 + var obj = getElementById(replaceElemIdStr);
  317 + if (obj) {
  318 + if (obj.nodeName == "OBJECT") { // static publishing
  319 + storedAltContent = abstractAltContent(obj);
  320 + storedAltContentId = null;
  321 + }
  322 + else { // dynamic publishing
  323 + storedAltContent = obj;
  324 + storedAltContentId = replaceElemIdStr;
  325 + }
  326 + att.id = EXPRESS_INSTALL_ID;
  327 + if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; }
  328 + if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; }
  329 + doc.title = doc.title.slice(0, 47) + " - Flash Player Installation";
  330 + var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn",
  331 + fv = "MMredirectURL=" + encodeURI(window.location).toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title;
  332 + if (typeof par.flashvars != UNDEF) {
  333 + par.flashvars += "&" + fv;
  334 + }
  335 + else {
  336 + par.flashvars = fv;
  337 + }
  338 + // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
  339 + // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
  340 + if (ua.ie && ua.win && obj.readyState != 4) {
  341 + var newObj = createElement("div");
  342 + replaceElemIdStr += "SWFObjectNew";
  343 + newObj.setAttribute("id", replaceElemIdStr);
  344 + obj.parentNode.insertBefore(newObj, obj); // insert placeholder div that will be replaced by the object element that loads expressinstall.swf
  345 + obj.style.display = "none";
  346 + (function(){
  347 + if (obj.readyState == 4) {
  348 + obj.parentNode.removeChild(obj);
  349 + }
  350 + else {
  351 + setTimeout(arguments.callee, 10);
  352 + }
  353 + })();
  354 + }
  355 + createSWF(att, par, replaceElemIdStr);
  356 + }
  357 + }
  358 +
  359 + /* Functions to abstract and display alternative content
  360 + */
  361 + function displayAltContent(obj) {
  362 + if (ua.ie && ua.win && obj.readyState != 4) {
  363 + // IE only: when a SWF is loading (AND: not available in cache) wait for the readyState of the object element to become 4 before removing it,
  364 + // because you cannot properly cancel a loading SWF file without breaking browser load references, also obj.onreadystatechange doesn't work
  365 + var el = createElement("div");
  366 + obj.parentNode.insertBefore(el, obj); // insert placeholder div that will be replaced by the alternative content
  367 + el.parentNode.replaceChild(abstractAltContent(obj), el);
  368 + obj.style.display = "none";
  369 + (function(){
  370 + if (obj.readyState == 4) {
  371 + obj.parentNode.removeChild(obj);
  372 + }
  373 + else {
  374 + setTimeout(arguments.callee, 10);
  375 + }
  376 + })();
  377 + }
  378 + else {
  379 + obj.parentNode.replaceChild(abstractAltContent(obj), obj);
  380 + }
  381 + }
  382 +
  383 + function abstractAltContent(obj) {
  384 + var ac = createElement("div");
  385 + if (ua.win && ua.ie) {
  386 + ac.innerHTML = obj.innerHTML;
  387 + }
  388 + else {
  389 + var nestedObj = obj.getElementsByTagName(OBJECT)[0];
  390 + if (nestedObj) {
  391 + var c = nestedObj.childNodes;
  392 + if (c) {
  393 + var cl = c.length;
  394 + for (var i = 0; i < cl; i++) {
  395 + if (!(c[i].nodeType == 1 && c[i].nodeName == "PARAM") && !(c[i].nodeType == 8)) {
  396 + ac.appendChild(c[i].cloneNode(true));
  397 + }
  398 + }
  399 + }
  400 + }
  401 + }
  402 + return ac;
  403 + }
  404 +
  405 + /* Cross-browser dynamic SWF creation
  406 + */
  407 + function createSWF(attObj, parObj, id) {
  408 + var r, el = getElementById(id);
  409 + if (ua.wk && ua.wk < 312) { return r; }
  410 + if (el) {
  411 + if (typeof attObj.id == UNDEF) { // if no 'id' is defined for the object element, it will inherit the 'id' from the alternative content
  412 + attObj.id = id;
  413 + }
  414 + if (ua.ie && ua.win) { // Internet Explorer + the HTML object element + W3C DOM methods do not combine: fall back to outerHTML
  415 + var att = "";
  416 + for (var i in attObj) {
  417 + if (attObj[i] != Object.prototype[i]) { // filter out prototype additions from other potential libraries
  418 + if (i.toLowerCase() == "data") {
  419 + parObj.movie = attObj[i];
  420 + }
  421 + else if (i.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
  422 + att += ' class="' + attObj[i] + '"';
  423 + }
  424 + else if (i.toLowerCase() != "classid") {
  425 + att += ' ' + i + '="' + attObj[i] + '"';
  426 + }
  427 + }
  428 + }
  429 + var par = "";
  430 + for (var j in parObj) {
  431 + if (parObj[j] != Object.prototype[j]) { // filter out prototype additions from other potential libraries
  432 + par += '<param name="' + j + '" value="' + parObj[j] + '" />';
  433 + }
  434 + }
  435 + el.outerHTML = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + att + '>' + par + '</object>';
  436 + objIdArr[objIdArr.length] = attObj.id; // stored to fix object 'leaks' on unload (dynamic publishing only)
  437 + r = getElementById(attObj.id);
  438 + }
  439 + else { // well-behaving browsers
  440 + var o = createElement(OBJECT);
  441 + o.setAttribute("type", FLASH_MIME_TYPE);
  442 + for (var m in attObj) {
  443 + if (attObj[m] != Object.prototype[m]) { // filter out prototype additions from other potential libraries
  444 + if (m.toLowerCase() == "styleclass") { // 'class' is an ECMA4 reserved keyword
  445 + o.setAttribute("class", attObj[m]);
  446 + }
  447 + else if (m.toLowerCase() != "classid") { // filter out IE specific attribute
  448 + o.setAttribute(m, attObj[m]);
  449 + }
  450 + }
  451 + }
  452 + for (var n in parObj) {
  453 + if (parObj[n] != Object.prototype[n] && n.toLowerCase() != "movie") { // filter out prototype additions from other potential libraries and IE specific param element
  454 + createObjParam(o, n, parObj[n]);
  455 + }
  456 + }
  457 + el.parentNode.replaceChild(o, el);
  458 + r = o;
  459 + }
  460 + }
  461 + return r;
  462 + }
  463 +
  464 + function createObjParam(el, pName, pValue) {
  465 + var p = createElement("param");
  466 + p.setAttribute("name", pName);
  467 + p.setAttribute("value", pValue);
  468 + el.appendChild(p);
  469 + }
  470 +
  471 + /* Cross-browser SWF removal
  472 + - Especially needed to safely and completely remove a SWF in Internet Explorer
  473 + */
  474 + function removeSWF(id) {
  475 + var obj = getElementById(id);
  476 + if (obj && obj.nodeName == "OBJECT") {
  477 + if (ua.ie && ua.win) {
  478 + obj.style.display = "none";
  479 + (function(){
  480 + if (obj.readyState == 4) {
  481 + removeObjectInIE(id);
  482 + }
  483 + else {
  484 + setTimeout(arguments.callee, 10);
  485 + }
  486 + })();
  487 + }
  488 + else {
  489 + obj.parentNode.removeChild(obj);
  490 + }
  491 + }
  492 + }
  493 +
  494 + function removeObjectInIE(id) {
  495 + var obj = getElementById(id);
  496 + if (obj) {
  497 + for (var i in obj) {
  498 + if (typeof obj[i] == "function") {
  499 + obj[i] = null;
  500 + }
  501 + }
  502 + obj.parentNode.removeChild(obj);
  503 + }
  504 + }
  505 +
  506 + /* Functions to optimize JavaScript compression
  507 + */
  508 + function getElementById(id) {
  509 + var el = null;
  510 + try {
  511 + el = doc.getElementById(id);
  512 + }
  513 + catch (e) {}
  514 + return el;
  515 + }
  516 +
  517 + function createElement(el) {
  518 + return doc.createElement(el);
  519 + }
  520 +
  521 + /* Updated attachEvent function for Internet Explorer
  522 + - Stores attachEvent information in an Array, so on unload the detachEvent functions can be called to avoid memory leaks
  523 + */
  524 + function addListener(target, eventType, fn) {
  525 + target.attachEvent(eventType, fn);
  526 + listenersArr[listenersArr.length] = [target, eventType, fn];
  527 + }
  528 +
  529 + /* Flash Player and SWF content version matching
  530 + */
  531 + function hasPlayerVersion(rv) {
  532 + var pv = ua.pv, v = rv.split(".");
  533 + v[0] = parseInt(v[0], 10);
  534 + v[1] = parseInt(v[1], 10) || 0; // supports short notation, e.g. "9" instead of "9.0.0"
  535 + v[2] = parseInt(v[2], 10) || 0;
  536 + return (pv[0] > v[0] || (pv[0] == v[0] && pv[1] > v[1]) || (pv[0] == v[0] && pv[1] == v[1] && pv[2] >= v[2])) ? true : false;
  537 + }
  538 +
  539 + /* Cross-browser dynamic CSS creation
  540 + - Based on Bobby van der Sluis' solution: http://www.bobbyvandersluis.com/articles/dynamicCSS.php
  541 + */
  542 + function createCSS(sel, decl, media, newStyle) {
  543 + if (ua.ie && ua.mac) { return; }
  544 + var h = doc.getElementsByTagName("head")[0];
  545 + if (!h) { return; } // to also support badly authored HTML pages that lack a head element
  546 + var m = (media && typeof media == "string") ? media : "screen";
  547 + if (newStyle) {
  548 + dynamicStylesheet = null;
  549 + dynamicStylesheetMedia = null;
  550 + }
  551 + if (!dynamicStylesheet || dynamicStylesheetMedia != m) {
  552 + // create dynamic stylesheet + get a global reference to it
  553 + var s = createElement("style");
  554 + s.setAttribute("type", "text/css");
  555 + s.setAttribute("media", m);
  556 + dynamicStylesheet = h.appendChild(s);
  557 + if (ua.ie && ua.win && typeof doc.styleSheets != UNDEF && doc.styleSheets.length > 0) {
  558 + dynamicStylesheet = doc.styleSheets[doc.styleSheets.length - 1];
  559 + }
  560 + dynamicStylesheetMedia = m;
  561 + }
  562 + // add style rule
  563 + if (ua.ie && ua.win) {
  564 + if (dynamicStylesheet && typeof dynamicStylesheet.addRule == OBJECT) {
  565 + dynamicStylesheet.addRule(sel, decl);
  566 + }
  567 + }
  568 + else {
  569 + if (dynamicStylesheet && typeof doc.createTextNode != UNDEF) {
  570 + dynamicStylesheet.appendChild(doc.createTextNode(sel + " {" + decl + "}"));
  571 + }
  572 + }
  573 + }
  574 +
  575 + function setVisibility(id, isVisible) {
  576 + if (!autoHideShow) { return; }
  577 + var v = isVisible ? "visible" : "hidden";
  578 + if (isDomLoaded && getElementById(id)) {
  579 + getElementById(id).style.visibility = v;
  580 + }
  581 + else {
  582 + createCSS("#" + id, "visibility:" + v);
  583 + }
  584 + }
  585 +
  586 + /* Filter to avoid XSS attacks
  587 + */
  588 + function urlEncodeIfNecessary(s) {
  589 + var regex = /[\\\"<>\.;]/;
  590 + var hasBadChars = regex.exec(s) != null;
  591 + return hasBadChars && typeof encodeURIComponent != UNDEF ? encodeURIComponent(s) : s;
  592 + }
  593 +
  594 + /* Release memory to avoid memory leaks caused by closures, fix hanging audio/video threads and force open sockets/NetConnections to disconnect (Internet Explorer only)
  595 + */
  596 + var cleanup = function() {
  597 + if (ua.ie && ua.win) {
  598 + window.attachEvent("onunload", function() {
  599 + // remove listeners to avoid memory leaks
  600 + var ll = listenersArr.length;
  601 + for (var i = 0; i < ll; i++) {
  602 + listenersArr[i][0].detachEvent(listenersArr[i][1], listenersArr[i][2]);
  603 + }
  604 + // cleanup dynamically embedded objects to fix audio/video threads and force open sockets and NetConnections to disconnect
  605 + var il = objIdArr.length;
  606 + for (var j = 0; j < il; j++) {
  607 + removeSWF(objIdArr[j]);
  608 + }
  609 + // cleanup library's main closures to avoid memory leaks
  610 + for (var k in ua) {
  611 + ua[k] = null;
  612 + }
  613 + ua = null;
  614 + for (var l in swfobject) {
  615 + swfobject[l] = null;
  616 + }
  617 + swfobject = null;
  618 + });
  619 + }
  620 + }();
  621 +
  622 + return {
  623 + /* Public API
  624 + - Reference: http://code.google.com/p/swfobject/wiki/documentation
  625 + */
  626 + registerObject: function(objectIdStr, swfVersionStr, xiSwfUrlStr, callbackFn) {
  627 + if (ua.w3 && objectIdStr && swfVersionStr) {
  628 + var regObj = {};
  629 + regObj.id = objectIdStr;
  630 + regObj.swfVersion = swfVersionStr;
  631 + regObj.expressInstall = xiSwfUrlStr;
  632 + regObj.callbackFn = callbackFn;
  633 + regObjArr[regObjArr.length] = regObj;
  634 + setVisibility(objectIdStr, false);
  635 + }
  636 + else if (callbackFn) {
  637 + callbackFn({success:false, id:objectIdStr});
  638 + }
  639 + },
  640 +
  641 + getObjectById: function(objectIdStr) {
  642 + if (ua.w3) {
  643 + return getObjectById(objectIdStr);
  644 + }
  645 + },
  646 +
  647 + embedSWF: function(swfUrlStr, replaceElemIdStr, widthStr, heightStr, swfVersionStr, xiSwfUrlStr, flashvarsObj, parObj, attObj, callbackFn) {
  648 + var callbackObj = {success:false, id:replaceElemIdStr};
  649 + if (ua.w3 && !(ua.wk && ua.wk < 312) && swfUrlStr && replaceElemIdStr && widthStr && heightStr && swfVersionStr) {
  650 + setVisibility(replaceElemIdStr, false);
  651 + addDomLoadEvent(function() {
  652 + widthStr += ""; // auto-convert to string
  653 + heightStr += "";
  654 + var att = {};
  655 + if (attObj && typeof attObj === OBJECT) {
  656 + for (var i in attObj) { // copy object to avoid the use of references, because web authors often reuse attObj for multiple SWFs
  657 + att[i] = attObj[i];
  658 + }
  659 + }
  660 + att.data = swfUrlStr;
  661 + att.width = widthStr;
  662 + att.height = heightStr;
  663 + var par = {};
  664 + if (parObj && typeof parObj === OBJECT) {
  665 + for (var j in parObj) { // copy object to avoid the use of references, because web authors often reuse parObj for multiple SWFs
  666 + par[j] = parObj[j];
  667 + }
  668 + }
  669 + if (flashvarsObj && typeof flashvarsObj === OBJECT) {
  670 + for (var k in flashvarsObj) { // copy object to avoid the use of references, because web authors often reuse flashvarsObj for multiple SWFs
  671 + if (typeof par.flashvars != UNDEF) {
  672 + par.flashvars += "&" + k + "=" + flashvarsObj[k];
  673 + }
  674 + else {
  675 + par.flashvars = k + "=" + flashvarsObj[k];
  676 + }
  677 + }
  678 + }
  679 + if (hasPlayerVersion(swfVersionStr)) { // create SWF
  680 + var obj = createSWF(att, par, replaceElemIdStr);
  681 + if (att.id == replaceElemIdStr) {
  682 + setVisibility(replaceElemIdStr, true);
  683 + }
  684 + callbackObj.success = true;
  685 + callbackObj.ref = obj;
  686 + }
  687 + else if (xiSwfUrlStr && canExpressInstall()) { // show Adobe Express Install
  688 + att.data = xiSwfUrlStr;
  689 + showExpressInstall(att, par, replaceElemIdStr, callbackFn);
  690 + return;
  691 + }
  692 + else { // show alternative content
  693 + setVisibility(replaceElemIdStr, true);
  694 + }
  695 + if (callbackFn) { callbackFn(callbackObj); }
  696 + });
  697 + }
  698 + else if (callbackFn) { callbackFn(callbackObj); }
  699 + },
  700 +
  701 + switchOffAutoHideShow: function() {
  702 + autoHideShow = false;
  703 + },
  704 +
  705 + ua: ua,
  706 +
  707 + getFlashPlayerVersion: function() {
  708 + return { major:ua.pv[0], minor:ua.pv[1], release:ua.pv[2] };
  709 + },
  710 +
  711 + hasFlashPlayerVersion: hasPlayerVersion,
  712 +
  713 + createSWF: function(attObj, parObj, replaceElemIdStr) {
  714 + if (ua.w3) {
  715 + return createSWF(attObj, parObj, replaceElemIdStr);
  716 + }
  717 + else {
  718 + return undefined;
  719 + }
  720 + },
  721 +
  722 + showExpressInstall: function(att, par, replaceElemIdStr, callbackFn) {
  723 + if (ua.w3 && canExpressInstall()) {
  724 + showExpressInstall(att, par, replaceElemIdStr, callbackFn);
  725 + }
  726 + },
  727 +
  728 + removeSWF: function(objElemIdStr) {
  729 + if (ua.w3) {
  730 + removeSWF(objElemIdStr);
  731 + }
  732 + },
  733 +
  734 + createCSS: function(selStr, declStr, mediaStr, newStyleBoolean) {
  735 + if (ua.w3) {
  736 + createCSS(selStr, declStr, mediaStr, newStyleBoolean);
  737 + }
  738 + },
  739 +
  740 + addDomLoadEvent: addDomLoadEvent,
  741 +
  742 + addLoadEvent: addLoadEvent,
  743 +
  744 + getQueryParamValue: function(param) {
  745 + var q = doc.location.search || doc.location.hash;
  746 + if (q) {
  747 + if (/\?/.test(q)) { q = q.split("?")[1]; } // strip question mark
  748 + if (param == null) {
  749 + return urlEncodeIfNecessary(q);
  750 + }
  751 + var pairs = q.split("&");
  752 + for (var i = 0; i < pairs.length; i++) {
  753 + if (pairs[i].substring(0, pairs[i].indexOf("=")) == param) {
  754 + return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=") + 1)));
  755 + }
  756 + }
  757 + }
  758 + return "";
  759 + },
  760 +
  761 + // For internal usage only
  762 + expressInstallCallback: function() {
  763 + if (isExpressInstallActive) {
  764 + var obj = getElementById(EXPRESS_INSTALL_ID);
  765 + if (obj && storedAltContent) {
  766 + obj.parentNode.replaceChild(storedAltContent, obj);
  767 + if (storedAltContentId) {
  768 + setVisibility(storedAltContentId, true);
  769 + if (ua.ie && ua.win) { storedAltContent.style.display = "block"; }
  770 + }
  771 + if (storedCallbackFn) { storedCallbackFn(storedCallbackObj); }
  772 + }
  773 + isExpressInstallActive = false;
  774 + }
  775 + }
  776 + };
  777 +}();
不能预览此文件类型
不能预览此文件类型