chromecast-caf-sender: add __onGCastApiAvailable (#37937)

* chromecast-caf-sender: add __onGCastApiAvailable

* PR fixes
This commit is contained in:
Vincent Côté-Roy
2019-08-27 11:32:47 -07:00
committed by Andrew Casey
parent 1396ff01b4
commit ad07ff4d74
2 changed files with 6 additions and 1 deletions
@@ -1,6 +1,10 @@
/// <reference lib="dom" />
cast.framework.VERSION === "1.0.06";
cast.framework.setLoggerLevel(cast.framework.LoggerLevel.DEBUG);
window.__onGCastApiAvailable = (available: boolean) => {};
const context = cast.framework.CastContext.getInstance();
context.getCastState() === cast.framework.CastState.CONNECTED;
context.getSessionState() === cast.framework.SessionState.NO_SESSION;
+2 -1
View File
@@ -2,7 +2,7 @@
// Project: https://developers.google.com/cast/docs/caf_receiver_overview
// Definitions by: Samuel Maddock <https://github.com/samuelmaddock>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.4
// TypeScript Version: 3.0
/// <reference types="chrome/chrome-cast" />
@@ -11,6 +11,7 @@
////////////////////
interface Window {
cast: typeof cast;
__onGCastApiAvailable(available: boolean): void;
}
////////////////////