Answer the question
In order to leave comments, you need to log in
Wordpress audio player add action on click on play and back?
Good time.
What I'm trying to do: Added an audio track but when you click on (pause ||) the modal window should exit, when the modal window is closed the audio track should continue.
Unable to display modal window
html structure
<div class="mejs-button mejs-playpause-button mejs-play"><button type="button" aria-controls="mep_0" title="Воспроизвести" aria-label="Воспроизвести" tabindex="0"></button></div>
$('.mejs-button buttom').click(function () {
console.log('Hello');
});
Answer the question
In order to leave comments, you need to log in
<div>
<audio id="audio" controls>
<source type="audio/mp3" src="https://dnl.megapesni.com/get/online/EWdZCiMIEXxZ3O4cLtOqLg/1626470796/ae17d566/2021/05/Galibri & Mavik - Федерико Феллини.mp3">
</audio>
</div>
<button id="button"> clickMe </button>
button.onclick = () => {
if( audio.paused === false ) {
audio.pause()
alert("audio остановлено")
}
else {
audio.play()
alert("audio продолжено")
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question