From e43fe45d247b3949391c039124098776abef8983 Mon Sep 17 00:00:00 2001 From: Rishabh Date: Tue, 14 Dec 2021 22:25:30 +0530 Subject: [PATCH] Removed play icon on video player after first play refs https://github.com/TryGhost/Team/issues/1229 --- core/frontend/src/cards/js/video.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/frontend/src/cards/js/video.js b/core/frontend/src/cards/js/video.js index 4c12c32d33..aff9364d74 100644 --- a/core/frontend/src/cards/js/video.js +++ b/core/frontend/src/cards/js/video.js @@ -120,6 +120,8 @@ const isPlaying = !!(videoEl.currentTime > 0 && !videoEl.paused && !videoEl.ended && videoEl.readyState > 2); if (isPlaying) { handleOnPause(); + } else { + handleOnPlay(); } } }); @@ -141,7 +143,6 @@ } const handleOnPause = () => { - largePlayIcon.classList.remove("kg-video-hide-animated"); videoOverlay.classList.remove("kg-video-hide-animated"); pauseIconContainer.classList.add("kg-video-hide"); playIconContainer.classList.remove("kg-video-hide");