Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove unused

Manav Rathi9ecb7c4044fd
diff --git a/web/apps/photos/src/utils/cast.ts b/web/apps/photos/src/utils/cast.ts
deleted file mode 100644
index cd3cdabd05..0000000000
--- a/web/apps/photos/src/utils/cast.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-declare const chrome: any;
-declare const cast: any;
-
-declare global {
- interface Window {
- __onGCastApiAvailable: (isAvailable: boolean) => void;
- }
-}
-
-/**
- * Load the Chromecast script, resolving with the global `cast` object.
- */
-export const loadCast = (() => {
- let promise: Promise<any> | undefined;
-
- return () => {
- if (promise === undefined) {
- promise = new Promise((resolve) => {
- const script = document.createElement("script");
- script.src =
- "https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";
- window.__onGCastApiAvailable = (isAvailable) => {
- if (isAvailable) {
- cast.framework.CastContext.getInstance().setOptions({
- receiverApplicationId: "F5BCEC64",
- autoJoinPolicy:
- chrome.cast.AutoJoinPolicy.ORIGIN_SCOPED,
- });
-
- resolve(cast);
- }
- };
- document.body.appendChild(script);
- });
- }
- return promise;
- };
-})();