From a3f01aba1ea808e97c13935b0e031d1653bc2ba7 Mon Sep 17 00:00:00 2001 From: Factiven Date: Wed, 19 Apr 2023 00:10:12 +0700 Subject: 13th fixes --- components/videoPlayer.js | 15 ++++++++++----- styles/globals.css | 16 +--------------- 2 files changed, 11 insertions(+), 20 deletions(-) diff --git a/components/videoPlayer.js b/components/videoPlayer.js index f93f153..cee760f 100644 --- a/components/videoPlayer.js +++ b/components/videoPlayer.js @@ -51,8 +51,6 @@ export default function VideoPlayer({ compiler(); }, [data]); - // console.log(skip); - return ( <> {loading ? ( @@ -124,6 +122,7 @@ export default function VideoPlayer({ } // Show the layer art.layers.show = true; + art.layers.op.style.display = "block"; if (art.layers.ed) { art.layers.ed.style.display = "none"; } @@ -136,12 +135,12 @@ export default function VideoPlayer({ if (!art.layers.ed) { art.layers.add({ name: "ed", - html: ``, + html: ``, tooltip: "Skip", style: { position: "absolute", bottom: "68px", - right: "60px", + right: "58px", }, click: function (...args) { art.seek = ed.interval.endTime; @@ -150,11 +149,17 @@ export default function VideoPlayer({ } // Show the layer art.layers.show = true; + art.layers.ed.style.display = "block"; if (art.layers.op) { art.layers.op.style.display = "none"; } } else { - art.layers.show = false; + if (art.layers.op) { + art.layers.op.style.display = "none"; + } + if (art.layers.ed) { + art.layers.ed.style.display = "none"; + } } }); diff --git a/styles/globals.css b/styles/globals.css index d0278c0..b101081 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -145,19 +145,5 @@ button { } .skip-button { - @apply bg-white xs:w-28 xs:h-9 w-20 h-7 -right-8 bottom-6 rounded-md font-karla shadow-xl hover:bg-[#f1f1f1] text-black md:static absolute xs:-right-6 xs:bottom-0; -} - -@media screen and (max-width: 768px) { - .skip-button { - font-size: 14px; - padding: 8px 20px; - } -} - -@media screen and (max-width: 480px) { - .skip-button { - font-size: 12px; - padding: 6px 16px; - } + @apply bg-white xs:w-28 xs:h-9 w-24 h-7 -right-8 -bottom-7 rounded-md font-karla shadow-xl hover:bg-[#f1f1f1] text-black md:static absolute xs:-right-6 xs:-bottom-5 xs:text-[15px] text-xs md:text-sm; } -- cgit v1.2.3