寻求MediaPlay播放列表的解决方法,能生成却无法播放(附代码)

gamerman 2004-04-06 06:13:49
我修改了一个音乐全站程序,就差一个连播问题没解决了。我点了连播以后,播放器无法播放,我查看了播放器属性,标题正确显示出来了,位置是(举例:http://192.168.0.1/music/playlist.asp?checked=http://192.168.0.1/forum/plus/music/Highlands.wma|Highlands,http://192.168.0.1/forum/plus/music/bressanone.mp3|bressanone),我不知道这个列表生成得是否正确,但是就是放不出来,playlist.asp的相关代码如下:

<%
SongUrl=request("checked")
SongUrl=trim(SongUrl)
if instr(SongUrl,",")=0 then
dim SongUrlArray(1)
SongUrlArray(0)=SongUrl
else
SongUrl=replace(SongUrl," ","")
SongUrlArray=split(SongUrl,",")
NotOne=1
end if
if NotOne=1 then
s=""
for intI=0 to ubound(SongUrlArray)
ThisSong=split(SongUrlArray(intI),"|")
s=s & "<Entry><Title>" & ThisSong(1) & "</Title><Author>Music.Gov.CN</Author><Copyright>http://www.music.gov.cn</Copyright><Abstract>www.music.gov.cn</Abstract><Banner href = ""http://www.music.gov.cn/music/logo.gif""><MoreInfo href = ""http://www.music.gov.cn"" /></Banner><Ref href = """ & BaseUrl & "" & ThisSong(0) & """/></Entry>" & vbCrLf
next
else
ThisSong=split(SongUrl,"|")
s="<Entry><Title>" & ThisSong(1) & "</Title><Author>音乐站</Author><Copyright>http://www.Music.gov.cn</Copyright><Abstract>Music.gov.cn</Abstract><Banner href = ""http://www.music.gov.cn/music/logo.gif""><MoreInfo href = ""http://www.music.gov.cn"" /></Banner><Ref href=""" & BaseUrl & "" & ThisSong(0) & """/></Entry>"
end if
if NotOne=1 then
set rs=Server.CreateObject("ADODB.RecordSet")
for intI=0 to ubound(SongUrlArray)
sql="SELECT Hits FROM MusicList WHERE ListenUrl='"&SongUrlArray(intI)&"'"
rs.open sql,conn,1,3
if not rs.eof then
rs("hits")=rs("hits")+1
rs.Update
end if
rs.Close
next
set rs=nothing
else
set rs=Server.Createobject("ADODB.RecordSet")
sql="SELECT Hits FROM MusicList WHERE ListenUrl='"&SongUrlArray(0)&"'"
rs.open sql,conn,1,3
if not rs.eof then
rs("hits")=rs("hits")+1
rs.Update
end if
rs.Close
set rs=nothing
end if
conn.Close
set conn=nothing
response.contenttype="video/x-ms-asf"
response.addheader "Content-Disposition","inline; filename=PlayList.asx"
response.Write "<ASX Version =""3.0"">" & vbCrLf &_
"<Title>音乐站在线播放列表</Title>" & vbCrLf &_
"<Author>Music.gov.cn</Author>" & vbCrLf &_
"<Copyright>Music.gov.cn</Copyright>" & vbCrLf &_
s & vbCrLf &_
"</ASX>"
%>

希望有人指点能找出问题并解决,感谢
...全文
110 点赞 收藏 5
写回复
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
gamerman 2004-04-07
呵呵,终于解决了,太高兴了,原来是错了一个参数,谢谢上面的资料
回复
gamerman 2004-04-07
help
回复
gamerman 2004-04-06
播放列表我大概知道一点,是想问问生成的这个地址:http://192.168.0.1/music/playlist.asp?checked=http://192.168.0.1/forum/plus/music/Highlands.wma|Highlands,http://192.168.0.1/forum/plus/music/bressanone.mp3|bressanone
是否有错,应该生成怎样的地址才能播放得出来?
回复
孟子E章 2004-04-06
例子
<ASX VERSION="3.0">
<TITLE>【孟宪会之精彩世界】</TITLE>
<AUTHOR>孟宪会</AUTHOR>
<ABSTRACT>欢迎欣赏【孟宪会之精彩世界】</ABSTRACT>
<PARAM NAME="Location" VALUE="中国北京"/>
<PARAM NAME="Release Date" VALUE="2003-8-20"/>
<PARAM NAME="AllowShuffle" VALUE="Yes"/>
<MOREINFO HREF="http://dotnet.aspx.cc/"/>
<COPYRIGHT>【孟宪会之精彩世界】</COPYRIGHT>
<LOGO HREF="http://dotnet.aspx.cc/Images/mediacopyright.gif" Style="ICON"/>
<ENTRY>
<ref href="http://dotnet.aspx.cc/Data/WithoutYou.asf"/>
<PARAM name="HTMLView" value="http://xml.sz.luohuedu.net"/>
<BANNER href="http://dotnet.aspx.cc/Images/mediacopyright.gif">
<MOREINFO href="http://dotnet.aspx.cc/"/>
<ABSTRACT>点击这里,收听更多精彩音乐!!</ABSTRACT>
</BANNER>
<TITLE>没有你【Mariah Carey】</TITLE>
<AUTHOR>孟宪会</AUTHOR>
<COPYRIGHT>【孟宪会之精彩世界】之音乐频道</COPYRIGHT>
<ABSTRACT>更多精彩音乐</ABSTRACT>
<LOGO href="http://dotnet.aspx.cc/Images/copyright2.gif" Style="ICON"/>
</ENTRY>
<ENTRY>
<ref href="http://dotnet.aspx.cc/Data/forgetme.asf"/>
<PARAM name="HTMLView" value="http://xml.sz.luohuedu.net"/>
<BANNER href="http://dotnet.aspx.cc/Images/mediacopyright.gif">
<MOREINFO href="http://dotnet.aspx.cc/"/>
<ABSTRACT>点击这里,收听更多精彩音乐!!</ABSTRACT>
</BANNER>
<TITLE>忘记我还是忘记他【迪克牛仔】</TITLE>
<AUTHOR>孟宪会</AUTHOR>
<COPYRIGHT>【孟宪会之精彩世界】之音乐频道</COPYRIGHT>
<ABSTRACT>更多精彩音乐</ABSTRACT>
<LOGO href="http://dotnet.aspx.cc/Images/copyright2.gif" Style="ICON"/>
</ENTRY>
</ASX>
回复
孟子E章 2004-04-06
播放列表是xml格式的asx文件
参见
http://dotnet.aspx.cc/play.asx
回复
发动态
发帖子
ASP
创建于2007-09-28

2.8w+

社区成员

ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
申请成为版主
社区公告
暂无公告