import Emittery from 'emittery';
import type { StreamAudioPlayInfo } from '../types/index';
export interface FramePlayerConfig {
    fps?: number;
    autoPlay?: boolean;
    loop?: boolean;
}
export declare enum PlaybackState {
    IDLE = "idle",
    PLAYING = "playing",
    PAUSED = "paused",
    STOPPED = "stopped"
}
declare class FramePlayerService extends Emittery {
    private blendShapes;
    private audioBuffers;
    private playInfo;
    private fps;
    private frameTime;
    private state;
    private isInitialized;
    private currentFrameIndex;
    private timerId;
    private audioManager;
    private playShapeCallback;
    private callbackMap;
    private isDestroyed;
    constructor(config: FramePlayerConfig | undefined, playShapeCallback: (shapes: number[], index: number) => void);
    private setupAudioListeners;
    private canStartPlay;
    private startFrameTimer;
    private stopFrameTimer;
    addShapes(shapes: number[][]): void;
    addAudio(buffer: ArrayBuffer): void;
    private startPlayback;
    private playNextFrame;
    private appendAudioBuffers;
    private mergeArrayBuffers;
    private handlePlaybackEnd;
    play(): Promise<void>;
    pause(): void;
    resume(): Promise<void>;
    stop(): Promise<void>;
    clear(): Promise<void>;
    setAudioRate(rate: number): Promise<void>;
    getPlayInfo(): StreamAudioPlayInfo;
    getPlaybackState(): PlaybackState;
    isPlaying(): boolean;
    getCurrentFrameIndex(): number;
    getRemainingShapes(): number;
    getRemainingAudioBuffers(): number;
    setFPS(fps: number): void;
    getFPS(): number;
    registerCallback(key: any, callback: Function): void;
    private invokeCallback;
    getStats(): Promise<any>;
    destroy(): Promise<void>;
}
export default FramePlayerService;
//# sourceMappingURL=FramePlayerService.d.ts.map