Fix google cast sender framework script not loading

This commit is contained in:
Merlin Scheurer 2026-04-23 13:05:08 +02:00
parent ca8d3dbd32
commit aafbd2b5ad
1 changed files with 9 additions and 10 deletions

View File

@ -216,17 +216,16 @@ const GoogleCast = ({ video, setRefresh, onWatchStateChanged }: GoogleCastProps)
} }
return ( return (
<> <div>
<> <script
<script async
type="text/javascript" type="text/javascript"
src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1" src="https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1"
></script> />
{/* @ts-expect-error React does not know what to do with the google-cast-launcher, but it works. */} {/* @ts-expect-error React does not know what to do with the google-cast-launcher, but it works. */}
<google-cast-launcher id="castbutton"></google-cast-launcher> <google-cast-launcher id="castbutton"></google-cast-launcher>
</> </div>
</>
); );
}; };