suitable for use in React 16.x technology stack projects.
- Custom audio playback
- Implemented based on React Hooks
https://winfans.github.io/react-hooks-audio/
npm install --save react-hooks-audio
import { useAudio } from 'react-hooks-audio';
const { playing, play, pause, currentTime, audioTime, setCurrentTime, init, rePlay } = useAudio({ value: 'xxx' });
![]() IE / Edge |
![]() Firefox |
![]() Chrome |
![]() Safari |
---|---|---|---|
IE11, Edge | last 3 versions | last 3 versions | last 2 versions |
react-hooks-audio follow MIT License。