Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ang-music-player

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ang-music-player

Angular Music/Audio Player component for web applications. Easy and HIGHLY customisable.

  • 0.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Angular Music / Audio Player

Angular Music/Audio Player component for web applications. Easy and HIGHLY customisable. Stackblitz example

alt text

Getting Started

Installation

  • Install the package :

npm install ang-music-player --save

  • Once installed import AngMusicPlayerModule from the installed package into your module as follows:

Usage

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"
    }
  ];

Properties

The following list of properties are supported by the component.

PropertyTypeDescriptionDefault Value
widthStringWidth of the audio player500px
heightStringHeight of the audio playerstrue
backgroundColorStringBackground color of the audio player#000000
audioTimeColorStringAudio time colorrgb(76, 130, 175)
audioTitleColorStringAudio title colorrgb(76, 130, 175)
timeSliderColorStringAudio time slider color#fffff
volumeSliderColorStringVolume slider color#fffff
playButtonColorStringColor of play buttonrgb(76, 130, 175)
pauseButtonColorStringColor of pause buttonrgb(76, 130, 175)
nextButtonColorStringColor of next buttonrgb(76, 130, 175)
previousButtonColorStringColor of previous buttonrgb(76, 130, 175)
repeatButtonColorStringColor of repeat buttonrgb(76, 130, 175)
activeRepeatButtonColorStringColor of active repeat buttongreen
volumeButtonColorStringColor of volume buttonrgb(76, 130, 175)
muteButtonColorStringColor of mute buttonrgb(76, 130, 175)
playEventEventPlay button click event
pauseEventEventPause button click event
nextEventEventNext button click event
previousEventEventPrevious button click event
repeatEventEventRepeat button click event
seekEventEventSeek Audio event

This project was generated with Angular CLI version 8.2.0.

Development server

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.

Code scaffolding

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.

Build

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.

Running unit tests

Run ng test to execute the unit tests via Karma.

Running end-to-end tests

Run ng e2e to execute the end-to-end tests via Protractor.

Further help

To get more help on the Angular CLI use ng help or go check out the Angular CLI README.

TODO

Shuffle option

audio list option

License

MIT License.

Keywords

FAQs

Package last updated on 09 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc