diff --git a/web/apps/cast/src/components/PhotoAuditorium.tsx b/web/apps/cast/src/components/PhotoAuditorium.tsx index 6aa2c3990..c77c9e6ca 100644 --- a/web/apps/cast/src/components/PhotoAuditorium.tsx +++ b/web/apps/cast/src/components/PhotoAuditorium.tsx @@ -11,14 +11,16 @@ export const PhotoAuditorium: React.FC = ({ showNextSlide, }) => { useEffect(() => { + console.log("showing slide"); const timeoutId = window.setTimeout(() => { + console.log("showing next slide timer"); showNextSlide(); }, 10000); return () => { if (timeoutId) clearTimeout(timeoutId); }; - }, [showNextSlide]); + }, []); return (
{ + console.log("useEffect for pairing called"); if (digits.length < 1 || !publicKeyB64 || !privateKeyB64) return; const interval = setInterval(async () => { + console.log("polling for cast data"); const data = await pollForCastData(); - if (!data) return; + if (!data) { + console.log("no data"); + return; + } storeCastData(data); + console.log("pushing slideshow"); await router.push("/slideshow"); }, 1000); diff --git a/web/apps/cast/src/pages/slideshow.tsx b/web/apps/cast/src/pages/slideshow.tsx index 11b34baf7..8554524b2 100644 --- a/web/apps/cast/src/pages/slideshow.tsx +++ b/web/apps/cast/src/pages/slideshow.tsx @@ -131,29 +131,41 @@ export default function Slideshow() { if (!nextURL) { try { + console.log("nextURL doesn't exist yet"); const blob = await getPreviewableImage(nextFile, castToken); + console.log("nextURL blobread"); const url = URL.createObjectURL(blob); + console.log("nextURL", url); renderableFileURLCache.set(nextFile.id, url); + console.log("nextUrlCache set"); nextURL = url; } catch (e) { console.log("error in nextUrl", e); return; } + } else { + console.log("nextURL already exists"); } if (!nextNextURL) { try { + console.log("nextNextURL doesn't exist yet"); const blob = await getPreviewableImage( nextNextFile, castToken, ); + console.log("nextNextURL blobread"); const url = URL.createObjectURL(blob); + console.log("nextNextURL", url); renderableFileURLCache.set(nextNextFile.id, url); + console.log("nextNextURCacheL set"); nextNextURL = url; } catch (e) { console.log("error in nextNextURL", e); return; } + } else { + console.log("nextNextURL already exists"); } setLoading(false);