import * as React from 'react'; export interface AudioPlayerProps { /** Applies a data-hook HTML attribute that can be used in the tests. */ dataHook?: string; /** Specifies a CSS class name to be appended to the component's root element. * @internal */ className?: string; /** * Specifies a link to the source of the track to be loaded for the sound (URL or base64 data URI). * If a file has no extension, you need to specify the extension using the format property. */ src: string; /** * Specifies a file format in situations where extraction doesn't work (such as a SoundCloud stream).
* By default, AudioPlayer detects your file format from the extension. */ format?: string; /** * Determines what to download when the component is rendered: full file, its metadata or nothing at all. * When webAudioAPI = true you can only set it to either 'auto' or 'none'. * When webAudioAPI = false you can set it to 'auto', 'metadata' or 'none'. */ preload?: 'metadata' | 'auto' | 'none'; /** * Start playback automatically when audio is loaded. */ autoplay?: boolean; /** * Specifies whether to force the browser's Web Audio API, which allows advanced audio processing. Use it only for relatively * small audio files, because the full file has to download and decode before playback starts. */ webAudioAPI?: boolean; /** * Defines a callback function which is called when audio is loaded. */ onLoad?(): void; /** * Defines a callback function which is called every time audio fails to load. */ onLoadError?(errorMsg: string): void; /** * Volume level from 0 (muted) to 1 (full volume). When not provided, defaults to Howler's default (1). */ volume?: number; /** * Defines a callback function which is called when audio is played. */ onPlay?(): void; /** * Defines a callback function which is called when audio is paused. */ onPause?(): void; /** Will be called when audio is ended. */ onEnd?(): void; /** * Defines a callback function which is called when audio is sought explicitly (i.e. when user drags the slider). */ onSeek?(): void; } export type AudioPlayerImperativeActions = { focus(): void; }; declare const AudioPlayer: React.FC< AudioPlayerProps & React.RefAttributes >; export { AudioPlayer };