Roover
๐ฑ A lightweight audio library for React apps.
Install / Use
/learn @leonardomso/RooverREADME
Motivation
Modern applications are using audio all the time. Audio can turn a boring application into an interesting one, adding emotion to the content. Most of the modern applications that we use daily are using audio for at least in some part.
Work with audio in React applications is painful. There are not too many good libraries to manage audio and most of the time we need to create our solutions. Manage audio in a modern application is important and should be made by using the best tools and libraries.
The idea to create this library was to provide a powerful and lightweight audio library for React apps. A custom React Hook that is easy to integrate with and has a ton of features to help speed up development without having to worry about anything.
Installation
yarn add roover
Usage
All you need to do is import the useRoover hook and use it on your React component.
import React from 'react';
import useRoover from 'roover';
const src =
'https://storage.googleapis.com/media-session/elephants-dream/the-wires.mp3';
const App = () => {
const {
initial,
loading,
ready,
playing,
paused,
onPlay,
onPause,
} = useRoover({
src,
autoplay: true,
});
return (
<div>
<p>Loading: {loading ? 'true' : 'false'}</p>
<p>Ready: {ready ? 'true' : 'false'}</p>
<button onClick={onPlay}>Play</button>
<button onClick={onPause}>Pause</button>
</div>
);
};
Example
To run the example do the following steps:
git clonethe repositorycd roover/exampleyarn installyarn start
Contributing
Your contributions are welcome! If you have any questions or want to start to contribute to this library in any form, please open an issue. Feel free to open PR.
If there are any questions about this library or about any other topic, please contact me on Twitter @leonardomso and I'll gladly answer it.
License
MIT License ยฉ 2021 Leonardo Maldonado
Related Skills
bluebubbles
349.2kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
slack
349.2kUse when you need to control Slack from OpenClaw via the slack tool, including reacting to messages or pinning/unpinning items in Slack channels or DMs.
qqbot-channel
349.2kQQ ้ข้็ฎก็ๆ่ฝใๆฅ่ฏข้ข้ๅ่กจใๅญ้ข้ใๆๅใๅๅธใๅ ฌๅใๆฅ็จ็ญๆไฝใไฝฟ็จ qqbot_channel_api ๅทฅๅ ทไปฃ็ QQ ๅผๆพๅนณๅฐ HTTP ๆฅๅฃ๏ผ่ชๅจๅค็ Token ้ดๆใๅฝ็จๆท้่ฆๆฅ็้ข้ใ็ฎก็ๅญ้ข้ใๆฅ่ฏขๆๅใๅๅธๅธๅญ/ๅ ฌๅ/ๆฅ็จๆถไฝฟ็จใ
frontend-design
109.5kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
