日期:2014-05-20  浏览次数:20524 次

自己在做个人BlOG !现在想自写个音乐播放器,可以循环播放的那种!没有思路!大家给点意见
如题!

------解决方案--------------------
<object classid= "clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA " name= "player " width= "378 " height= "260 " id= "player ">
<param name= "_ExtentX " value= "10001 ">
<param name= "_ExtentY " value= "6879 ">
<param name= "AUTOSTART " value= "-1 ">
<param name= "SHUFFLE " value= "0 ">
<param name= "PREFETCH " value= "0 ">
<param name= "NOLABELS " value= "-1 ">
<param name= "SRC " value= "http://www.gozjj.net/sg/mjwsn.rm ">
<param name= "CONTROLS " value= "Imagewindow ">
<param name= "CONSOLE " value= "clip1 ">
<param name= "LOOP " value= "1 ">
<param name= "NUMLOOP " value= "0 ">
<param name= "CENTER " value= "0 ">
<param name= "MAINTAINASPECT " value= "0 ">
<param name= "BACKGROUNDCOLOR " value= "#000000 ">
</object>
呵呵网上搜索一下么,很多的
------解决方案--------------------
如果是音频格式的,一般有两种,一种是类似于楼上所贴的代码,以“网页播放器”为关键词,网上搜索有很多的,这是调用本地的WMP来播放的,另一种就是flash的播放器,网上也可以找到源码的,我这里也有,不过有个缺点就是多数只能解码mp3格式的音频文件
------解决方案--------------------
如果是调用WMP的那种,把src做成例如list.asx的播放列表,格式如下
<ASX version = "3.0 ">

<Entry>
<Ref href = "你的视频音频地址1 "/>
</Entry>

<Entry>
<Ref href = "你的视频音频地址2 "/>
</Entry>

<Entry>
<Ref href = "你的视频音频地址3 "/>
</Entry>

</ASX>

然后引用时上面的
<param name= "SRC " value= "http://www.gozjj.net/sg/mjwsn.rm ">
改为
<param name= "SRC " value= "http://......./list.asx ">
即可

如果是flash的播放器,看播放器提供的接口是什么样的了,一般是以xml作为播放列表的
我以前用过的一种是这样的
<?xml version= "1.0 " encoding= "UTF-8 "?>
<player showDisplay= "no " showPlaylist= "no " autoStart= "yes ">
<song path= "http://......./A Child Is Born.mp3 " title= "A Child Is Born " />
<song path= "http://......./A Good Place To Be.mp3 " title= "A Good Place To Be " />
<song path= "http://......./Angel 's Lullaby.mp3 " title= "Angel 's Lullaby " />
<song path= "http://......./Everyday I Love You.mp3 " title= "Everyday I Love You " />
</player>
------解决方案--------------------
个人建议用Flash的。
那得去AS讨论区解决这个问题了^_^
------解决方案--------------------
呵呵,楼主运气还真是不错,刚刚今天写完了音乐连继播放代码,却就要发到这里,唉真有点啥不得啊。

html:代码

<asp:ListBox id= "t_MusicList " runat= "server " CssClass= "MusicBox " Width= "304px " Height= "208px "> </asp:ListBox>

<OBJECT id= "replayer " height= "66 " width= "304 " classid= "clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA " VIEWASTEXT>