mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 18:19:58 +00:00
Initial commit
This commit is contained in:
18
ext/src/shim/index.js
Executable file
18
ext/src/shim/index.js
Executable file
@@ -0,0 +1,18 @@
|
||||
"use strict";
|
||||
|
||||
import cast from "./cast";
|
||||
import media from "./media";
|
||||
|
||||
if (!window.chrome) {
|
||||
window.chrome = {};
|
||||
}
|
||||
|
||||
window.chrome.cast = cast;
|
||||
window.chrome.cast.media = media;
|
||||
|
||||
// Call page's API loaded function if defined
|
||||
const readyFunction = window.__onGCastApiAvailable;
|
||||
console.log(readyFunction);
|
||||
if (readyFunction && typeof readyFunction === "function") {
|
||||
readyFunction(true);
|
||||
}
|
||||
Reference in New Issue
Block a user