x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
embedmovie.js - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\mumbaimizo\MumbaiMizoFolders\album\res\embedmovie.js
旋转
特效
属性
历史版本
/* embedmovie.js * Author: Laszlo Molnar / Hungary * Date: 01/11/2006 * Version: 0.5 */ var mtype = new Array (".avi.mp3", ".qt.mov.mpg.mpeg.mpe.mp4.aiff", ".wmv.wma.asf", ".swf.flv", ".divx.xvid" ); var cheight = new Array (0, 16, 64, 0, 20); var audio = ".mp3.wav.wma.aiff.mid.rm.ram"; function addParam(name, value) { return '
\n'; } function embedMovie(src, width, height, autoplay, hide, scaletofit) { var isExplorer = (navigator.appName.indexOf('Explorer') != -1); var ext = src.substr(src.lastIndexOf('.')).toLowerCase(); var isAudio = (audio.indexOf(ext) != -1); for(i = 0; i < mtype.length; i++) if(mtype[i].indexOf(ext) != -1) break; if(i == 0) { i = (navigator.userAgent.indexOf('Macintosh') != -1)? 1 : 2; } if(!scaletofit && audio.indexOf(ext) != -1) height = 0; if(hide) width = height = 0; else height += (i < mtype.length)? cheight[i] : 45; switch (i) { case 1: // QuickTime Movie if(isExplorer) { document.write('
\n'); document.write(addParam("src", src)); document.write(addParam("autoplay", autoplay)); document.write(addParam("bgcolor", "black")); if(scaletofit) document.write(addParam("scale", "tofit")); document.write('
\n'); break; case 2: // Windows Media Player if(src.indexOf('/') == -1) src = './' + src; if(isExplorer) document.write('
\n'); if(isExplorer) document.write(addParam("URL", src)); document.write(addParam("src", src)); document.write(addParam("AutoStart", autoplay? '1':'0')); if(scaletofit) document.write(addParam("StretchToFit", '1')); document.write(addParam(isExplorer? "ShowControls":"Controller", '1')); document.write('
\n'); break; case 3: // Flash Animation if(isExplorer) { document.write('
\n'); if(ext.charAt(1) == 'f') document.write(addParam("movie", src + '&autoStart=' + autoplay)); else document.write(addParam("movie", src)); document.write(addParam("allowScriptAccess", "sameDomain")); document.write(addParam("quality", "high")); document.write('\n'); break; case 4: // DivX Movie if(isExplorer) { document.write('
\n'); document.write(addParam("mode", "zero")); document.write(addParam("autoPlay", autoplay)); document.write(addParam("allowContextMenu", "false")); if(src.charAt(0) == "." || src.charAt(0) == "/" || src.indexOf("http:") == 0) document.write(addParam("src", src)); else document.write(addParam("src", "./" + src)); document.write('
\n'); break; default: // Undefined document.write('
'); } }
embedmovie.js
网页地址
文件地址
上一页
9/51
下一页
下载
( 4 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.