99 lines
4.6 KiB
JavaScript
99 lines
4.6 KiB
JavaScript
|
|
|
||
|
|
function WriteFlash(w,h,path)
|
||
|
|
{
|
||
|
|
var txt;
|
||
|
|
if(path.indexOf('.swf')!=-1){
|
||
|
|
|
||
|
|
txt="<object classid='clsid:D27CDB6E-AE6D-11CF-96B8-444553540000' id='obj1' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'";
|
||
|
|
if(h==0){
|
||
|
|
txt+="border='0' width='" + w + "' VIEWASTEXT>";
|
||
|
|
}else{
|
||
|
|
txt+="border='0' width='" + w + "' height='" + h + "' VIEWASTEXT>";
|
||
|
|
}
|
||
|
|
|
||
|
|
txt+="<param name='movie' value='" + path + "'>";
|
||
|
|
txt+="<param name='quality' value='High'>";
|
||
|
|
txt += "<embed src='" + path + "' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' type='application/x-shockwave-flash' name='obj1' width='" + w + "'";
|
||
|
|
if(h==0){
|
||
|
|
txt+="></object>";
|
||
|
|
}else{
|
||
|
|
txt+=" height='" + h + "'></object>";
|
||
|
|
}
|
||
|
|
|
||
|
|
}else if(path.indexOf('.flv')!=-1){
|
||
|
|
txt+="<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=../swf/player.swf?vcastr_title=" + title;
|
||
|
|
txt+="&vcastr_file=" + path;
|
||
|
|
if(h==0){
|
||
|
|
txt+=" width=" + w + " ";
|
||
|
|
}else{
|
||
|
|
txt+=" width=" + w + " height=" + h;
|
||
|
|
}
|
||
|
|
txt+=" type=application/x-shockwave-flash quality=\"high\" wmode=\"transparent\" showMovieInfo=\"0\"></EMBED>";
|
||
|
|
}else if(path==""){
|
||
|
|
txt="";
|
||
|
|
}else{
|
||
|
|
if(h==0){
|
||
|
|
txt="<img src='" + path + "' width='" + w + "' border='0'>";
|
||
|
|
}else{
|
||
|
|
txt="<img src='" + path + "' width='" + w + "' height='" + h + "' border='0'>";
|
||
|
|
}
|
||
|
|
}
|
||
|
|
document.write(txt);
|
||
|
|
}
|
||
|
|
|
||
|
|
function WriteFlash2(w,h,path)
|
||
|
|
{
|
||
|
|
var txt;
|
||
|
|
if(path.indexOf('.swf')!=-1){
|
||
|
|
txt="<object classid='clsid:D27CDB6E-AE6D-11CF-96B8-444553540000' id='obj1' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'";
|
||
|
|
txt+="border='0' width='" + w + "' height='" + h + "' VIEWASTEXT>";
|
||
|
|
txt+="<param name='movie' value='" + path + "'>";
|
||
|
|
txt+="<param name='quality' value='High'>";
|
||
|
|
txt+="<PARAM NAME='wmode' VALUE='transparent'>";
|
||
|
|
txt+="<embed src='" + path + "' pluginspage='http://www.macromedia.com/go/getflashplayer' wmode='transparent' type='application/x-shockwave-flash' name='obj1' width='" + w + "' height='" + h + "'></object>";
|
||
|
|
}else if(path.indexOf('.flv')!=-1){
|
||
|
|
txt+="<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=../swf/player.swf?vcastr_title=" + title;
|
||
|
|
txt+="&vcastr_file=" + path;
|
||
|
|
if(h==0){
|
||
|
|
txt+=" width=" + w + " ";
|
||
|
|
}else{
|
||
|
|
txt+=" width=" + w + " height=" + h;
|
||
|
|
}
|
||
|
|
txt+=" type=application/x-shockwave-flash quality=\"high\" wmode=\"transparent\" showMovieInfo=\"0\"></EMBED>";
|
||
|
|
}else{
|
||
|
|
txt="<img src='" + path + "' width='" + w + "' height='" + h + "' border='0'>";
|
||
|
|
}
|
||
|
|
document.write(txt);
|
||
|
|
}
|
||
|
|
|
||
|
|
function WriteVideo(w,h,title,path)
|
||
|
|
{
|
||
|
|
var txt="";
|
||
|
|
if(path.indexOf('.swf')!=-1){
|
||
|
|
txt="<object classid='clsid:D27CDB6E-AE6D-11CF-96B8-444553540000' id='obj1' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0'";
|
||
|
|
txt+="border='0' width='" + w + "' height='" + h + "' VIEWASTEXT>";
|
||
|
|
txt+="<param name='movie' value='" + path + "'>";
|
||
|
|
txt+="<param name='quality' value='High'>";
|
||
|
|
txt+="<PARAM NAME='wmode' VALUE='transparent'>";
|
||
|
|
txt+="<embed src='" + path + "' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' name='obj1' width='" + w + "' height='" + h + "'></object>";
|
||
|
|
}else if(path.indexOf('.flv')!=-1){
|
||
|
|
txt+="<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=../swf/player.swf?vcastr_title=" + title;
|
||
|
|
txt+="&vcastr_file=" + path;
|
||
|
|
txt+=" width=" + w + " height=" + h;
|
||
|
|
txt+=" type=application/x-shockwave-flash quality=\"high\" wmode=\"transparent\" showMovieInfo=\"0\"></EMBED>";
|
||
|
|
}else{
|
||
|
|
txt+="<OBJECT ID=\"MPlayer\" width=\"" + w + "\" height=\"" + h + "\" type=\"application/x-oleobject\"";
|
||
|
|
txt+="CODEBASR=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701\"";
|
||
|
|
txt+="STANDBY=\"Loading Media Player components...\" align=\"middle\"";
|
||
|
|
txt+="CLASSID=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\">";
|
||
|
|
txt+="<PARAM NAME=\"FileName\" VALUE=\"" + path + "\">";
|
||
|
|
txt+="<PARAM NAME=\"AutoStart\" VALUE=\"true\">";
|
||
|
|
txt+="<PARAM NAME=\"AnimationAtStart\" VALUE=\"true\">";
|
||
|
|
txt+="<PARAM NAME=\"ShowControls\" VALUE=\"true\">";
|
||
|
|
txt+="<PARAM NAME=\"ClickToPlay\" VALUE=\"true\">";
|
||
|
|
txt+="<PARAM NAME=\"EnableContextMenu\" VALUE=\"true\">";
|
||
|
|
txt+="</OBJECT>";
|
||
|
|
}
|
||
|
|
document.write(txt);
|
||
|
|
}
|