make lite-youtube pausing also work when the button is clicked
parent
8b859cc610
commit
2006040375
|
@ -328,7 +328,9 @@ function prepare_to_pause(audio) {
|
|||
}
|
||||
|
||||
document.addEventListener('click', (e) => {
|
||||
if (e.target.tagName.toLowerCase() == "lite-youtube" && !audio.paused) audio.pause();
|
||||
if ((e.target.tagName.toLowerCase() == "lite-youtube" || e.target.classList.contains('lty-playbtn')) && !audio.paused) {
|
||||
audio.pause();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue