prendy
Version:
Make games with prerendered backdrops using babylonjs and repond
34 lines (33 loc) • 1.39 kB
TypeScript
import { InitialItemsState } from "repond";
import { MyTypes } from "../declarations";
export type VidState = "beforePlay" | "waitingForPlay" | "readyToPlay" | "play" | "beforeSeek" | "waitingForSeek" | "beforePause" | "waitingForPause" | "pause" | "beforeLoad" | "waitingForLoad" | "beforeUnload" | "waitingForUnload" | "unloaded";
export declare const abLetters: readonly ["a", "b"];
export default function stateVids<T_MyTypes extends MyTypes = MyTypes>(prendyAssets: T_MyTypes["Assets"]): {
getDefaultState: <T_ItemName extends string>(itemId: T_ItemName) => {
vidState: VidState;
playType: "pause" | "play";
goalSeekTime: number | null;
wantToPlay: boolean;
wantToPause: boolean;
wantToUnload: boolean;
wantToLoad: boolean;
videoSource: null;
autoplay: boolean;
doneSeekingTime: number | null;
};
getDefaultRefs: () => {
videoElement: HTMLVideoElement | null;
};
startStates: InitialItemsState<(<T_ItemName extends string>(itemId: T_ItemName) => {
vidState: VidState;
playType: "pause" | "play";
goalSeekTime: number | null;
wantToPlay: boolean;
wantToPause: boolean;
wantToUnload: boolean;
wantToLoad: boolean;
videoSource: null;
autoplay: boolean;
doneSeekingTime: number | null;
})>;
};