import React from 'react'; export interface AudioPlayerProps { /** * Total duration of the audio in seconds, e.g. 392 for 06:32 */ duration: number; /** * Current playback position in seconds. Component is controlled — * parent owns this value and updates it (e.g. via a timer / media element). */ currentTime: number; /** * Whether the audio is currently playing */ isPlaying?: boolean; /** * Called when the play/pause button is clicked */ onPlayPause?: () => void; /** * Called when the user drags or clicks the progress bar to seek to a new time (in seconds) */ onSeek?: (time: number) => void; /** * Whether audio is muted */ isMuted?: boolean; /** * Called when the speaker/mute icon is clicked */ onMuteToggle?: () => void; /** * Options shown in the 3-dot dropdown menu. Defaults to Captions and * Playback Speed if not passed. */ menuOptions?: Array<{ label: string | React.ReactNode; value: string; icon?: string; [key: string]: any; }>; /** * Called when a dropdown menu option is clicked */ onMenuOptionClick?: (option: { label: string | React.ReactNode; value: string; }) => void; /** * Disables all controls (play/pause, seek, mute, menu) */ disabled?: boolean; /** * Seconds to jump forward/backward when using the arrow key shortcuts. Defaults to 5. */ seekStep?: number; /** * Format function for the time labels. Defaults to mm:ss. */ formatTime?: (seconds: number) => string; /** * To add styles in AudioPlayer */ className?: string; style?: React.CSSProperties; showCaptions?: boolean; [key: string]: any; }