@lobehub/tts
Version:
A high-quality & reliable TTS React Hooks library
41 lines (40 loc) • 1.1 kB
text/typescript
import { ActionIconProps } from "@lobehub/ui";
import * as react from "react";
import { CSSProperties } from "react";
//#region src/react/AudioPlayer/index.d.ts
interface AudioProps {
currentTime: number;
download: () => void;
duration: number;
isPlaying: boolean;
pause: () => void;
play: () => void;
setTime: (time: number) => void;
stop: () => void;
}
interface AudioPlayerProps {
allowPause?: boolean;
audio: AudioProps;
autoplay?: boolean;
buttonActive?: boolean;
buttonSize?: ActionIconProps['size'];
buttonStyle?: CSSProperties;
className?: string;
isLoading?: boolean;
onInitPlay?: () => void;
onLoadingStop?: () => void;
onPause?: () => void;
onPlay?: () => void;
onStop?: () => void;
showDonload?: boolean;
showSlider?: boolean;
showTime?: boolean;
style?: CSSProperties;
timeRender?: 'tag' | 'text';
timeStyle?: CSSProperties;
timeType?: 'left' | 'current' | 'combine';
title?: string;
}
declare const AudioPlayer: react.NamedExoticComponent<AudioPlayerProps>;
//#endregion
export { AudioPlayer, AudioPlayerProps, AudioProps };