UNPKG

a11y-player

Version:

An accessible DAISY format audiobook player for React applications

38 lines (37 loc) 1.6 kB
import { DaisyPlayerRef } from '../DaisyPlayer/DaisyPlayer'; export interface ComponentProps { /** Base URL for the DAISY book files */ dirUrl: string; /** Application URL for sharing links (used for bookmark generation) */ appUrl: string; /** URL Path to be appended to appUrl (used for final bookmark url) */ pathPrefix?: string; /** URL parameter name to use for the bookmark (default: "bookmark") */ bookmarkParam?: string; /** Language code (2 letters) for UI translations (default: "en") */ language?: string; /** Custom class name for the container */ className?: string; /** Callback for time updates */ onTimeUpdate?: (currentTime: number, bookmark: string, isPlaying: boolean) => void; /** Time update interval in milliseconds (default: 1000) */ timeUpdateInterval?: number; /** Callback when bookmark changes */ onBookmarkChange?: (bookmark: string) => void; /** Callback for playback state changes */ onPlaybackStateChange?: (state: { currentTime: number; duration: number; isPlaying: boolean; currentBookmark: string; playbackRate: number; }) => void; /** Callback when playback starts */ onPlay?: () => void; /** Callback when playback pauses */ onPause?: () => void; /** Callback when seeking to a new position */ onSeek?: (bookmark: string) => void; } declare const DaisyPlayerWithRouter: import('react').ForwardRefExoticComponent<ComponentProps & import('react').RefAttributes<DaisyPlayerRef>>; export default DaisyPlayerWithRouter;