This commit is contained in:
Manav Rathi 2024-05-09 15:07:42 +05:30
parent 17df2003be
commit dd3b8d94af
No known key found for this signature in database

View file

@ -93,9 +93,10 @@ const loadingChromecastSDKIfNeeded = async (): Promise<Cast> => {
const script = document.createElement("script");
script.src =
"https://www.gstatic.com/cast/sdk/libs/caf_receiver/v3/cast_receiver_framework.js";
castReceiver.cast = cast;
script.addEventListener("load", () => resolve(cast));
script.addEventListener("load", () => {
castReceiver.cast = cast;
resolve(cast);
});
document.body.appendChild(script);
});