npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ngx-music-audio-player

v1.0.1

Published

A modern, minimal and professional audio player for Angular with playlist support, dark theme, and full controls

Readme

🎵 ngx-audio-player

A modern, minimal, and customizable audio player for Angular with playlist support, multiple themes, and a complete set of playback controls.

npm version Angular License


✨ Features

  • 🎵 Playlist Support – Play and manage a collection of audio tracks.
  • 🎨 Multiple Themes – Choose between Light, Dark, Minimal, and Compact themes.
  • 🔊 Complete Playback Controls – Play/Pause, Previous/Next, Shuffle, Repeat, and Volume control.
  • 🖼️ Album Cover Display – Beautiful album artwork with a blurred background effect.
  • 📱 Responsive Design – Optimized for desktop, tablet, and mobile devices.
  • 🚀 Standalone Components – No NgModule required.
  • 🎯 Interactive Progress Bar – Seek through tracks with accurate playback timing.
  • 🎨 Vector Icons – Powered by Feather Icons.
  • 🌙 Professional Dark Theme – Carefully crafted high-contrast color palette.

📦 Installation

1. Install the library

npm install ngx-audio-player

2. Install icon dependencies (Required)

This library uses @ng-icons for icons.

npm install @ng-icons/core @ng-icons/feather-icons

🚀 Quick Start

1. Import the component

app.component.ts

import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { PlayerContainerComponent, Track } from 'ngx-audio-player';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [CommonModule, PlayerContainerComponent],
  template: `
    <div style="padding:40px">
      <ngx-audio-player-container
        [playlist]="playlist"
        title="My Playlist"
        [theme]="'light'"
        [showCover]="true"
        [autoPlay]="false"
        (trackChanged)="onTrackChanged($event)"
      >
      </ngx-audio-player-container>
    </div>
  `,
})
export class AppComponent {
  playlist: Track[] = [
    {
      id: 1,
      title: 'Dreamscape',
      url: 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3',
      artist: 'SoundHelix',
      duration: 30,
      coverArt: 'https://picsum.photos/seed/dream/200/200',
    },
    {
      id: 2,
      title: 'Ocean Waves',
      url: 'https://www.soundhelix.com/examples/mp3/SoundHelix-Song-2.mp3',
      artist: 'SoundHelix',
      duration: 25,
      coverArt: 'https://picsum.photos/seed/ocean/200/200',
    },
  ];

  onTrackChanged(track: Track): void {
    console.log('🎵 Now Playing:', track.title);
  }
}

2. Bootstrap your application

main.ts

import { bootstrapApplication } from '@angular/platform-browser';
import { AppComponent } from './app/app.component';

bootstrapApplication(AppComponent).catch(console.error);

📖 Usage

PlayerContainerComponent

The main audio player component that encapsulates all player features.

Inputs

| Input | Type | Default | Description | | ----------------- | --------------------------------------------- | ---------------- | ---------------------------- | | playlist | Track[] | [] | List of audio tracks | | title | string | "Audio Player" | Player title | | theme | "light" \| "dark" \| "minimal" \| "compact" | "light" | Player theme | | showHeader | boolean | true | Show header | | showFooter | boolean | true | Show footer | | showActions | boolean | true | Show action buttons | | showCover | boolean | true | Display album artwork | | showClearButton | boolean | false | Show clear playlist button | | autoPlay | boolean | false | Automatically start playback | | startIndex | number | 0 | Initial track index |

Outputs

| Output | Type | Description | | ----------------- | --------------------- | ------------------------------------ | | trackChanged | EventEmitter<Track> | Fired when the current track changes | | playlistCleared | EventEmitter<void> | Fired when the playlist is cleared | | playerReady | EventEmitter<void> | Fired when the player is initialized |


Track Model

interface Track {
  id?: string | number;
  title: string;
  url: string;
  artist?: string;
  duration?: number;
  coverArt?: string;
}

Public Methods

The PlayerContainerComponent exposes the following methods:

// Play / Pause
togglePlay(): void;

// Next track
nextTrack(): void;

// Previous track
previousTrack(): void;

// Toggle shuffle mode
onShuffleToggle(): void;

// Toggle repeat mode
onRepeatToggle(): void;

// Clear playlist
onClearPlaylist(): void;

// Get current player state
getPlayerState(): PlayerState;

🎨 Themes

Light

<ngx-audio-player-container [theme]="'light'"> </ngx-audio-player-container>

Dark

<ngx-audio-player-container [theme]="'dark'"> </ngx-audio-player-container>

Minimal

<ngx-audio-player-container [theme]="'minimal'"> </ngx-audio-player-container>

Compact

<ngx-audio-player-container [theme]="'compact'"> </ngx-audio-player-container>

📱 Responsive Design

The player is fully responsive.

  • Desktop – Album artwork on the left, controls on the right.
  • Mobile – Album artwork on top, controls below.

🔧 Development

Build the library

ng build ngx-audio-player

Watch mode

ng build ngx-audio-player --watch

Run the demo application

ng serve demo

Publish to npm

cd dist/ngx-audio-player
npm publish

📂 Project Structure

ngx-audio-player/
├── src/
│   ├── lib/
│   │   ├── core/
│   │   │   ├── models/
│   │   │   ├── services/
│   │   │   └── state/
│   │   ├── components/
│   │   │   ├── player-container/
│   │   │   ├── player-controls/
│   │   │   └── playlist/
│   │   ├── utils/
│   │   └── public-api.ts
│   └── ...
├── package.json
└── README.md

🤝 Contributing

Contributions are welcome!

If you'd like to improve this project:

  1. Fork the repository.
  2. Create a feature branch.
git checkout -b feature/amazing-feature
  1. Commit your changes.
git commit -m "Add amazing feature"
  1. Push to your branch.
git push origin feature/amazing-feature
  1. Open a Pull Request.

📄 License

This project is licensed under the MIT License.

See the LICENSE file for details.


🙏 Acknowledgements

  • Angular — The modern web application framework.
  • Feather Icons — Beautiful open-source icons.
  • @ng-icons — Icon library for Angular.

📬 Author

GitHub: https://github.com/arazshamsaddinlouy


⭐ Support

If you find this project useful, consider giving it a ⭐ Star on GitHub. It helps the project grow and encourages future development.