0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Fixed pause not working for video player

refs https://github.com/TryGhost/Team/issues/1229
This commit is contained in:
Rishabh 2021-12-14 22:05:29 +05:30
parent 9ec83214ba
commit 61f7f29eed

View file

@ -115,7 +115,7 @@
}
}
videoEl.addEventListener('click', () => {
videoElementContainer.addEventListener('click', () => {
if (!videoEl.loop) {
const isPlaying = !!(videoEl.currentTime > 0 && !videoEl.paused && !videoEl.ended && videoEl.readyState > 2);
if (isPlaying) {
@ -149,7 +149,8 @@
cancelAnimationFrame(raf);
}
largePlayIcon.addEventListener('click', () => {
largePlayIcon.addEventListener('click', (event) => {
event.stopPropagation();
handleOnPlay();
});