From 31757bb775378899cebe9aa3c291cead5e0264a0 Mon Sep 17 00:00:00 2001 From: hensm Date: Fri, 15 Apr 2022 23:48:47 +0100 Subject: [PATCH] Fix framework API script load order --- ext/src/cast/index.ts | 42 +++++++++++++++++++----------------------- ext/src/lib/utils.ts | 15 +++++++++------ 2 files changed, 28 insertions(+), 29 deletions(-) diff --git a/ext/src/cast/index.ts b/ext/src/cast/index.ts index 3c1e0bb..33a87b3 100644 --- a/ext/src/cast/index.ts +++ b/ext/src/cast/index.ts @@ -1,6 +1,7 @@ "use strict"; import * as cast from "./api"; +import logger from "../lib/logger"; import { CAST_FRAMEWORK_SCRIPT_URL } from "../lib/endpoints"; import { loadScript } from "../lib/utils"; @@ -18,14 +19,6 @@ _window.chrome.cast = cast; let bridgeInfo: any; let isFramework = false; -// Call page's API loaded function if defined -function callPageReadyFunction() { - const readyFunction = _window.__onGCastApiAvailable; - if (readyFunction && typeof readyFunction === "function") { - readyFunction(bridgeInfo && bridgeInfo.isVersionCompatible); - } -} - /** * If loaded within a page via a