1
- # Angular Audio Player
2
1
3
- A library for loading and playing audio using HTML 5 for Angular 7 or Angular 8 .
2
+ A library for loading and playing audio using HTML 5 for Angular 7/8/9 .
4
3
(https://vmudigal.github.io/ngx-audio-player/ )
5
4
6
- [ ![ Travis-CI] ( https://travis-ci.com/vmudigal/ngx-audio-player.svg?branch=master )] ( https://travis-ci.com/vmudigal/ngx-audio-player.svg?branch=master ) [ ![ npm] ( https://img.shields.io/badge/demo-online-ed1c46.svg?colorB=orange )] ( https://vmudigal.github.io/ngx-audio-player/ ) [ ![ npm version] ( https://img.shields.io/npm/v/ngx-audio-player.svg?colorB=red )] ( https://www.npmjs.com/package/ngx-audio-player ) [ ![ Downloads] ( https://img.shields.io/npm/dm/ngx-audio-player.svg?colorB=48C9B0 )] ( https://www.npmjs.com/package/ngx-audio-player ) [ ![ licence] ( https://img.shields.io/npm/l/ngx-audio-player.svg?colorB=yellow )] ( https://www.npmjs.com/package/ngx-audio-player ) [ ![ Support] ( https://img.shields.io/badge/support-Angular%207%2B-blue.svg )] ( https://www.npmjs.com/package/ngx-audio-player/v/7.1.5 ) [ ![ Support] ( https://img.shields.io/badge/support-Angular%208+-brown.svg )] ( https://www.npmjs.com/package/ngx-audio-player/v/8.0.1 )
5
+ [](https://travis-ci.com/vmudigal/ngx-audio-player.svg?branch=master) [](https://vmudigal.github.io/ngx-audio-player/) [](https://www.npmjs.com/package/ngx-audio-player) [](https://www.npmjs.com/package/ngx-audio-player) [](https://www.npmjs.com/package/ngx-audio-player) [](https://www.npmjs.com/package/ngx-audio-player/v/7.1.6) [](https://www.npmjs.com/package/ngx-audio-player/v/8.0.4) [](https://www.npmjs.com/package/ngx-audio-player/v/9.1.1)
7
6
8
7
## Table of contents
9
8
@@ -47,13 +46,13 @@ $ yarn add ngx-audio-player
47
46
48
47
## Getting Started
49
48
50
- NgxAudioPlayerModule needs Angular Material and FontAwesome 5+ .
49
+ NgxAudioPlayerModule needs Angular Material.
51
50
Make sure you have installed below dependencies with same or higher version than mentioned.
52
-
53
- "@angular/material ": "^8.0.0",
54
- "@fortawesome/ angular-fontawesome ": "^0.4.0",
55
- "@fortawesome/fontawesome-svg-core ": "^1.2.19",
56
- "@ fortawesome/free-solid-svg-icons ": "^5.9.0"
51
+
52
+ "@angular/core ": "^8.0.0"
53
+ "@angular/common ": "^8.0.0"
54
+ "@angular/material ": "^8.0.0"
55
+ "rxjs ": "^6.5.5"
57
56
58
57
Import ` NgxAudioPlayerModule ` in in the root module(` AppModule ` ):
59
58
@@ -77,7 +76,7 @@ export class AppModule { }
77
76
##### HTML
78
77
79
78
``` html
80
- <mat-basic-audio-player [audioUrl] =" msbapAudioUrl" [title] =" msbapTitle"
79
+ <mat-basic-audio-player [audioUrl] =" msbapAudioUrl" [title] =" msbapTitle" [autoPlay] = " false " muted = " muted " (trackEnded) = " onEnded($event) "
81
80
[displayTitle] =" msbapDisplayTitle" [displayVolumeControls] =" msaapDisplayVolumeControls" ></mat-basic-audio-player >
82
81
```
83
82
@@ -94,21 +93,23 @@ msbapDisplayVolumeControls = true;
94
93
95
94
##### Properties
96
95
97
- | Name | Description | Type | Default Value |
98
- | --------------------------------------------| ---------------------------------------------------| -----------| ---------------|
99
- | @Input () title: string; | title to be displayed | optional | none |
100
- | @Input () audioUrl: string; | url of the audio | mandatory | none |
101
- | @Input () displayTitle = false; | true - if the audio title needs to be displayed | optional | false |
102
- | @Input () displayVolumeControls = true; | false - if the volume controls needs to be hidden | optional | true |
103
-
96
+ | Name | Description | Type | Default Value |
97
+ | --------------------------------------------| -----------------------------------------------------| -----------| ---------------|
98
+ | @Input () title: string; | title to be displayed | optional | none |
99
+ | @Input () audioUrl: string; | url of the audio | mandatory | none |
100
+ | @Input () autoPlay: false; | true - if the audio needs to be played automaticlly | optional | false |
101
+ | @Input () displayTitle = false; | true - if the audio title needs to be displayed | optional | false |
102
+ | @Output () trackEnded: Subject<string >; | Callback method thats triggers once the track ends | optional | - N.A - |
103
+ | @Input () displayVolumeControls = true; | false - if the volume controls needs to be hidden | optional | true |
104
+
104
105
105
106
#### Material Style Advanced Audio Player
106
107
107
108
##### HTML
108
109
109
110
``` html
110
- <mat-advanced-audio-player [playlist] =" msaapPlaylist" [displayTitle] =" msaapDisplayTitle"
111
- [displayPlaylist] =" msaapDisplayPlayList" [pageSizeOptions] =" pageSizeOptions"
111
+ <mat-advanced-audio-player [playlist] =" msaapPlaylist" [displayTitle] =" msaapDisplayTitle" [autoPlay] = " false "
112
+ muted = " muted " [displayPlaylist] =" msaapDisplayPlayList" [pageSizeOptions] =" pageSizeOptions" (trackEnded) = " onEnded($event) "
112
113
[displayVolumeControls] =" msaapDisplayVolumeControls" [expanded] =" true" ></mat-advanced-audio-player >
113
114
```
114
115
@@ -144,14 +145,16 @@ msaapPlaylist: Track[] = [
144
145
145
146
##### Properties
146
147
147
- | Name | Description | Type | Default Value |
148
- | --------------------------------------------| ---------------------------------------------------| -----------| ---------------|
149
- | @Input () playlist: Track[ ] ; | playlist containing array of title and link | mandatory | None |
150
- | @Input () displayTitle: true; | false - if the audio title needs to be hidden | optional | true |
151
- | @Input () displayPlaylist: true; | false - if the playlist needs to be hidden | optional | true |
152
- | @Input () pageSizeOptions = [ 10, 20, 30] ; | number of items to be displayed in the playlist | optional | [ 10,20,30] |
153
- | @Input () expanded = true; | false - if the playlist needs to be minimized | optional | true |
154
- | @Input () displayVolumeControls = true; | false - if the volume controls needs to be hidden | optional | true |
148
+ | Name | Description | Type | Default Value |
149
+ | --------------------------------------------| -----------------------------------------------------| -----------| ---------------|
150
+ | @Input () playlist: Track[ ] ; | playlist containing array of title and link | mandatory | None |
151
+ | @Input () autoPlay: false; | true - if the audio needs to be played automaticlly | optional | false |
152
+ | @Input () displayTitle: true; | false - if the audio title needs to be hidden | optional | true |
153
+ | @Input () displayPlaylist: true; | false - if the playlist needs to be hidden | optional | true |
154
+ | @Input () pageSizeOptions = [ 10, 20, 30] ; | number of items to be displayed in the playlist | optional | [ 10,20,30] |
155
+ | @Input () expanded = true; | false - if the playlist needs to be minimized | optional | true |
156
+ | @Input () displayVolumeControls = true; | false - if the volume controls needs to be hidden | optional | true |
157
+ | @Output () trackEnded: Subject<string > | Callback method thats triggers once the track ends | optional | - N.A - |
155
158
156
159
157
160
## Versioning
@@ -166,16 +169,38 @@ For more information on SemVer, please visit http://semver.org.
166
169
## Developer
167
170
168
171
##### [ Vijayendra Mudigal] ( mailto:[email protected] )
169
- - [ Profile] ( http ://vijayendra.mudigal.com)
172
+ - [ Profile] ( https ://vijayendra.mudigal.com)
170
173
- [ GitHub] ( https://github.com/vmudigal )
171
174
- [ Linkedin] ( https://www.linkedin.com/in/vijayendra )
172
175
176
+ ## Contributors ✨
177
+ Thanks goes to these wonderful people:
178
+
179
+ <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
180
+ <!-- prettier-ignore-start -->
181
+ <!-- markdownlint-disable -->
182
+
183
+ <table align =" center " >
184
+ <tr >
185
+ <td align =" center " ><a href =" https://github.com/EdricChan03 " ><img src =" https://avatars.githubusercontent.com/u/20047125?v=4 " width =" 100px; " alt =" " /><br /><sub ><b >Edric Chan</b ></sub ></a ><br /><a href =" https://github.com/vmudigal/ngx-audio-player/commits?author=EdricChan03 " title =" Code " >💻</a ></td >
186
+ <td align =" center " ><a href =" https://github.com/RokiFoki " ><img src =" https://avatars3.githubusercontent.com/u/9476596?v=4 " width =" 100px; " alt =" " /><br /><sub ><b >RokiFoki</b ></sub ></a ><br /><a href =" https://github.com/vmudigal/ngx-audio-player/commits?author=RokiFoki " title =" Code " >💻</a ></td >
187
+ <td align =" center " ><a href =" https://github.com/ewwwgiddings " ><img src =" https://avatars.githubusercontent.com/u/26286559?v=4 " width =" 100px; " alt =" " /><br /><sub ><b >ewwwgiddings</b ></sub ></a ><br /><a href =" https://github.com/vmudigal/ngx-audio-player/commits?author=ewwwgiddings " title =" Documentation " >📖</a ></td >
188
+ <td align =" center " ><a href =" https://github.com/cicsolutions " ><img src =" https://avatars1.githubusercontent.com/u/5200361?v=4 " width =" 100px; " alt =" " /><br /><sub ><b >Caleb Crosby</b ></sub ></a ><br /><a href =" https://github.com/vmudigal/ngx-audio-player/commits?author=cicsolutions " title =" Code " >💻</a ></td >
189
+ </tr >
190
+ </table >
191
+
192
+ <!-- markdownlint-enable -->
193
+ <!-- prettier-ignore-end -->
194
+ <!-- ALL-CONTRIBUTORS-LIST:END -->
195
+
196
+ ## Misc
197
+
198
+
173
199
## License
174
200
175
201
##### The MIT License (MIT)
176
202
177
- #
178
- # Donate
203
+ ## Donate
179
204
180
205
If you like my work you can buy me a :beer : or :pizza :
181
206
0 commit comments