import { StreamingAudioPlayer } from './StreamingAudioPlayer';
export declare class AnimationPlayer {
    private audio;
    private streamingPlayer;
    private _isPlaying;
    private fps;
    private onEndedCallback?;
    private static audioUnlocked;
    private useStreaming;
    /**
     * 解锁音频上下文（Safari 自动播放策略）
     * 必须在用户交互事件（如 click）中调用
     */
    static unlockAudioContext(): Promise<void>;
    /**
     * Initialize with HTMLAudioElement (traditional way)
     */
    initialize(audioUrl: string, onEnded?: () => void): Promise<void>;
    /**
     * Initialize with StreamingAudioPlayer (streaming way)
     * @deprecated 使用 prepareStreamingPlayer() 代替
     */
    initializeStreaming(streamingPlayer: StreamingAudioPlayer, onEnded?: () => void): Promise<void>;
    /**
     * 检查流式播放器是否已准备好
     */
    isStreamingReady(): boolean;
    /**
     * 获取流式播放器实例
     */
    getStreamingPlayer(): StreamingAudioPlayer | null;
    /**
     * 创建并初始化流式播放器
     * 在服务连接建立时调用
     */
    createAndInitializeStreamingPlayer(): Promise<void>;
    /**
     * 准备流式播放器（如果未创建则创建并初始化）
     * 停止之前的播放并更新结束回调
     */
    prepareStreamingPlayer(onEnded?: () => void): Promise<void>;
    private setupEventListeners;
    play(): Promise<void>;
    stop(): void;
    isPlaying(): boolean;
    getCurrentFrameIndex(): number;
    /**
     * Get current playback time
     */
    getCurrentTime(): number;
    /**
     * 添加音频块（仅用于流式播放）
     */
    addAudioChunk(audio: Uint8Array, isLast?: boolean): void;
    /**
     * 暂停播放
     */
    pause(): void;
    /**
     * 继续播放
     */
    resume(): Promise<void>;
    dispose(): void;
}
//# sourceMappingURL=AnimationPlayer.d.ts.map