mirror of
https://github.com/hensm/fx_cast.git
synced 2026-06-11 10:09:59 +00:00
Add stubbed cast.framework API implementation
This commit is contained in:
52
ext/src/shim/framework/classes/CastContext.ts
Normal file
52
ext/src/shim/framework/classes/CastContext.ts
Normal 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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user