audio.libx.js
Version:
Comprehensive audio library with progressive streaming, recording capabilities, real-time processing, and intelligent caching for web applications
53 lines • 1.82 kB
TypeScript
import { AudioRecorderOptions, RecordingState, RecordingResult, RecordingData, RecordingEventCallback, RecordingEventType } from './types.js';
export declare class AudioRecorder {
private _permissionManager;
private _mediaRecorder;
private _mediaStream;
private _audioContext;
private _analyserNode;
private _options;
private _state;
private _eventCallbacks;
private _recordedChunks;
private _startTime;
private _pausedDuration;
private _durationTimer;
private _levelTimer;
private _isInitialized;
private _realtimeProcessing;
constructor(options?: AudioRecorderOptions);
initialize(): Promise<void>;
startRecording(recordingId?: string): Promise<RecordingResult>;
stopRecording(): Promise<RecordingData>;
pauseRecording(): void;
resumeRecording(): void;
cancelRecording(): void;
private _createMediaRecorder;
private _stopMediaRecorderAndWait;
private _setupRealtimeProcessing;
private _startDurationTimer;
private _startLevelMonitoring;
private _stopTimers;
private _finalizeRecording;
private _cleanup;
private _getDefaultMimeType;
private _getBestSupportedMimeType;
private _generateId;
private _createPromise;
private _setState;
private _emitEvent;
on(eventType: RecordingEventType, callback: RecordingEventCallback): void;
off(eventType: RecordingEventType, callback: RecordingEventCallback): void;
getState(): RecordingState;
getCapabilities(): {
isSupported: boolean;
supportedMimeTypes: string[];
hasRealtimeProcessing: boolean;
hasPermission: boolean;
canPause: boolean;
canResume: boolean;
};
private _getSupportedMimeTypes;
dispose(): void;
}
//# sourceMappingURL=AudioRecorder.d.ts.map