react-hooks-audio
v0.1.4
Published
Custom audio playback for React Hooks
Downloads
25
Maintainers
Readme
react-hooks-audio
suitable for use in React 16.x technology stack projects.
🚀 Features
- Custom audio playback
- Implemented based on React Hooks
🎉 Live demo
https://winfans.github.io/react-hooks-audio/
Installation
npm install --save react-hooks-audio
Usage
demo
import { useAudio } from 'react-hooks-audio';
const { playing, play, pause, currentTime, audioTime, setCurrentTime, init, rePlay } = useAudio({ value: 'xxx' });
Browser compatibility
| IE / Edge | Firefox | Chrome | Safari | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | IE11, Edge | last 3 versions | last 3 versions | last 2 versions |
Open source agreement
react-hooks-audio follow MIT License。