网络编程 
首页 > 网络编程 > 浏览文章

asp 实现视频显示的效果函数

(编辑:jimmy 日期: 2024/9/17 浏览:3 次 )
<%
'******************************
'函数:SelPlay(strUrl,strWidth,StrHeight)
'参数:strUrl,动画视频路径;strWidth,视频高度;StrHeight,视频高度
'作者:阿里西西
'日期:2007/7/13
'描述:取得用户真实IP,对代理地址仍然有效;返回值:文本类型的IP地址
'示例:<%=SelPlay("mov.swf","120","90")%>
'******************************
Sub SelPlay(strUrl,strWidth,StrHeight)
Dim Exts,isExt
If strUrl <> "" Then
   isExt = LCase(Mid(strUrl,InStrRev(strUrl, ".")+1))
Else
   isExt = ""
End If
Exts = "avi,wmv,asf,mov,rm,ra,ram,swf"
If Instr(Exts,isExt)=0 Then
 Response.write "非法视频文件"
Else
 Select Case isExt
  Case "avi","wmv","asf","mov"
   Response.write "<EMBED id=MediaPlayer src="/UploadFiles/2021-04-02/&strUrl&">  Case "mov","rm","ra","ram"
   Response.Write "<OBJECT height="&strHeight&" width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"
   Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">"
   Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""9525"">"
   Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""-1"">"
   Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""SRC"" VALUE="""&strUrl&""">"
   Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ImageWindow"">"
   Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">"
   Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">"
   Response.Write "</OBJECT>"
   Response.Write "<BR>"
   Response.Write "<OBJECT height=32 width="&strWidth&" classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA>"
   Response.Write "<PARAM NAME=""_ExtentX"" VALUE=""12700"">"
   Response.Write "<PARAM NAME=""_ExtentY"" VALUE=""847"">"
   Response.Write "<PARAM NAME=""AUTOSTART"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""SHUFFLE"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""PREFETCH"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""NOLABELS"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""CONTROLS"" VALUE=""ControlPanel,StatusBar"">"
   Response.Write "<PARAM NAME=""CONSOLE"" VALUE=""Clip"">"
   Response.Write "<PARAM NAME=""LOOP"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""NUMLOOP"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""CENTER"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""MAINTAINASPECT"" VALUE=""0"">"
   Response.Write "<PARAM NAME=""BACKGROUNDCOLOR"" VALUE=""#000000"">"
   Response.Write "</OBJECT>"
  Case "swf"
   Response.Write "<embed src="/UploadFiles/2021-04-02/">  Case else
   Response.Write "<img src=""> End Select
End If
End Sub
%>
上一篇:asp 通用数据库连接过程函数
下一篇:asp 取得用户真实IP,对代理地址仍然有效的函数
一句话新闻
一文看懂荣耀MagicBook Pro 16
荣耀猎人回归!七大亮点看懂不只是轻薄本,更是游戏本的MagicBook Pro 16.
人们对于笔记本电脑有一个固有印象:要么轻薄但性能一般,要么性能强劲但笨重臃肿。然而,今年荣耀新推出的MagicBook Pro 16刷新了人们的认知——发布会上,荣耀宣布猎人游戏本正式回归,称其继承了荣耀 HUNTER 基因,并自信地为其打出“轻薄本,更是游戏本”的口号。
众所周知,寻求轻薄本的用户普遍更看重便携性、外观造型、静谧性和打字办公等用机体验,而寻求游戏本的用户则普遍更看重硬件配置、性能释放等硬核指标。把两个看似难以相干的产品融合到一起,我们不禁对它产生了强烈的好奇:作为代表荣耀猎人游戏本的跨界新物种,它究竟做了哪些平衡以兼顾不同人群的各类需求呢?
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap