UNPKG

motiontext-renderer

Version:

Web-based animated caption/subtitle renderer with plugin system

46 lines (45 loc) 1.57 kB
import { Scenario } from './types/scenario-v2'; export { MotionTextController } from './controller'; export { configureDevPlugins as configurePluginSource, getDevPluginConfig } from './loader/dev/DevPluginConfig'; export interface MotionTextRendererConfig { debugMode?: boolean; pluginServer?: { mode?: 'server' | 'local' | 'auto'; serverBase?: string; localBase?: string; }; fps?: number; snapToFrame?: boolean; preloadMs?: number; } export declare function configureMotionTextRenderer(config: MotionTextRendererConfig): void; export declare class MotionTextRenderer { private renderer; private assetManager; private scenario; constructor(container: HTMLElement, options?: Partial<MotionTextRendererConfig>); loadConfig(config: any): Promise<void>; loadConfigAsync(config: any): Promise<void>; attachMedia(video: HTMLVideoElement): void; play(): void; pause(): void; seek(timeSec: number): void; clearAsync(): Promise<void>; dispose(): void; setCaptionsVisible(visible: boolean): void; setControlSafeBottom(px: number): void; } export type { Scenario }; export declare function registerExternalPlugin(params: { name: string; version: string; module: any; baseUrl: string; manifest?: any; }): void; export declare function registerExternalPluginsFromGlob(globMap: Record<string, () => Promise<any>>, parse?: (_path: string) => { name: string; version: string; baseUrl: string; } | null): Promise<void>; //# sourceMappingURL=index.d.ts.map