I have this code in HTML with mutiple play/pause buttons for different live radio streaming.
What's what I'm missing in this code to play the different radios.
<html>
<head>
</head>
<body>
<audio id="sound1" src="http://222.22.222.222:2222/;"></audio>
<button id="bottun1" onclick="aud_play_pause()"><img src="images/radio1.png" /></button>
<audio id="sound2" src="http://222.22.222.222:2222/;"></audio>
<button id="button2" onclick="aud_play_pause()"><img src="/images/radio2.png" /></button>
<audio id="sound3" src="http://222.22.222.222:2222/;"></audio>
<button id="button3" onclick="aud_play_pause()"><img src="/images/radio3.png" /></button>
<script>
function aud_play_pause(this.id) {
var this.id = document.getElementById('this.id');
if (this.id.paused) {
this.id.play();
} else {
this.id.pause();
}
}
</script>
</body>
</html>
0 comments:
Post a Comment