Add stubbed cast.framework API implementation

This commit is contained in:
hensm
2019-03-19 16:32:09 +00:00
parent 89fc20f6a3
commit 270d661de0
20 changed files with 605 additions and 21 deletions

View File

@@ -0,0 +1,52 @@
"use strict";
import Image from "../../cast/classes/Image";
import Session from "../../cast/classes/Session";
import CastOptions from "./CastOptions";
import CastSession from "./CastSession";
import CastStateEventData from "./CastStateEventData";
import SessionStateEventData from "./SessionStateEventData";
type EventHandler = (eventData:
CastStateEventData
| SessionStateEventData) => void;
export default class ApplicationMetadata {
public addEventListener (type: string, handler: EventHandler): void {
console.info("STUB :: CastContext#addEventListener");
}
public endCurrentSession (stopCasting: boolean): void {
console.info("STUB :: CastContext#endCurrentSession");
}
// @ts-ignore
public getCastState (): string {
console.info("STUB :: CastContext#getCastState");
}
// @ts-ignore
public getCurrentSession (): CastSession {
console.info("STUB :: CastContext#getCurrentSession");
}
// @ts-ignore
public getSessionState (): string {
console.info("STUB :: CastContext#getSessionState");
}
public removeEventListener (type: string, handler: EventHandler): void {
console.info("STUB :: CastContext#removeEventListener");
}
// @ts-ignore
public requestSession (): Promise<string> {
console.info("STUB :: CastContext#requestSession");
}
public setOptions (options: CastOptions): void {
console.info("STUB :: CastContext#setOptions");
}
}