Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 3.14 KB

README-zh.md

File metadata and controls

37 lines (23 loc) · 3.14 KB

react-hooks-audio

适合在 React 16.x 技术栈项目中使用。

🎉 特性

  • 自定义音频播放
  • 基于 React Hooks 实现

🎉 在线 demo

https://winfans.github.io/react-hooks-audio/

安装

npm install --save react-hooks-audio

用法

demo

import { useAudio } from 'react-hooks-audio';
const { playing, play, pause, currentTime, audioTime, setCurrentTime, init, rePlay } = useAudio({ value: 'xxx' });

浏览器兼容性

IE / Edge
IE / Edge
Firefox
Firefox
Chrome
Chrome
Safari
Safari
IE11, Edge last 3 versions last 3 versions last 2 versions

开源协议

react-hooks-audio 遵循 MIT 协议