| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 916 人关注过本帖
标题:关于网站音乐不能连续播放(研究了两天两夜的问题)
只看楼主 加入收藏
alonestar
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-12-26
收藏
 问题点数:0 回复次数:3 
关于网站音乐不能连续播放(研究了两天两夜的问题)

源码为:福建音乐网
错误说明:(无法连续播放)点一个音乐单独播放可以播放,但选择音乐几个音乐连续播放时,弹出播放器提示无法连接。
自己研究了两天两夜,走了十几个技术论坛都未能解决,还请各位朋友们帮忙。
程序下载地址:http://www.downcode.com/downcode/j_9749_cc2ab5f2.shtml

主要文件源码:
一。播放器文件(playl.asp)

<%
if request("id")="" then
response.write"<SCRIPT language=JavaScript>alert('至少要选择歌曲一首以上才能连播!');"
response.write"javascript:window.close();</SCRIPT>"
response.end
else
end if
wma=replace(request("id")," ","")
Response.CacheControl = "no-cache"
%><noscript><iframe src=*.html></iframe></noscript>
<html>
<HTML>
<HEAD>
<TITLE>福建音乐视听网-媒体播放器</TITLE>
<META name="Description" content="asf,wma,mp3,wav,mid ">
<META http-equiv="Content-Type" content="text/html; charset=gb1312">
<STYLE type="text/css">
<!--
A:link { COLOR: silver; TEXT-DECORATION: none }
A:hover { COLOR: white; TEXT-DECORATION: none }
A:active { COLOR: white; TEXT-DECORATION: none }
A:visited { COLOR: silver; TEXT-DECORATION: none }
BODY { margin: 0px 0px 0px 0px; background:white; cursor:crosshair;}
.title{font-size:9pt; font-family:tahoma;}
.time{font-size:9pt; font-family:tahoma;}
--></STYLE>

<SCRIPT Language="JavaScript" src="js/exobud.js"></SCRIPT>
<SCRIPT Language="JavaScript" src="js/set.js"></SCRIPT>
<script language='JavaScript' src='wmalist.asp?id=<%=wma%>'></script>
<SCRIPT Language ="JavaScript" src="js/imgchg.js"></SCRIPT>

<SCRIPT Language ="JScript" FOR=Exobud EVENT=openStateChange(sf)> evtOSChg(sf); </SCRIPT>
<SCRIPT Language ="JScript" FOR=Exobud EVENT=playStateChange(ns)> evtPSChg(ns); </SCRIPT>
<SCRIPT Language ="JScript" FOR=Exobud EVENT=error()> evtWmpError(); </SCRIPT>
<SCRIPT Language ="JScript" FOR=Exobud EVENT=Buffering(bf)> evtWmpBuff(bf); </SCRIPT>

</HEAD>

<BODY onLoad="initExobud();" ondragstart="return false" onselectstart="return false" topmargin=0 leftmargin=0 marginwidth=0 marginheight=0>

<OBJECT ID=Exobud CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject" Standby="Loading.... Microsoft Windows Media Player"
width="0" height="0" style="position:relative;left:0px; top:0px;width:0px;height:0px;">
<param name="autoStart" value="true">
<param name="balance" value="0">
<param name="baseURL" value="">
<param name="currentPosition" value="0">
<param name="currentMarker" value="0">
<param name="enableContextMenu" value="false">
<param name="enableErrorDialogs" value="false">
<param name="fullScreen" value="false">
<param name="invokeURLs" value="false">
<param name="mute" value="false">
<param name="playCount" value="1">
<param name="rate" value="1">
<param name="uiMode" value="none">
<param name="volume" value="100">
</OBJECT>


<div id=volume_move_btn style="position:absolute;left:182; top:121; z-index:10;"><img src="./img/btn_vol.gif" border=0 width="16" height=11 ondragstart="wmpVolMove('volume_move_btn');" style="cursor:hand;" ></div>


<div id=scain style="position:absolute;left:3; top:89; z-index:10;">
<img src="./img/w_scan.gif" border=0 style="cursor:hand;" title="timebar" id="timebar" width="" height="11"><img src="./img/scain.gif" border=0 >
</div>


<div id=scope style="position:absolute;left:165; top:40; z-index:10"><img name="scope" src="./img/equ.gif" border=0 width=86 height=32></div>

<table border="0" cellspacing=0 cellpadding=0 width="300">

<tr>
<td>

<table cellspacing=0 cellpadding=0>
<tr>
<td background="img/main1_01.gif" width="150" height="45" usemap="#Map">
</td>
<td background="img/main1_02.gif" width="150" height="45">
</td>
</tr>
</table>

</td>
</tr>

<tr>
<td>

<table cellspacing=0 cellpadding=0>
<tr>
<td background="img/main2_01.gif" width="259" height="20" onClick="chgTimeFmt(); this.blur();">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color="white">
<span id="disp2" width=100 class="time" align="center" title ="时间长度显示方式(Elaps/Laps)" style="cursor:hand;">00:00 | 00:00</span>
</font>
</td>
<td background="img/main2_02.gif" width="41" height="20" >
<img name="rept" src="./img/main2_02.gif" border=0 onClick="chkRept();this.blur();" style="cursor:hand;" title="重复"></td>
</tr>
</table>

</td>
</tr>

<tr>
<td>

<table cellspacing=0 cellpadding=0>
<tr>
<td background="img/main3_01.gif" width="261" height="24" >
&nbsp;&nbsp;&nbsp;
<font color="white">
<marquee scrolldelay=70 behavior=alternate scrollamount=1 width=225 height=14 truespeed >
<span id="disp1" width=200 class="title" align=left>福建音乐视听网-媒体播放器</span>
</marquee>
</font>
</td>
<td background="img/main3_02.gif" width="39" height="24" >
<img name="pmode" src="./img/main3_02.gif" border=0 onClick="chgPMode();this.blur();" style="cursor:hand;" title="等待)"></td>
</tr>
</table>

</td>
</tr>


<tr>
<td>

<table cellspacing=0 cellpadding=0>
<tr>
<td background="img/main4_01.gif" width="221" height="18">
&nbsp;
<marquee behavior="scroll" scrolldelay=70 direction="right" width="200" scrollamount=0.1><img src="img/scain.gif"></marquee>
</td>
<td onMouseOver="javascript:plist.src ='./img/main4_02_ov.gif';" onMouseOut="javascript:plist.src ='./img/main4_02.gif';" width="79" height="18">
<img src="./img/main4_02.gif" name="plist" width="79" height="18" border=0 style="cursor:hand;" title="播放列表" onClick="openPlaylist('play_list');this.blur();"></td>
</tr>
</table>

</td>
</tr>


<tr>
<td>
<table border="0" cellspacing=0 cellpadding=0>
<tr>
<td onMouseOver="javascript:prevt.src ='./img/main5_01_ov.gif';" onMouseOut="javascript:prevt.src ='./img/main5_01.gif';" width="28" height="32">
<img name="prevt" src="./img/main5_01.gif" border=0 onClick="playPrev();this.blur();" style="cursor:hand;" title="上一首"></td>
<td width="26" height="32">
<img name="playt" src="./img/main5_02.gif" border=0 onClick="startExobud();this.blur();" style="cursor:hand;" title="播放"></td>
<td width="25" height="32">
<img name="pauzt" src="./img/main5_03.gif" border=0 onClick="wmpPP();this.blur();" style="cursor:hand;" title="暂停/播放"></td>
<td width="26" height="32">
<img name="stopt" src="./img/main5_04.gif" border=0 onClick="wmpStop();this.blur();" style="cursor:hand;" title="停止"></td>
<td onMouseOver="javascript:nextt.src ='./img/main5_05_ov.gif';" onMouseOut="javascript:nextt.src ='./img/main5_05.gif';" width="27" height="32">
<img name="nextt" src="./img/main5_05.gif" border=0 onClick="playNext();this.blur();" style="cursor:hand;" title="下一首"></td>
<td width="22" height="32">
<img name="vmute" src="./img/main5_06.gif" onClick="wmpMute();this.blur();" style="cursor:hand;" title="静音(Mute)"></td>
<td background="img/main5_07.gif" width="75" height="32"></td>
<td background="img/main5_08.gif" width="71" height="32">
</td>
</tr>
</table>
</td>
</tr>
<tr>
<TD ><div id="capText" style="width:100%;font-size:0px;color:white;display:none;"></div>
</TD>
</TR>

<TR>
<TD height=0 >

二。(wmalist.asp)文件
<!--#include file="../inc/jc_conn.asp"--><%
Dim id
id=saferequest("id")
set rs=server.createobject("adodb.recordset")
sql="select * from musiclist where musicid in (" & id & ")"
rs.open sql,conn,1,1
i=0
do while not rs.eof
i=i+1
NClass=rs("NClass")
name=rs("name")
url1=Rs("url1")
%>mkList("http://music/play/wma2.asp?u=<%=url1%>&m=<%=server.urlencode(name)%>&s=<%=server.urlencode(nclass)%>","<%=name%>","<%=NClass%>");
<%
rs.movenext
if i>=50 then exit do
loop
rs.close
set rs=nothing
conn.close
set conn=nothing
%>

搜索更多相关主题的帖子: 音乐 播放 研究 
2006-12-26 23:27
alonestar
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-12-26
收藏
得分:0 
请大虾们帮忙啊,在线急等中。。。
2006-12-27 20:39
alonestar
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2006-12-26
收藏
得分:0 
请帮忙啊,谢谢各位了。。。。
2006-12-28 14:46
hehe365
Rank: 1
等 级:新手上路
帖 子:103
专家分:0
注 册:2006-10-20
收藏
得分:0 
我有一份调试成功的,你把拿去看一下吧.代码如下
idlist=request("checkbox")

if idlist="" then
response.redirect "musiclist.asp"
response.end
else
'获取曲目列表
response.write idlist

dim list,strsql
list = split(idlist,",",-1,1)

strsql = "select * from music where "
strsqlupdate ="update music set click=click + 1 where "
for i = 0 to ubound(list)
response.write list(i) & "<br>"
if i = ubound(list) then
strsql=strsql & " id =" & list(i)
strsqlupdate = strsqlupdate & " id =" & list(i)
else
strsql=strsql & " id =" & list(i) & " or "
strsqlupdate = strsqlupdate & " id =" & list(i) & " or "
end if
next


set conn=server.createobject("adodb.connection")
conn.connectionstring = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & Server.Mappath("data/music.mdb")
conn.open

conn.execute(strsqlupdate)

set rs = server.createobject("adodb.recordset")

set fs = server.createobject("scripting.filesystemobject")
set mylist = fs.Createtextfile(server.mappath(".\") & "\mylist1.m3u",true)

rs.open strsql,conn,1,1

if rs.eof then
response.redirect "musiclist.asp"
end if

do while not rs.eof
sposition = "http://" & request.ServerVariables("SERVER_NAME") & replace(rs("url"),"\","/")
mylist.write sposition & chr(10)
'response.write sposition & chr(10)
rs.movenext
loop

2007-01-01 12:05
快速回复:关于网站音乐不能连续播放(研究了两天两夜的问题)
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018531 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved