Skip to content
This repository was archived by the owner on Dec 6, 2025. It is now read-only.

Commit 18e1451

Browse files
authored
2.5.2 - Update to latest version
2 parents 5e3d230 + 581825d commit 18e1451

Some content is hidden

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

61 files changed

+2618
-1452
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
Demo
44
</a>
55
<a href="https://habarnam.io/player/home" target="_blank" title="YouTube Player">
6-
<img alt="Angular YouTube Player Logo" src="https://i.imgur.com/HyLDe9j.jpg" style="height: auto; max-width:100%;" />
6+
<img alt="Angular YouTube Player Logo" src="https://i.imgur.com/HPPdUMC.jpg" style="height: auto; max-width:100%;" />
77
</a>
88
</p>
99

1010
# About Player
11-
[![Version](https://img.shields.io/badge/Current%20version-v2.5.1-brightgreen.svg?style=flat)](https://github.com/quead/angular-youtube-player)
11+
[![Version](https://img.shields.io/badge/Current%20version-v2.5.2-brightgreen.svg?style=flat)](https://github.com/quead/angular-youtube-player)
1212

1313
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/quead/angular-youtube-player/master/LICENSE)
1414
[![GitHub forks](https://img.shields.io/github/forks/quead/angular-youtube-player.svg)](https://github.com/quead/angular-youtube-player/network)
@@ -52,6 +52,11 @@ Check [angular documentation](https://angular.io/cli/build 'angular cli') for ot
5252
`ng build --prod=true`
5353

5454
## Changelog
55+
Angular YouTube Player 2.5.2
56+
- Add category badge to feed videos and current video
57+
- UI updates
58+
- New modal component
59+
5560
Angular YouTube Player 2.5.1
5661
- Upgrade angular to LTS (from 7 to 8)
5762
- Fixed repeat mode

angular.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,19 @@
2121
"src/favicon.ico"
2222
],
2323
"styles": [
24-
"src/assets/scss/main.scss"
24+
"src/assets/scss/main.scss",
25+
"./node_modules/ionicons/dist/scss/ionicons.scss"
2526
],
2627
"scripts": []
2728
},
2829
"configurations": {
2930
"production": {
31+
"budgets": [
32+
{
33+
"type": "anyComponentStyle",
34+
"maximumWarning": "6kb"
35+
}
36+
],
3037
"optimization": true,
3138
"outputHashing": "all",
3239
"sourceMap": false,
@@ -71,7 +78,8 @@
7178
"tsConfig": "src/tsconfig.spec.json",
7279
"scripts": [],
7380
"styles": [
74-
"src/assets/scss/main.scss"
81+
"src/assets/scss/main.scss",
82+
"./node_modules/ionicons/dist/scss/ionicons.scss"
7583
],
7684
"assets": [
7785
"src/assets",

browserslist

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# You can see what browsers were selected by your queries by running:
6+
# npx browserslist
7+
8+
> 0.5%
9+
last 2 versions
10+
Firefox ESR
11+
not dead
12+
not IE 9-11 # For IE 9-11 support, remove 'not'.

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-youtube-player",
3-
"version": "2.5.1",
3+
"version": "2.5.2",
44
"license": "MIT",
55
"scripts": {
66
"ng": "ng",
@@ -12,33 +12,33 @@
1212
},
1313
"private": true,
1414
"dependencies": {
15-
"@angular-devkit/build-angular": "^0.802.0",
16-
"@angular/cdk": "^7.3.7",
17-
"@angular/common": "^8.2.0",
18-
"@angular/compiler": "^8.2.0",
19-
"@angular/core": "^8.2.0",
20-
"@angular/forms": "^8.2.0",
21-
"@angular/http": "^7.2.13",
22-
"@angular/platform-browser": "^8.2.0",
23-
"@angular/platform-browser-dynamic": "^8.2.0",
24-
"@angular/router": "^8.2.0",
15+
"@angular-devkit/build-angular": "~0.803.14",
16+
"@angular/cdk": "^8.2.3",
17+
"@angular/common": "^8.2.12",
18+
"@angular/compiler": "^8.2.12",
19+
"@angular/core": "^8.2.12",
20+
"@angular/forms": "^8.2.12",
21+
"@angular/platform-browser": "^8.2.12",
22+
"@angular/platform-browser-dynamic": "^8.2.12",
23+
"@angular/router": "^8.2.12",
2524
"@ngu/carousel": "^1.5.5",
2625
"core-js": "^2.5.7",
2726
"hammerjs": "^2.0.8",
28-
"ngx-socket-io": "^2.1.1",
29-
"rxjs": "^6.4.0",
27+
"ionicons": "^4.6.2",
28+
"ngx-socket-io": "^3.0.1",
29+
"rxjs": "^6.5.3",
3030
"rxjs-compat": "^6.4.0",
31-
"tslib": "^1.9.0",
32-
"zone.js": "^0.9.1"
31+
"tslib": "^1.10.0",
32+
"zone.js": "~0.9.1"
3333
},
3434
"devDependencies": {
35-
"@angular/cli": "^8.0.1",
36-
"@angular/compiler-cli": "~8.2.0",
37-
"@angular/language-service": "~8.2.0",
35+
"@angular/cli": "^8.3.14",
36+
"@angular/compiler-cli": "~8.2.12",
37+
"@angular/language-service": "~8.2.12",
3838
"@types/jasmine": "~2.8.8",
3939
"@types/jasminewd2": "~2.0.3",
4040
"@types/node": "~8.9.4",
41-
"codelyzer": "~4.5.0",
41+
"codelyzer": "^5.0.1",
4242
"jasmine-core": "~2.99.1",
4343
"jasmine-spec-reporter": "~4.2.1",
4444
"karma": "^4.0.1",

src/app/app.component.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
<header>
2+
<div id="github">
3+
<a href="https://github.com/quead/angular-youtube-player" target="_blank" title="Angular Youtube Player GitHub" class="github-svg">Angular Youtube Player GitHub</a>
4+
</div>
25
<div id="logo">
36
<a routerLink="/category/all" class="logo-svg" title="Homepage"></a>
47
<small>{{globals.regionCode}}</small>
@@ -27,7 +30,7 @@
2730
<router-outlet></router-outlet>
2831
</div>
2932
<div [ngClass]="{'active': notify.defaults.enabled }" class="notif notif-primary">
30-
<span class="fa fa-cog fa-spin fa-fw"></span>
33+
<span class="icon ion-ios-settings"></span>
3134
<p>{{ notify.defaults.message }}</p>
3235
</div>
3336
</div>

src/app/app.component.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, ElementRef, ViewChild, OnInit } from '@angular/core';
1+
import { Component, ElementRef, ViewChild, OnInit, HostListener } from '@angular/core';
22
import { SharedService } from './services/shared.service';
33
import { NotifyService } from './services/notify.service';
44
import { GlobalsService } from './services/globals.service';
@@ -11,13 +11,23 @@ import { PlaylistControlService } from './services/playlist-control.service';
1111
})
1212
export class AppComponent implements OnInit {
1313
@ViewChild('videoItemIDvalue', { static: true }) videoItemIDvalue: ElementRef;
14+
@HostListener('window:scroll', ['$event'])
15+
onWindowScroll() {
16+
const pos = (document.documentElement.scrollTop || document.body.scrollTop) + document.documentElement.offsetHeight;
17+
const max = document.documentElement.scrollHeight;
18+
if (pos === max) {
19+
console.log('End of page');
20+
// To check if is on homepage and implement virtual scroll
21+
// this.shared.initFeed('', this.globals.nextPageToken)
22+
}
23+
}
1424

1525
constructor(
1626
public shared: SharedService,
1727
public globals: GlobalsService,
1828
public playlistCTRL: PlaylistControlService,
1929
public notify: NotifyService
20-
) {}
30+
) { }
2131

2232
ngOnInit() {
2333
this.globals.videoItemIDvalue = this.videoItemIDvalue;

src/app/app.module.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
NguCarousel
1414
} from '@ngu/carousel';
1515
import { environment } from '../environments/environment';
16+
import { ShortNumPipe } from './pipes/short-num.pipe';
1617

1718
import { AppComponent } from './app.component';
1819
import { SessionManagerService } from './services/session-manager.service';
@@ -34,6 +35,10 @@ import { RoomComponent } from './components/room/room.component';
3435
import { YoutubeIframeComponent } from './components/youtube-iframe/youtube-iframe.component';
3536
import { ButtonsComponent } from './components/player/buttons/buttons.component';
3637
import { VideoItemComponent } from './components/player/video-item/video-item.component';
38+
import { CategoryBadgeComponent } from './components/category/category-badge/category-badge.component';
39+
40+
import { ModalComponent } from './components/modal/modal.component';
41+
import { ModalService } from './services/modal.service';
3742

3843
const config: SocketIoConfig = { url: environment.serverURL, options: {} };
3944

@@ -61,7 +66,10 @@ const config: SocketIoConfig = { url: environment.serverURL, options: {} };
6166
RoomComponent,
6267
YoutubeIframeComponent,
6368
ButtonsComponent,
64-
VideoItemComponent
69+
VideoItemComponent,
70+
CategoryBadgeComponent,
71+
ModalComponent,
72+
ShortNumPipe
6573
],
6674
bootstrap: [AppComponent],
6775
providers: [
@@ -72,9 +80,12 @@ const config: SocketIoConfig = { url: environment.serverURL, options: {} };
7280
PlaylistControlService,
7381
SharedService,
7482
GlobalsService,
83+
ModalService,
84+
ModalComponent,
7585
NguCarouselConfig,
7686
NguCarousel,
77-
ButtonsComponent
87+
ButtonsComponent,
88+
CategoryBadgeComponent
7889
]
7990
})
80-
export class AppModule {}
91+
export class AppModule { }
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<div class="app-head">
2-
<h2>About</h2>
3-
</div>
4-
<div class="app-content">
5-
<p>This is a simple youtube web player and desktop player based on angular-cli, socket.io, ngu-carousel, @angular/material.</p>
6-
<p>This player is compatible only with Chrome/webkit browsers.</p>
7-
<p>The project status is beta.</p>
1+
<div class="app-container">
2+
<div class="app-head">
3+
<h2>About</h2>
4+
</div>
5+
<div>
6+
<p>This is a simple youtube web player and desktop player based on angular-cli, socket.io, ngu-carousel, @angular/material.</p>
7+
<p>This player is compatible only with Chrome/webkit browsers.</p>
8+
<p>The project status is beta.</p>
9+
</div>
810
</div>
Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +0,0 @@
1-
app-about {
2-
.app-content {
3-
background-color: var(--c-dark-gray);
4-
padding: 10px 20px;
5-
border-radius: 5px;
6-
p {
7-
margin: 5px 0;
8-
}
9-
}
10-
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<ng-container *ngIf="globals.categories">
2+
<div class="badge-container">
3+
<ng-container *ngFor="let category of globals.categories">
4+
<p *ngIf="category.id === categoryID" class="badge">{{category.title}}</p>
5+
</ng-container>
6+
</div>
7+
</ng-container>

0 commit comments

Comments
 (0)