Revert "fix skip button display inconsistency"

This reverts commit a252266058.
This commit is contained in:
sannidhyaroy 2024-07-26 19:55:29 +05:30
parent a252266058
commit cab1df056e
No known key found for this signature in database
GPG Key ID: A5E7702AC66F72B5

View File

@ -36,7 +36,7 @@ class skipIntroPlugin {
background-color:rgba(25, 25, 25, 0.66);
border: 1px solid;
border-radius: 0px;
display: inline-block !important;
display: inline-block;
cursor: pointer;
box-shadow: inset 0 0 0 0 #f9f9f9;
-webkit-transition: ease-out 0.4s;
@ -163,8 +163,9 @@ class skipIntroPlugin {
currentPlayer = player;
switch (segment["SegmentType"]) {
case "None":
if (skipIntro.classList.contains("hide")) return;
if (skipIntro.style.opacity === '0') return;
skipIntro.style.opacity = '0';
skipIntro.addEventListener("transitionend", () => {
skipIntro.classList.add("hide");
}, { once: true });
@ -179,6 +180,11 @@ class skipIntroPlugin {
if (!skipIntro.classList.contains("hide")) return;
skipIntro.classList.remove("hide");
requestAnimationFrame(() => {
requestAnimationFrame(() => {
skipIntro.style.opacity = '1';
});
});
};
events.on(player, 'timeupdate', onTimeUpdate);
@ -226,4 +232,4 @@ class skipIntroPlugin {
}
}
window._skipIntroPlugin = skipIntroPlugin;
window._skipIntroPlugin = skipIntroPlugin;