加入收藏 | 设为首页 | 会员中心 | 我要投稿 聊城站长网 (https://www.0635zz.com/)- 智能语音交互、行业智能、AI应用、云计算、5G!
当前位置: 首页 > 站长学院 > Asp教程 > 正文

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

发布时间:2023-09-20 15:57:34 所属栏目:Asp教程 来源:
导读:  <%

  &#39;******************************

  &#39;函数:SelPlay(strUrl,strWidth,StrHeight)

  &#39;参数:strUrl,动画视频路径;strWidth,视频高度;StrHeight,视频高度

  &#39;作者
  <%
 
  '******************************
 
  '函数: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="&strUrl&" width="&strWidth&" height="&strHeight&" loop=""false"" autostart=""true""></EMBED>"
 
    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"">"
 
 

(编辑:聊城站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章