tunzo-player
Version:
A music playback service for Angular and Ionic apps with native audio control support.
80 lines (60 loc) • 2.62 kB
Markdown
[](https://www.npmjs.com/package/tunzo-player)
[](https://www.npmjs.com/package/tunzo-player)
[](LICENSE)
[](#)
[](#)
[](#)
> Built for the **Tunzo Music App** — now available as a reusable npm package
> A feature-rich audio playback utility for Angular + Ionic applications
<!-- 
*(Consider adding a real screenshot or animated GIF here)* -->
| Category | Features |
|----------------|--------------------------------------------------------------------------|
| **Playback** | Queue management, Shuffle, Repeat, Crossfade |
| **Quality** | Dynamic stream quality (12kbps to 320kbps) |
| **UI** | Dark/Light theme support with auto-detection |
| **Storage** | Firestore & localStorage integration for favorites |
| **Modular** | Reusable service classes with clean API |
## 💻 Basic Usage
```bash
import {
TunzoPlayer,
StreamSettings,
ThemeManager,
Favorites,
TunzoPlayerAPI
} from '/tunzo-player';
// Initialize components
const player = new TunzoPlayer();
const api = new TunzoPlayerAPI();
// Example workflow
async function playMusic() {
// Search songs
const results = await api.searchSongs('popular songs');
// Play first result
player.playSong(results[0]);
// Like the song
Favorites.like(results[0]);
// Set quality to High
StreamSettings.setQuality(3);
// Enable dark mode
ThemeManager.toggleDarkMode(true);
}
```
```bash
npm i tunzo-player
yarn add tunzo-player
```
| Value | Label |
| ----- | ----------------- |
| 0 | Very Low (12kbps) |
| 1 | Low (48kbps) |
| 2 | Medium (96kbps) |
| 3 | High (160kbps) |
| 4 | Ultra (320kbps) |
# tunzo-player