Angular Music/Audio Player component for web applications. Easy and HIGHLY customisable. Stackblitz example
- Install the package :
npm install ang-music-player --save
- Once installed import
AngMusicPlayerModulefrom the installed package into your module as follows:
Import AngMusicPlayerModule into NgModule in app.module.ts.
import { AngMusicPlayerModule } from 'ang-music-player';
import { CommonModule } from '@angular/common';
@NgModule({
// ...
imports: [
AngMusicPlayerModule,
CommonModule
]
// ...
})Add the following component tag in you template (no properties)
<ang-music-player [audioList] = audioList></ang-music-player>audioList is an array of objects
audioList = [
{
url: "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-1.mp3",
title: "Smaple 1",
cover: "https://i1.sndcdn.com/artworks-000249294066-uow7s0-t500x500.jpg"
},
{
url: "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-10.mp3",
title: "Sample 2",
cover: "https://i1.sndcdn.com/artworks-000249294066-uow7s0-t500x500.jpg"
},
{
url: "https://www.soundhelix.com/examples/mp3/SoundHelix-Song-12.mp3",
title: "Sample 3",
cover: "https://i1.sndcdn.com/artworks-000249294066-uow7s0-t500x500.jpg"
}
];
The following list of properties are supported by the component.
This project was generated with Angular CLI version 8.2.0.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory. Use the --prod flag for a production build.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via Protractor.
To get more help on the Angular CLI use ng help or go check out the Angular CLI README.
MIT License.

