<
embed
type
="audio/x-pn-realaudio-plugin"
id
="player"
controls
="ImageWindow,ControlPanel"
border ="0" >
border ="0" >
var
the_player;
//
是播放控件
// 以下是他的一些方法跟属性
the_player.DoPlay(); // 暂停
the_player.SetPosition(num);
the_player.GetPosition();
the_player.GetLength();
the_player.SetVolume(num);
the_player.GetPlayState(); // 播放状态
// 以下是他的一些方法跟属性
the_player.DoPlay(); // 暂停
the_player.SetPosition(num);
the_player.GetPosition();
the_player.GetLength();
the_player.SetVolume(num);
the_player.GetPlayState(); // 播放状态
{
var the_player = document.getElementById("player");
the_player.SetSource("/message/phone.mp3"); //播放文件的路径
Do_play();
}
function Do_play()
{
var the_player = document.getElementById("player");
if(the_player.GetPlayState()==3)
{
Do_stop();
}
the_player.DoPlay(); //开始播放
}
function Do_stop()
{
var the_player = document.getElementById("player");
the_player.Dostop(); //停止播放
}