1
I have the code with the buttons/ functional image one on top of the other, but I want that when click on the play the image "play" disappear and appear the "pause" and vice versa.
<div class="container">
<div class="radio">
<audio id="stream" >
<source src="songs/y2mate.com - EPIC DUBSTEP DROP FOR REAL MEN.mp3" type="audio/mpeg">
</audio>
<img id="play" src="img/play.png" width="80px" onclick="playStream()">
<img id="pause" src="img/pause.png" width="80px" onclick="pauseStream()">
</div>
</div>
<script src="script/script.js"></script>"
var stream = document.getElementById('stream');
var play = document.getElementById('play');
var pause = document.getElementById('pause');
function playStream(){
stream.play();
}
function pauseStream(){
stream.pause();
}
ola Bedatty in Edit or click here and add that code to the question, don’t use the comments for that
– Ricardo Pontual
Sorry, I’m new to the forum and I wasn’t able to put the <html> code together with the JS code, it only appeared the javascript, so I had to opt for the kkkkk gambiarra, I won’t do it again!
– BedattyZ
ah quiet, when you need to do this, has a button with code tag like this
<>
, clicking there gets by code that works, as in my answer– Ricardo Pontual
Right! Thanks for the tips and the excellent reception!!
– BedattyZ