我需要关闭WMP(Window Media Player)自动显示在flash上。代码如下。
此代码显示的WMP主页:
<script type="text/javascript">
$(document).ready(function(){
var flashvars = {
shelfXmlData : "/eLibNida/shelf/categoryInClientListXML/${clientId}",
coverXmlData : "/eLibNida/shelf/coverBookInCategoryXML",
saverXmlData : "/eLibNida/shelf/screensaverInClientXML/?clientId=${clientId}",
secureURL:"http://elibrary4.nida.ac.th/Media/crossdomain.xml"
};
var params = {
menu: "false",
allowDomain : "always",
allowscriptaccess: "always",
allowFullScreen: "true",
wmode:"opaque"
};
var attribute = {};
$.post("/eLibNida/shelf/themeInClient/${clientId}",function(theme){
swfobject.embedSWF("${createLinkTo(dir:'swf',file:'digitalBookShelf"+theme+".swf')}","flash","1920","1080","9.0.0","${createLinkTo(dir:'swf',file:'expressInstall.swf')}",
flashvars, params, attribute);
})
});
通过以下代码显示WMP:
<div id="media" style="margin-left:auto;margin-right:auto"></div>
<script type="text/javascript">
$(document).ready(function(){
var thisType = "${contentType}";
var opacLink = "${opcLink}";
if(thisType == "WindowClip"){
wmv = '<OBJECT ID="MediaPlayer" WIDTH="1280" HEIGHT="960"
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..."
TYPE="application/x-oleobject">';
wmv += '<PARAM NAME="FileName" VALUE="${value}">';
wmv += '<PARAM name="autostart" VALUE="true">';
wmv += '<PARAM name="ShowControls" VALUE="true">';
wmv += '<PARAM name="ShowStatusBar" value="false">';
wmv += '<PARAM name="ShowDisplay" VALUE="false">';
wmv += '<PARAM name="stretchtofit" VALUE="true">';
wmv += '<PARAM name="loop" VALUE="true">';
wmv += '<EMBED TYPE="application/x-ms-wmp" SRC="${value}"
NAME="MediaPlayer"WIDTH="1280" HEIGHT="960" ShowControls="true"
ShowStatusBar="false"ShowDisplay="false" autostart="true"
stretchtofit="true" loop="true"</EMBED>';
wmv += '</OBJECT>';
$("#media").prepend(wmv).width(1280).height(960).css({"margin-top":"50px"});
如何关闭它?