https://github.com/abhinandansharma/ambiently
A lightweight ambient sound engine for Next.js apps.
https://github.com/abhinandansharma/ambiently
npm-package sounds
Last synced: 28 days ago
JSON representation
A lightweight ambient sound engine for Next.js apps.
- Host: GitHub
- URL: https://github.com/abhinandansharma/ambiently
- Owner: abhinandansharma
- Created: 2025-08-20T06:27:07.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-08-27T07:37:39.000Z (about 2 months ago)
- Last Synced: 2025-08-27T16:29:29.188Z (about 2 months ago)
- Topics: npm-package, sounds
- Language: TypeScript
- Homepage:
- Size: 12.2 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 🎶 Ambiently
A lightweight ambient sound engine for **Next.js apps**.
Play looping background sounds (lo-fi, rain, fireplace, etc.) with fade-in/out and volume control.Built with Next.js, ships with an **embeddable Ambiently Engine core** + a demo app.
---
## ✨ Features
- 🎵 Multiple background audio layers (rain, lofi, fireplace, etc.)
- 🔄 Seamless looping & volume control
- 🌗 Fade-in / fade-out playback
- ⚡ Simple API via `AmbientlyEngine`
- 🛠️ Next.js 13+ App Router ready
- 📦 Lightweight, no external deps---
## 📁 Project Structure
```plaintext
.
├── ambiently-core/ # Core audio engine (library)
│ ├── index.ts # Exports Ambiently + AmbientlyEngine
│ └── useAudioPlayer.ts
│
├── demo/ # Example Next.js app using Ambiently
│ └── app/
│ └── ambiently.tsx # Demo AmbientlyPlayer
│
├── public/sounds/ # Sample sound files
└── README.md
```---
## 🚀 Getting Started
#### Clone and run the demo locally:
```bash
npm install
npm run dev
Then open http://localhost:3000 🚀
```
## 🛠️ Usage
Install the core library:
npm install ambiently-core### Example usage inside your Next.js component:
```bash "use client";
import { AmbientlyEngine } from "ambiently-core";const engine = new AmbientlyEngine([
{ src: "/sounds/rain.mp3", volume: 0.5 },
{ src: "/sounds/lofi.mp3", volume: 0.7 }
]);export default function Player() {
return (
engine.toggle()}>
Toggle Ambient Sounds
);
}
```
## 📦 DeploymentThe easiest way to deploy the demo is on Vercel
.
Check out the Next.js deployment docs
for more details.## 🤝 Contributing
Contributions, issues, and feature requests are welcome!
Feel free to open an issue
or submit a PR.## 📜 License
MIT © Abhinandan Sharma