Skip to content

Commit e9298f6

Browse files
committed
Merge branch 'master' into 8.0.x
# Conflicts: # package-lock.json # package.json # projects/ngx-audio-player/package.json # projects/ngx-audio-player/src/lib/component/mat-advanced-audio-player/mat-advanced-audio-player.component.ts
2 parents 2c5ff95 + d5276f8 commit e9298f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+2648
-1339
lines changed

.github/FUNDING.yml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
github: vmudigal
2+
patreon: vmudigal
3+
custom: ['https://www.paypal.me/mudigal']

README.md

+55-30
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# Angular Audio Player
21

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.
43
(https://vmudigal.github.io/ngx-audio-player/)
54

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+
[![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.6) [![Support](https://img.shields.io/badge/support-Angular%208+-brown.svg)](https://www.npmjs.com/package/ngx-audio-player/v/8.0.4) [![Support](https://img.shields.io/badge/support-Angular%209+-black.svg)](https://www.npmjs.com/package/ngx-audio-player/v/9.1.1)
76

87
## Table of contents
98

@@ -47,13 +46,13 @@ $ yarn add ngx-audio-player
4746

4847
## Getting Started
4948

50-
NgxAudioPlayerModule needs Angular Material and FontAwesome 5+.
49+
NgxAudioPlayerModule needs Angular Material.
5150
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"
5756

5857
Import `NgxAudioPlayerModule` in in the root module(`AppModule`):
5958

@@ -77,7 +76,7 @@ export class AppModule { }
7776
##### HTML
7877

7978
```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)"
8180
[displayTitle]="msbapDisplayTitle" [displayVolumeControls]="msaapDisplayVolumeControls" ></mat-basic-audio-player>
8281
```
8382

@@ -94,21 +93,23 @@ msbapDisplayVolumeControls = true;
9493

9594
##### Properties
9695

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+
104105

105106
#### Material Style Advanced Audio Player
106107

107108
##### HTML
108109

109110
```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)"
112113
[displayVolumeControls]="msaapDisplayVolumeControls" [expanded]="true"></mat-advanced-audio-player>
113114
```
114115

@@ -144,14 +145,16 @@ msaapPlaylist: Track[] = [
144145

145146
##### Properties
146147

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 - |
155158

156159

157160
## Versioning
@@ -166,16 +169,38 @@ For more information on SemVer, please visit http://semver.org.
166169
## Developer
167170

168171
##### [Vijayendra Mudigal](mailto:[email protected])
169-
- [Profile](http://vijayendra.mudigal.com)
172+
- [Profile](https://vijayendra.mudigal.com)
170173
- [GitHub](https://github.com/vmudigal)
171174
- [Linkedin](https://www.linkedin.com/in/vijayendra)
172175

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+
173199
## License
174200

175201
##### The MIT License (MIT)
176202

177-
#
178-
# Donate
203+
## Donate
179204

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

angular.json

+12-3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
"build": {
1414
"builder": "@angular-devkit/build-angular:browser",
1515
"options": {
16+
"aot": false,
1617
"outputPath": "dist/ngx-audio-player-demo",
1718
"index": "src/index.html",
1819
"main": "src/main.ts",
@@ -24,7 +25,6 @@
2425
],
2526
"styles": [
2627
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
27-
"./node_modules/@ngx-share/button/themes/material/material-light-theme.css",
2828
"src/styles.css"
2929
],
3030
"scripts": []
@@ -42,15 +42,19 @@
4242
"sourceMap": false,
4343
"extractCss": true,
4444
"namedChunks": false,
45-
"aot": true,
45+
"aot": false,
4646
"extractLicenses": true,
4747
"vendorChunk": false,
48-
"buildOptimizer": true,
48+
"buildOptimizer": false,
4949
"budgets": [
5050
{
5151
"type": "initial",
5252
"maximumWarning": "2mb",
5353
"maximumError": "5mb"
54+
},
55+
{
56+
"type": "anyComponentStyle",
57+
"maximumWarning": "6kb"
5458
}
5559
]
5660
}
@@ -144,6 +148,11 @@
144148
"options": {
145149
"tsConfig": "projects/ngx-audio-player/tsconfig.lib.json",
146150
"project": "projects/ngx-audio-player/ng-package.json"
151+
},
152+
"configurations": {
153+
"production": {
154+
"tsConfig": "projects/ngx-audio-player/tsconfig.lib.prod.json"
155+
}
147156
}
148157
},
149158
"test": {

0 commit comments

Comments
 (0)