From 388a25fe128e345e0785533f2c76da1f8f4f7a7b Mon Sep 17 00:00:00 2001 From: Pas <74743263+Pasithea0@users.noreply.github.com> Date: Tue, 14 Oct 2025 17:27:17 -0600 Subject: [PATCH] If cast framework is not available (e.g., on Safari), hide the button --- src/components/player/atoms/Chromecast.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/player/atoms/Chromecast.tsx b/src/components/player/atoms/Chromecast.tsx index bb430db7..3507152a 100644 --- a/src/components/player/atoms/Chromecast.tsx +++ b/src/components/player/atoms/Chromecast.tsx @@ -28,7 +28,12 @@ export function Chromecast({ className }: ChromecastProps) { useEffect(() => { const w = window as unknown as { cast?: typeof cast }; const castFramework = w.cast?.framework; - if (!castFramework) return; + + // If cast framework is not available (e.g., on Safari), hide the button + if (!castFramework) { + setCastHidden(true); + return; + } const context = castFramework.CastContext.getInstance(); const updateVisibility = () => {