asp 实现视频显示的效果函数
2018-09-06 11:23
<%
******************************
函数:SelPlay(strUrl,strWidth,StrHeight)
参数:strUrl,动画视频路径;strWidth,视频高度;StrHeight,视频高度
作者:阿里西西
日期:2007/7/13
描述:取得用户真实IP,对代理地址仍然有效;返回值:文本类型的IP地址
示例:<%=SelPlay(mov.swf,120,90)%>
******************************
SubSelPlay(strUrl,strWidth,StrHeight)
DimExts,isExt
IfstrUrl<>Then
isExt=LCase(Mid(strUrl,InStrRev(strUrl,.)+1))
Else
isExt=
EndIf
Exts=avi,wmv,asf,mov,rm,ra,ram,swf
IfInstr(Exts,isExt)=0Then
Response.write非法视频文件
Else
SelectCaseisExt
Caseavi,wmv,asf,mov
Response.write<EMBEDid=MediaPlayersrc=&strUrl&width=&strWidth&height=&strHeight&loop=falseautostart=true></EMBED>
Casemov,rm,ra,ram
Response.Write<OBJECTheight=&strHeight&width=&strWidth&classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>
Response.Write<PARAMNAME=_ExtentXVALUE=12700>
Response.Write<PARAMNAME=_ExtentYVALUE=9525>
Response.Write<PARAMNAME=AUTOSTARTVALUE=-1>
Response.Write<PARAMNAME=SHUFFLEVALUE=0>
Response.Write<PARAMNAME=PREFETCHVALUE=0>
Response.Write<PARAMNAME=NOLABELSVALUE=0>
Response.Write<PARAMNAME=SRCVALUE=&strUrl&>
Response.Write<PARAMNAME=CONTROLSVALUE=ImageWindow>
Response.Write<PARAMNAME=CONSOLEVALUE=Clip>
Response.Write<PARAMNAME=LOOPVALUE=0>
Response.Write<PARAMNAME=NUMLOOPVALUE=0>
Response.Write<PARAMNAME=CENTERVALUE=0>
Response.Write<PARAMNAME=MAINTAINASPECTVALUE=0>
Response.Write<PARAMNAME=BACKGROUNDCOLORVALUE=#000000>
Response.Write</OBJECT>
Response.Write<BR>
Response.Write<OBJECTheight=32width=&strWidth&classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>
Response.Write<PARAMNAME=_ExtentXVALUE=12700>
Response.Write<PARAMNAME=_ExtentYVALUE=847>
Response.Write<PARAMNAME=AUTOSTARTVALUE=0>
Response.Write<PARAMNAME=SHUFFLEVALUE=0>
Response.Write<PARAMNAME=PREFETCHVALUE=0>
Response.Write<PARAMNAME=NOLABELSVALUE=0>
Response.Write<PARAMNAME=CONTROLSVALUE=ControlPanel,StatusBar>
Response.Write<PARAMNAME=CONSOLEVALUE=Clip>
Response.Write<PARAMNAME=LOOPVALUE=0>
Response.Write<PARAMNAME=NUMLOOPVALUE=0>
Response.Write<PARAMNAME=CENTERVALUE=0>
Response.Write<PARAMNAME=MAINTAINASPECTVALUE=0>
Response.Write<PARAMNAME=BACKGROUNDCOLORVALUE=#000000>
Response.Write</OBJECT>
Caseswf
Response.Write<embedsrc=&strUrl&width=&strWidth&height=&strHeight&type=application/x-shockwave-flashplay=trueloop=truemenu=true></embed>
Caseelse
Response.Write<imgsrc=/IMages/NoDV.JPG/>
EndSelect
EndIf
EndSub
%>
下一篇:综合的判断用户输入的合法性的函数