From b5cb432241bcf2eb8419efaa139432f7feee33af Mon Sep 17 00:00:00 2001 From: Jip Fr Date: Wed, 13 Dec 2023 21:13:57 +0100 Subject: [PATCH] Add safe area to next episode button, clean up debugging stuff, disable thumbnails on Safari, fix lightbar on landscape Co-authored-by: mrjvs --- .../player/atoms/NextEpisodeButton.tsx | 2 +- .../player/internals/ThumbnailScraper.tsx | 17 +++-------------- src/components/utils/Lightbar.tsx | 4 ++-- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/components/player/atoms/NextEpisodeButton.tsx b/src/components/player/atoms/NextEpisodeButton.tsx index cef4717b..8699d311 100644 --- a/src/components/player/atoms/NextEpisodeButton.tsx +++ b/src/components/player/atoms/NextEpisodeButton.tsx @@ -88,7 +88,7 @@ export function NextEpisodeButton(props: {
{ this.videoEl?.addEventListener("loadedmetadata", resolve); this.videoEl?.addEventListener("error", reject); @@ -103,15 +100,6 @@ class ThumnbnailWorker { ); const imgUrl = this.canvasEl.toDataURL(); - // ! Remove before merging - const img = new Image(); - img.src = imgUrl; - img.style.border = "1px solid yellow"; - document.body.appendChild(img); - const p = document.createElement("p"); - p.innerText = `${at}`; - document.body.appendChild(p); - if (this.interrupted) return; if (imgUrl === "data:," || !imgUrl) return; // failed image rendering @@ -163,6 +151,7 @@ export function ThumbnailScraper() { workerRef.current = ins; ins.start(inputStream.stream); }, [source, addImage, resetImages, status]); + const startRef = useRef(start); useEffect(() => { startRef.current = start; diff --git a/src/components/utils/Lightbar.tsx b/src/components/utils/Lightbar.tsx index 59d4cac8..0949dad3 100644 --- a/src/components/utils/Lightbar.tsx +++ b/src/components/utils/Lightbar.tsx @@ -161,8 +161,8 @@ function ParticlesCanvas() { export function Lightbar(props: { className?: string }) { return ( -
-
+
+