From 16529574612a4b7cb8eba24d80460027f5fe9026 Mon Sep 17 00:00:00 2001 From: Aviansh Ganpat Markad <100151747+AvinashMarkad@users.noreply.github.com> Date: Mon, 29 Jul 2024 00:32:51 +0530 Subject: [PATCH] Update video-autoplay.css Not Toggling Correctly --- css/video-autoplay.css | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/css/video-autoplay.css b/css/video-autoplay.css index 965a436f012c..e428080504d4 100644 --- a/css/video-autoplay.css +++ b/css/video-autoplay.css @@ -105,3 +105,29 @@ amp-story .amp-video-eq { 0% {transform: translateY(100%);} 100% {transform: translateY(0);} } + +/* Possible Issues: +1.animation-play-state` Not Toggling Correctly: + - The `animation-play-state` should switch between `running` and `paused` based on whether the video is playing or paused. If `.amp-video-eq-play` is not correctly added or removed, the animations might not start or stop as expected. + +2.Unnecessary `!important`: + - The use of `!important` on `pointer-events: none !important;` in `.amp-video-eq` might override necessary interactions if not carefully managed. + +Suggested Improvements: + +- Ensure the JavaScript controlling the video state properly toggles the `.amp-video-eq-play` class. +- Verify that `pointer-events: none !important;` is necessary and doesn't interfere with other interactions. +- Ensure that elements with the `noaudio` attribute are correctly preventing the display of `.amp-video-eq`. + +Here is the key part that might require attention: + +```css +.amp-video-eq-col div { + animation-play-state: paused; +} +.amp-video-eq-play .amp-video-eq-col div { + animation-play-state: running; +} +``` + +Make sure the `.amp-video-eq-play` class is being correctly toggled on the parent element when the video is playing or paused. If the class is not added or removed correctly, the animation states will not be applied properly, leading to the animations not starting or stopping as intended. */