尝试将在线广播流媒体合并到我的一位客户端。
播放列表未被清除,无法播放下一个指向的网址。
<html>
<head>
<script type="text/javascript">
function play_vlc(ip) {
var d=document.getElementById('vlc').playlist;
d.stop();
d.items.clear();
d.add(ip);
//document.getElementById('vlc').target=ip;
d.next();
d.play();
console.log("Playing "+ip);
}
</script>
<body>
<embed id="vlc" type="application/x-vlc-plugin" version="VideoLAN.VLCPlugin.2" >
<a href="#" id="radio1">Radio City 91.1</a><hr>
<a href="#" id="radio2">Radio City Freedom</a><hr>
<a href="#" id="radio3">Desi Music Mix</a><hr>
<a href="#" id="radio4">Amsterdam Trance Radio</a><hr>
<a href="#" id="radio5">Classic Hard Rock </a><br>
<script type="text/javascript">
var ipaddr=new Array("http://208.115.222.205:9998/","http://199.19.106.253:9962/","http://216.240.130.150:8014/","http://205.164.62.13:7700/","http://176.31.235.147:8000/");
function playradio(ip){
play_vlc(ip);
//alert(ip);
}
for(i=1;i<6;i++){
var j=ipaddr[i-1];
console.log(j);
document.getElementById('radio'+i).ind=j;
document.getElementById('radio'+i).onclick=function () {
playradio(this.ind);
};
}
</script>
</body>
</head>
</html>