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

ngx-audio-player

Package Overview
Dependencies
Maintainers
1
Versions
64
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ngx-audio-player

A library for loading and playing audio using HTML 5 for Angular 7/8/9. (https://vmudigal.github.io/ngx-audio-player/)

  • 9.0.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
324
decreased by-66.04%
Maintainers
1
Weekly downloads
 
Created
Source

Angular Audio Player

A library for loading and playing audio using HTML 5 for Angular 7/8/9.
(https://vmudigal.github.io/ngx-audio-player/)

Travis-CI npm npm version Downloads licence Support Support Support

Table of contents

Demo

Basic Player

A simple, clean, responsive player for playing single audio with or without title.

alt tag

Advanced Player

A simple, clean, responsive player for playing multiple audios with playlist support.

alt tag

Working Demo

Installation

ngx-audio-player is available via npm and yarn

Using npm:

$ npm install ngx-audio-player --save

Using yarn:

$ yarn add ngx-audio-player

Getting Started

NgxAudioPlayerModule needs Angular Material.
Make sure you have installed below dependencies with same or higher version than mentioned.

"@angular/core": "^9.0.0"
"@angular/common": "^9.0.0"
"@angular/material": "^9.0.0"

Import NgxAudioPlayerModule in in the root module(AppModule):

// Import library module
import { NgxAudioPlayerModule } from 'ngx-audio-player';

@NgModule({
  imports: [
    // ...
    NgxAudioPlayerModule
  ]
})
export class AppModule { }

Usage

Material Style Basic Audio Player
HTML
<mat-basic-audio-player [audioUrl]="msbapAudioUrl" [title]="msbapTitle" [autoPlay]="false" muted="muted"
    [displayTitle]="msbapDisplayTitle" [displayVolumeControls]="msaapDisplayVolumeControls" ></mat-basic-audio-player>
TS
// Material Style Basic Audio Player Title and Audio URL
msbapTitle = 'Audio Title';
msbapAudioUrl = 'Link to audio URL';   
   
msbapDisplayTitle = false; 
msbapDisplayVolumeControls = true;  
Properties
NameDescriptionTypeDefault Value
@Input() title: string;title to be displayedoptionalnone
@Input() audioUrl: string;url of the audiomandatorynone
@Input() autoPlay: false;true - if the audio needs to be played automaticllyoptionalfalse
@Input() displayTitle = false;true - if the audio title needs to be displayedoptionalfalse
@Input() displayVolumeControls = true;false - if the volume controls needs to be hiddenoptionaltrue
Material Style Advanced Audio Player
HTML
<mat-advanced-audio-player [playlist]="msaapPlaylist" [displayTitle]="msaapDisplayTitle" [autoPlay]="false" 
    muted="muted" [displayPlaylist]="msaapDisplayPlayList" [pageSizeOptions]="pageSizeOptions" 
        [displayVolumeControls]="msaapDisplayVolumeControls" [expanded]="true"></mat-advanced-audio-player> 
TS
import { Track } from 'ngx-audio-player';   
   
.   
.   

msaapDisplayTitle = true;
msaapDisplayPlayList = true;
msaapPageSizeOptions = [2,4,6];
msaapDisplayVolumeControls = true;
   
// Material Style Advance Audio Player Playlist
msaapPlaylist: Track[] = [
  {
    title: 'Audio One Title',
    link: 'Link to Audio One URL'
  },
  {
    title: 'Audio Two Title',
    link: 'Link to Audio Two URL'
  },
  {
    title: 'Audio Three Title',
    link: 'Link to Audio Three URL'
  },
];
Properties
NameDescriptionTypeDefault Value
@Input() playlist: Track[];playlist containing array of title and linkmandatoryNone
@Input() autoPlay: false;true - if the audio needs to be played automaticllyoptionalfalse
@Input() displayTitle: true;false - if the audio title needs to be hiddenoptionaltrue
@Input() displayPlaylist: true;false - if the playlist needs to be hiddenoptionaltrue
@Input() pageSizeOptions = [10, 20, 30];number of items to be displayed in the playlistoptional[10,20,30]
@Input() expanded = true;false - if the playlist needs to be minimizedoptionaltrue
@Input() displayVolumeControls = true;false - if the volume controls needs to be hiddenoptionaltrue

Versioning

ngx-audio-player will be maintained under the Semantic Versioning guidelines. Releases will be numbered with the following format:

<major>.<minor>.<patch>

For more information on SemVer, please visit http://semver.org.

Developer

Vijayendra Mudigal

License

The MIT License (MIT)

Donate

If you like my work you can buy me a :beer: or :pizza:

Donate

Keywords

FAQs

Package last updated on 11 Feb 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