mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fixed hidden controls for videos on loop
refs https://github.com/TryGhost/Team/issues/1229
This commit is contained in:
parent
2364de5696
commit
9ec83214ba
1 changed files with 8 additions and 4 deletions
|
@ -103,7 +103,9 @@
|
|||
}
|
||||
|
||||
videoElementContainer.onmouseover = () => {
|
||||
videoPlayerContainer.classList.remove("kg-video-hide-animated");
|
||||
if (!videoEl.loop) {
|
||||
videoPlayerContainer.classList.remove("kg-video-hide-animated");
|
||||
}
|
||||
}
|
||||
|
||||
videoElementContainer.onmouseleave = () => {
|
||||
|
@ -114,9 +116,11 @@
|
|||
}
|
||||
|
||||
videoEl.addEventListener('click', () => {
|
||||
const isPlaying = !!(videoEl.currentTime > 0 && !videoEl.paused && !videoEl.ended && videoEl.readyState > 2);
|
||||
if (isPlaying) {
|
||||
handleOnPause();
|
||||
if (!videoEl.loop) {
|
||||
const isPlaying = !!(videoEl.currentTime > 0 && !videoEl.paused && !videoEl.ended && videoEl.readyState > 2);
|
||||
if (isPlaying) {
|
||||
handleOnPause();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue