如何根据不同的格式选择相应的播放器进行播放呢?

dike103 2004-12-09 06:02:09
是个在线播放的问题:
我用的是MEDIA不能播放REAL格式的歌曲
如何做到如果是REAL格式的就用REALONEPLAY来播放
(自动匹配的意思)

急啊!!!!!

谁能帮忙我啊!最好有代码!
...全文
111 点赞 收藏 6
写回复
6 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
pengpong 2004-12-30
up
回复
dachangtui 2004-12-12
musictype是音乐类型
回复
dachangtui 2004-12-09
preurl是歌曲地址
回复
dachangtui 2004-12-09
<meta http-equiv=Content-Type content=text/html; charset=gb2312 charset=gb2312>
<STYLE>A:link {
COLOR: #000000
}
A:visited {
COLOR: #0000db
}
A:hover {
COLOR: #fb0000
}
TD {
FONT-SIZE: 9pt
}
HR {
WIDTH: 100%; COLOR: #000000; HEIGHT: 1px
}
BODY {
FONT-FAMILY: "宋体"; SCROLLBAR-DARKSHADOW-COLOR: #000000
}
.button {
BORDER-RIGHT: 1px ridge; BORDER-TOP: #ffffff 1px ridge; FONT-SIZE: 12px; BORDER-LEFT: #ffffff 1px ridge; BORDER-BOTTOM: 1px ridge; HEIGHT: 14pt; BACKGROUND-COLOR: #cccccc
}
.border2 {
BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid
}
.border1 {
BORDER-RIGHT: #104a7b 1px solid; BORDER-TOP: #afc4d5 1px solid; FONT-SIZE: 9pt; BACKGROUND: #d6e7ef; BORDER-LEFT: #afc4d5 1px solid; CURSOR: hand; COLOR: #000066; BORDER-BOTTOM: #104a7b 1px solid; FONT-FAMILY: 宋体,MS SONG,SimSun,tahoma,sans-serif; HEIGHT: 19px; TEXT-DECORATION: none
}
A.tab {
FONT-SIZE: 9pt; COLOR: #ffffff; FONT-FAMILY: 宋体,MS SONG,SimSun,Tahoma, san-serif; TEXT-DECORATION: none
}
FONT.tab {
FONT-SIZE: 9pt; COLOR: #f4d500; FONT-FAMILY: 宋体,MS SONG,SimSun,Tahoma, san-serif
}
.title0 {
FONT-WEIGHT: bold; FONT-SIZE: 17px; COLOR: #000000; FONT-FAMILY: arial; TEXT-DECORATION: none
}
</STYLE>
<style type="text/css">
<!--
.aaaaa {
font-size: 12px;
}
-->
</style>
<title>歌曲 歌词 在线 听 下载 </title>
<script language="JavaScript" type="text/JavaScript">
window.moveTo( 210 , 50 );
window.focus();
//-->
</script>
<body bgcolor="#f1f1f1" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="470" height="30"></td>
</tr>
<tr>
<td width="470" height="30" align="center"></td>
</tr>
<tr>
<td height="51">
<%if musictype="rm" or musictype="ram" then%>
<object id="video2" height="62" width="470" classid="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA">
<param NAME="_ExtentX" VALUE="26353">
<param NAME="_ExtentY" VALUE="847">
<param NAME="AUTOSTART" VALUE="-1">
<param NAME="SHUFFLE" VALUE="0">
<param NAME="PREFETCH" VALUE="0">
<param NAME="NOLABELS" VALUE="0">
<param NAME="SRC" VALUE="<%=preurl%>">
<param NAME="CONTROLS" VALUE="controlpanel">
<param NAME="CONSOLE" VALUE="Clip1">
<param NAME="LOOP" VALUE="0">
<param NAME="NUMLOOP" VALUE="0">
<param NAME="CENTER" VALUE="0">
<param NAME="MAINTAINASPECT" VALUE="0">
<param NAME="BACKGROUNDCOLOR" VALUE="#000000">
</object>
<%else%>
<script language="javascript">
<!--//
document.write ("<OBJECT id=Player2 name=Player classid=CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95 border=\"0\" width=470 height=62 type=application/x-oleobject standby=\"Loading Windows Media Player components...\">\n")
document.write ("<param name=\"AudioStream\" value=\"-1\">\n")
document.write ("<param name=\"AutoSize\" value=\"0\">\n")
document.write ("<param name=\"AutoStart\" value=\"-1\">\n")
document.write ("<param name=\"AnimationAtStart\" value=\"-1\">\n")
document.write ("<param name=\"AllowScan\" value=\"-1\">\n")
document.write ("<param name=\"AllowChangeDisplaySize\" value=\"-1\">\n")
document.write ("<param name=\"AutoRewind\" value=\"0\">\n")
document.write ("<param name=\"Balance\" value=\"10\">\n")
document.write ("<param name=\"BaseURL\" value>\n")
document.write ("<param name=\"BufferingTime\" value=\"5\">\n")
document.write ("<param name=\"CaptioningID\" value>\n")
document.write ("<param name=\"ClickToPlay\" value=\"-1\">\n")
document.write ("<param name=\"CursorType\" value=\"0\">\n")
document.write ("<param name=\"CurrentPosition\" value=\"-1\">\n")
document.write ("<param name=\"CurrentMarker\" value=\"0\">\n")
document.write ("<param name=\"DefaultFrame\" value>\n")
document.write ("<param name=\"DisplayBackColor\" value=\"0\">\n")
document.write ("<param name=\"DisplayForeColor\" value=\"16777215\">\n")
document.write ("<param name=\"DisplayMode\" value=\"0\">\n")
document.write ("<param name=\"DisplaySize\" value=\"4\">\n")
document.write ("<param name=\"Enabled\" value=\"-1\">\n")
document.write ("<param name=\"EnableContextMenu\" value=\"0\">\n")
document.write ("<param name=\"EnablePositionControls\" value=\"-1\">\n")
document.write ("<param name=\"EnableFullScreenControls\" value=\"0\">\n")
document.write ("<param name=\"EnableTracker\" value=\"-1\">\n")
document.write ("<param name=\"Filename\" value=\"<%=preurl%>\">\n")
document.write ("<param name=\"InvokeURLs\" value=\"-1\">\n")
document.write ("<param name=\"Language\" value=\"-1\">\n")
document.write ("<param name=\"Mute\" value=\"0\">\n")
document.write ("<param name=\"PlayCount\" value=\"2\">\n")
document.write ("<param name=\"PreviewMode\" value=\"0\">\n")
document.write ("<param name=\"Rate\" value=\"1\">\n")
document.write ("<param name=\"SAMILang\" value>\n")
document.write ("<param name=\"SAMIStyle\" value>\n")
document.write ("<param name=\"SAMIFileName\" value>\n")
document.write ("<param name=\"SelectionStart\" value=\"0\">\n")
document.write ("<param name=\"SelectionEnd\" value=\"0\">\n")
document.write ("<param name=\"SendOpenStateChangeEvents\" value=\"-1\">\n")
document.write ("<param name=\"SendWarningEvents\" value=\"-1\">\n")
document.write ("<param name=\"SendErrorEvents\" value=\"-1\">\n")
document.write ("<param name=\"SendKeyboardEvents\" value=\"0\">\n")
document.write ("<param name=\"SendMouseClickEvents\" value=\"0\">\n")
document.write ("<param name=\"SendMouseMoveEvents\" value=\"0\">\n")
document.write ("<param name=\"SendPlayStateChangeEvents\" value=\"-1\">\n")
document.write ("<param name=\"ShowCaptioning\" value=\"0\">\n")
document.write ("<param name=\"ShowControls\" value=\"-1\">\n")
document.write ("<param name=\"ShowAudioControls\" value=\"-1\">\n")
document.write ("<param name=\"ShowDisplay\" value=\"0\">\n")
document.write ("<param name=\"ShowGotoBar\" value=\"0\">\n")
document.write ("<param name=\"ShowPositionControls\" value=\"-1\">\n")
document.write ("<param name=\"ShowStatusBar\" value=\"-1\">\n")
document.write ("<param name=\"ShowTracker\" value=\"-1\">\n")
document.write ("<param name=\"TransparentAtStart\" value=\"-1\">\n")
document.write ("<param name=\"VideoBorderWidth\" value=\"0\">\n")
document.write ("<param name=\"VideoBorderColor\" value=\"0\">\n")
document.write ("<param name=\"VideoBorder3D\" value=\"0\">\n")
document.write ("<param name=\"Volume\" value=\"0\">\n")
document.write ("<param name=\"WindowlessVideo\" value=\"0\">\n")
document.write ("<embed type=\"application/x-mplayer2\" pluginspage=\"http://www.microsoft.com/windows/mediaplayer/download/default.asp\" Name=\"Player\" width=\"300\" height=\"70\" border=\"0\" SHOWSTATUSBAR=\"-1\" SHOWCONTROLS=\"0\" SHOWGOTOBAR=\"0\" SHOWDISPLAY=\"-1\" INVOKEURLS=\"-1\" AUTOSTART=\"1\" CLICKTOPLAY=\"0\" DisplayForeColor=\"12945678\">\n")
document.write ("</OBJECT>\n")
//-->
</script>
<%end if%></td></tr>
</table>
回复
不想写太麻烦了,你自动判断一下后缀不就好了
回复
lyh4226 2004-12-09
顶,感兴趣!!!!!!!!!!!!!!
回复
相关推荐
发帖
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
帖子事件
创建了帖子
2004-12-09 06:02
社区公告
暂无公告