mp3的自动连续播放以及探测是否可以播放、并对可…
2008-02-23 07:50:29来源:互联网 阅读 ()
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link href="style/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
var state;
var playlist;
var pplay=0;
var flag;
var find=0;
playlist = new Array();
var mp3name='老鼠爱大米';
playlist.push('http://202.206.96.204/homepage/homepageUsers/shipin/sucai/老鼠爱大米.mp3');
playlist.push('http://218.10.236.102/mp3/laosu.mp3');
playlist.push('http://www.korwoo.com.cn/download/songs/dami.mp3');
playlist.push('http://www.daqingit.com/yinyue/mp3/老鼠爱大米.mp3');
playlist.push('http://xxc1212.ahut.edu.cn/mid/4689.mp3');
playlist.push('http://www.klstudio.com/mp3/200492011225.mp3');
playlist.push('http://218.3.124.244/mp3/lsadm.mp3');
playlist.push('http://www.e-city.com.cn/200492011225.mp3');
playlist.push('http://www.panjin.net/df/08/mp3/mouse.mp3');
playlist.push('http://movie.games-daily.com/movie/mouse.mp3');
playlist.push('http://www.bgo.com.cn/class/music/mouselove.mp3');
playlist.push('http://www.00gg.net/photos/forum/杨臣刚-老鼠爱大米.mp3');
playlist.push('http://benhood.nease.net/blog/bg.mp3');
playlist.push('http://www.qiuqian108.com/hghx/鑰侀紶鐖卞ぇ绫筹紙鏉ㄨ嚕鍒氾級.mp3');
playlist.push('http://sxz.cslg.cn/cshb/mp3/lsadm.mp3');
playlist.push('http://www.ncdiy.com/news/mp3/ai.mp3');
playlist.push('http://www.webx.cn/mp3/老鼠爱大米.mp3');
playlist.push('http://md.jxufe.edu.cn/mdbbs/UploadFile/2004-10/200410521217630.mp3');
playlist.push('http://edu.tom.com/script/down/laoshuaidami.mp3');
playlist.push('http://218.65.74.218/club/forum/files/369.mp3');
playlist.push('');
//初始化
function playerinit()
{
player.url=playlist[0];
play();
flag=setInterval("check()",10000);
}
//播放
function play()
{
if (player.controls.isavailable('play'))
{
player.controls.play();
//playerinfo.innerHTML = "正在加载。。。。" player.url "请稍侯";
}
}
//暂停
function pause()
{
if (player.controls.isavailable('pause'))
{
player.controls.pause();
clearInterval(state);
playerinfo.innerHTML = "暂停";
}
}
//停止
function stop()
{
if (player.controls.isavailable('stop'))
{
player.controls.stop();
clearInterval(state);
playerinfo.innerHTML = "停止";
}
}
//前首
function previous()
{
if (player.controls.isavailable( 'previous' ))
{
player.controls.previous();
playerinfo.innerHTML = "前一首";
}
}
//后首
function next()
{
if (player.controls.isavailable( 'next' ))
{
player.controls.next();
playerinfo.innerHTML = "下一首";
}
}
//?
function step()
{
if (player.controls.isavailable( 'step' ))
player.controls.step( 1 );
}
//音量-
function voldown()
{
if ( player.settings.volume < 5 )
{
player.settings.volume = 0;
playerinfo.innerHTML = "0";
}
else
{
player.settings.volume -= 5;
playerinfo.innerHTML = player.settings.volume;
}
}
//音量
function volup()
{
if ( player.settings.volume > 95 )
{
player.settings.volume = 100;
playerinfo.innerHTML = "100";
}
else
{
player.settings.volume = 5;
playerinfo.innerHTML = player.settings.volume;
}
}
//静音
function mute()
{
player.settings.mute = !player.settings.mute;
}
//声道
function balance()
{
switch (player.settings.balance)
{
case 0:
player.settings.balance = 100;
playerinfo.innerHTML = '左声道';
break;
case 100:
player.settings.balance = -100;
playerinfo.innerHTML = '右声道';
break;
case -100:
player.settings.balance = 0;
playerinfo.innerHTML = '全声道';
break;
default :
player.settings.balance = 0;
playerinfo.innerHTML = '全声道';
break;
}
}
//更新时间
function updatetime()
{
playerinfo.innerHTML = player.controls.currentPositionString " | " player.currentMedia.durationString;
setTimeout("updatetime()",1000);
}
function check()
{
if (find)
{
clearTimeout(flag);
//保存结果
return
}
if (pplay<playlist.length-1)
pplay ;
else
pplay = 0;
stop();
player.url=playlist[pplay];
play();
}
function GetPage(url)
{
var xml = new ActiveXObject("Microsoft.XMLHTTP");
xml.open("GET",url,false);
xml.send();
return unescape(xml.ResponseText);
}
</script>
</head>
<body onload="playerinit();">
<table width="300">
<tr>
<td><object id="player" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" type="application/x-oleobject" width="300" height="60">
<param name="autoStart" value="true">
<param name="balance" value="0">
<param name="currentPosition" value="0">
标签:
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有
上一篇:javascript里的类思想
IDC资讯: 主机资讯 注册资讯 托管资讯 vps资讯 网站建设
网站运营: 建站经验 策划盈利 搜索优化 网站推广 免费资源
网络编程: Asp.Net编程 Asp编程 Php编程 Xml编程 Access Mssql Mysql 其它
服务器技术: Web服务器 Ftp服务器 Mail服务器 Dns服务器 安全防护
软件技巧: 其它软件 Word Excel Powerpoint Ghost Vista QQ空间 QQ FlashGet 迅雷
网页制作: FrontPages Dreamweaver Javascript css photoshop fireworks Flash