asp实现后台添加wma视频文件前台显示
(编辑:jimmy 日期: 2024/11/27 浏览:3 次 )
想用asp来实现后台添加wma视频文件,前台显示所添加的这个视频文件。
可以实现的asp代码如下:
复制代码 代码如下:
<table border=1 cellPadding=4 cellSpacing=0 width=500 align=center>
<tr>
<td width="236" align=center class=tdc1></td>
</tr>
<%
lurl="phage1.wma"
%>
<tr>
<td valign=middle>
<%
select case Lcase(right(lurl,4))
case ".swf"
%>
<p align=center>
<OBJECT CLASSID=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 CODEBASE=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 WIDTH=541 HEIGHT=374>
<PARAM NAME=movie VALUE=<%=lurl% <PARAM NAME=quality VALUE=high> <EMBED SRC=<%=lurl%> QUALITY=high PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash TYPE=application/x-shockwave-flash WIDTH=541 HEIGHT=374></EMBED>
</OBJECT>
<%
CASE ".mpg"
%>
<p align=center>
<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=500 height=350 >
<param name=ShowStatusBar value=-1>
<param name=Filename value=<%=replace(lurl,chr(32),"%20",1)%
<embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=<%=replace(lurl,chr(32),"%20",1)%> width=500 height=100></embed>
</object>
<%
CASE ".mp3",".mid",".wma"
%>
<p align=center>
<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=500 height=91 >
<param name=ShowStatusBar value=-1>
<param name=Filename value=<%=replace(lurl,chr(32),"%20",1)%
<embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=<%=replace(lurl,chr(32),"%20",1)%> width=500 height=91></embed>
</object>
<%
case else
select case Lcase(right(lurl,3))
case ".rm"
%>
<p align=center>
<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width=500 height=350>
<PARAM NAME=SRC VALUE=<%=lurl%<PARAM NAME=CONSOLE VALUE=Clip1>
<PARAM NAME=CONTROLS VALUE=imagewindow><PARAM NAME=AUTOSTART VALUE=true>
</OBJECT>
<br>
<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=500>
<PARAM NAME=SRC VALUE=<%=lurl%<PARAM NAME=AUTOSTART VALUE=-1>
<PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1>
</OBJECT>
<%
case ".ra"
%>
<p align=center>
<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=500>
<PARAM NAME=SRC VALUE=<%=lurl%<PARAM NAME=AUTOSTART VALUE=-1>
<PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1>
</OBJECT>
<%
case else
%>
<p align=center>
<embed name=player src=<%=lurl%> type=audio/x-pn-realaudio-plugin width=300 height=350 border=0 autostart=1></embed>
<%
end select
end select%>
</td>
</table>
可以实现的asp代码如下:
复制代码 代码如下:
<table border=1 cellPadding=4 cellSpacing=0 width=500 align=center>
<tr>
<td width="236" align=center class=tdc1></td>
</tr>
<%
lurl="phage1.wma"
%>
<tr>
<td valign=middle>
<%
select case Lcase(right(lurl,4))
case ".swf"
%>
<p align=center>
<OBJECT CLASSID=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000 CODEBASE=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0 WIDTH=541 HEIGHT=374>
<PARAM NAME=movie VALUE=<%=lurl% <PARAM NAME=quality VALUE=high> <EMBED SRC=<%=lurl%> QUALITY=high PLUGINSPAGE=http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash TYPE=application/x-shockwave-flash WIDTH=541 HEIGHT=374></EMBED>
</OBJECT>
<%
CASE ".mpg"
%>
<p align=center>
<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=500 height=350 >
<param name=ShowStatusBar value=-1>
<param name=Filename value=<%=replace(lurl,chr(32),"%20",1)%
<embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=<%=replace(lurl,chr(32),"%20",1)%> width=500 height=100></embed>
</object>
<%
CASE ".mp3",".mid",".wma"
%>
<p align=center>
<object align=middle classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 class=OBJECT id=MediaPlayer width=500 height=91 >
<param name=ShowStatusBar value=-1>
<param name=Filename value=<%=replace(lurl,chr(32),"%20",1)%
<embed type=application/x-oleobject codebase=http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701 flename=mp src=<%=replace(lurl,chr(32),"%20",1)%> width=500 height=91></embed>
</object>
<%
case else
select case Lcase(right(lurl,3))
case ".rm"
%>
<p align=center>
<OBJECT classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA class=OBJECT id=RAOCX width=500 height=350>
<PARAM NAME=SRC VALUE=<%=lurl%<PARAM NAME=CONSOLE VALUE=Clip1>
<PARAM NAME=CONTROLS VALUE=imagewindow><PARAM NAME=AUTOSTART VALUE=true>
</OBJECT>
<br>
<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=500>
<PARAM NAME=SRC VALUE=<%=lurl%<PARAM NAME=AUTOSTART VALUE=-1>
<PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1>
</OBJECT>
<%
case ".ra"
%>
<p align=center>
<OBJECT classid=CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA height=32 id=video2 width=500>
<PARAM NAME=SRC VALUE=<%=lurl%<PARAM NAME=AUTOSTART VALUE=-1>
<PARAM NAME=CONTROLS VALUE=controlpanel><PARAM NAME=CONSOLE VALUE=Clip1>
</OBJECT>
<%
case else
%>
<p align=center>
<embed name=player src=<%=lurl%> type=audio/x-pn-realaudio-plugin width=300 height=350 border=0 autostart=1></embed>
<%
end select
end select%>
</td>
</table>
下一篇:ASP 空字符串、IsNull、IsEmpty区别分析