Skip to content

Commit 24ab076

Browse files
authored
2.6.0 - Update to latest version
2 parents 18e1451 + 262d4dd commit 24ab076

File tree

70 files changed

+1169
-801
lines changed

Some content is hidden

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

70 files changed

+1169
-801
lines changed

README.md

+17-11
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/HPPdUMC.jpg" style="height: auto; max-width:100%;" />
6+
<img alt="Angular YouTube Player Logo" src="https://i.imgur.com/rcuE2Ao.png" 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.2-brightgreen.svg?style=flat)](https://github.com/quead/angular-youtube-player)
11+
[![Version](https://img.shields.io/badge/Current%20version-v2.6.0-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)
@@ -18,7 +18,7 @@ This is a simple youtube web player based on [angular-cli](https://github.com/an
1818

1919
This player is compatible only with Chrome/webkit browsers.
2020

21-
*The project status is beta.*
21+
*The project status is RC (release candidate).*
2222

2323
## How to use
2424

@@ -31,15 +31,15 @@ This player is compatible only with Chrome/webkit browsers.
3131

3232
3. Add your youtube api key in **src/app/environments/settings.ts** or inside the app on settings page (when is running)
3333

34-
4. To connect to your [server](https://github.com/quead/angular-youtube-server "Angular youtube server")
34+
4. Start your [server](https://github.com/quead/angular-youtube-server "Angular youtube server")
3535

36-
You must change inside **src/app/environments/environment.ts** your path to your server.
36+
`npm install && npm start` in root folder
3737

38-
6. Connect to your [server](https://github.com/quead/angular-youtube-server "Angular youtube server")
38+
5. Connect to your [server](https://github.com/quead/angular-youtube-server "Angular youtube server")
3939

40-
`npm start` in root folder
40+
You must change inside **src/app/environments/environment.ts** your path to your server.
4141

42-
**For building the app**
42+
**To build the app**
4343

4444
1. Install [angular-cli 7.3.7+](https://github.com/angular/angular-cli "Angular Cli")
4545

@@ -52,6 +52,12 @@ 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.6.0
56+
- List of guests in the session
57+
- Minor issues fixed (RC)
58+
- Add mini player when you scroll
59+
- First video from playlist is now the current video
60+
5561
Angular YouTube Player 2.5.2
5662
- Add category badge to feed videos and current video
5763
- UI updates
@@ -189,9 +195,9 @@ Angular YouTube Player 1.0.0
189195
- *Room chat **(unversioned)***
190196

191197
#### Roadmap to 3.0
192-
- *List of users joined in the session **(in v2.6)***
198+
- *Release a stable version **(in v2.6.9)***
193199
- *Set private/public room **(in v2.7)***
194-
- *List of public rooms **(in v2.9)***
200+
- *List of public rooms **(in v2.8)***
195201
- *Room moderators which can add videos, kick roommates, mute roommates **(in v2.9)***
196202

197203
#### Roadmap to 4.0
@@ -201,7 +207,7 @@ Angular YouTube Player 1.0.0
201207
- Global hotkeys for application in desktop (play/pause/next/prev, for keyboards with media buttons)
202208
- Adding support for NW.js to export the app for desktop compatible: Windows x64, Linux x64
203209
- Auto updating the app (desktop version)
204-
- Temporary removed theme function
210+
- Themes temporary removed
205211

206212
## Copyright and License
207213
Copyright [quead](https://github.com/quead) under the [MIT license](LICENSE).

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-youtube-player",
3-
"version": "2.5.2",
3+
"version": "2.6.0",
44
"license": "MIT",
55
"scripts": {
66
"ng": "ng",

src/app/app.component.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@
3535
</div>
3636
</div>
3737
</div>
38-
</div>
38+
</div>
39+
<app-player-mini></app-player-mini>

src/app/app.module.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,15 @@ import { RelatedComponent } from './components/related/related.component';
3434
import { RoomComponent } from './components/room/room.component';
3535
import { YoutubeIframeComponent } from './components/youtube-iframe/youtube-iframe.component';
3636
import { ButtonsComponent } from './components/player/buttons/buttons.component';
37-
import { VideoItemComponent } from './components/player/video-item/video-item.component';
37+
import { VideoItemComponent } from './components/video-item/video-item.component';
3838
import { CategoryBadgeComponent } from './components/category/category-badge/category-badge.component';
3939

4040
import { ModalComponent } from './components/modal/modal.component';
4141
import { ModalService } from './services/modal.service';
42+
import { VideoItemEnhancedComponent } from './components/video-item/video-item-enhanced/video-item-enhanced.component';
43+
import { VideoItemGridComponent } from './components/video-item/video-item-grid/video-item-grid.component';
44+
import { VideoItemListComponent } from './components/video-item/video-item-list/video-item-list.component';
45+
import { PlayerMiniComponent } from './components/player-mini/player-mini.component';
4246

4347
const config: SocketIoConfig = { url: environment.serverURL, options: {} };
4448

@@ -69,7 +73,11 @@ const config: SocketIoConfig = { url: environment.serverURL, options: {} };
6973
VideoItemComponent,
7074
CategoryBadgeComponent,
7175
ModalComponent,
72-
ShortNumPipe
76+
ShortNumPipe,
77+
VideoItemEnhancedComponent,
78+
VideoItemGridComponent,
79+
VideoItemListComponent,
80+
PlayerMiniComponent
7381
],
7482
bootstrap: [AppComponent],
7583
providers: [

src/app/components/about/about.component.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ <h2>About</h2>
55
<div>
66
<p>This is a simple youtube web player and desktop player based on angular-cli, socket.io, ngu-carousel, @angular/material.</p>
77
<p>This player is compatible only with Chrome/webkit browsers.</p>
8-
<p>The project status is beta.</p>
8+
<p>The project status is RC (release candidate).</p>
99
</div>
10-
</div>
10+
</div>

src/app/components/category/category-badge/category-badge.component.scss

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.badge {
2-
background-color: rgba(#ffffff, 0.1);
3-
color: var(--c-white);
2+
background-color: rgba(var(--c-white), 0.1);
3+
color: rgb(var(--c-white));
44
padding: 2px 5px;
55
margin: 0;
6-
font-size: 12px;
6+
font-size: var(--font-small);
77
border-radius: 3px;
88
text-transform: uppercase;
99

Original file line numberDiff line numberDiff line change
@@ -1,42 +1,34 @@
1-
<div class="app-content app-container">
2-
<div class="video-item-head">
1+
<div class="app-container">
2+
<div class="app-head">
33
<h2>Trending</h2>
44
<div class="categories" *ngIf="globals.categories">
55
<label for="select-category"><span class="icon ion-ios-arrow-down"></span></label>
66
<select id="select-category" [ngModel]="globals.currentCategory" (change)="categoryChanged($event)">
77
<option value="all">General</option>
88
<ng-container *ngFor="let category of globals.categories">
9-
<option *ngIf="category.assignable && globals.categoriesBlocked.indexOf(category.id) === -1" [value]="category.id">{{category.title}}</option>
9+
<option *ngIf="category.assignable && globals.categoriesBlocked.indexOf(category.id) === -1"
10+
[value]="category.id">{{category.title}}</option>
1011
</ng-container>
1112
</select>
1213
</div>
1314
</div>
14-
<div class="feed-video-list video-list" [ngClass]="{'grid-list': !globals.listGrid }">
15-
<ng-container *ngIf="globals.isFeedLoading">
15+
<div [ngClass]="!globals.listGrid ? 'video-grid' : 'video-list'">
16+
<ng-container *ngIf="globals.loadingState.feed">
1617
<div *ngFor="let i of [0,1,2,3,4,5,6,8,9]" class="loading-feed-list loading-anim"></div>
1718
</ng-container>
18-
<ng-container *ngIf="!globals.isFeedLoading">
19-
<div *ngFor="let feedVideo of globals.feedVideos; let i = index"
20-
[ngClass]="{'hidden-thumbnails': !globals.thumbnails }" [attr.data-index]="i" class="video-item">
21-
<div class="video-item-info">
22-
<div *ngIf="globals.thumbnails" class="video-item-image"
23-
[ngStyle]="{'background-image': 'url(' + feedVideo.thumbnails.medium +')'}"></div>
24-
<div class="video-item-content">
25-
<app-category-badge [categoryID]="feedVideo.categoryId"></app-category-badge>
26-
<p class="video-item-title">{{feedVideo.title}}</p>
27-
<p class="video-item-autor">{{feedVideo.channelTitle}}</p>
28-
<div class="video-item-details" *ngIf="feedVideo.id?.length > 0">
29-
<p class="stats-views"><span class="icon ion-ios-play-circle"></span>
30-
{{feedVideo.stats.views | shortNum}}</p>
31-
<p class="stats-likes"><span class="icon ion-ios-thumbs-up"></span>
32-
{{feedVideo.stats.likes | shortNum}}</p>
33-
<p class="stats-dislikes"><span class="icon ion-ios-thumbs-down"></span>
34-
{{feedVideo.stats.dislikes | shortNum}}</p>
35-
</div>
36-
</div>
19+
<ng-container *ngIf="!globals.loadingState.feed">
20+
<ng-container *ngIf="!globals.listGrid">
21+
<div *ngFor="let feedVideo of globals.feedVideos; let i = index" class="video">
22+
<app-video-item [videoIndex]="i" [videoItem]="feedVideo" [listID]="0" videoType="enhanced">
23+
</app-video-item>
3724
</div>
38-
<app-buttons [videoIndex]="i" [listID]="0"></app-buttons>
39-
</div>
25+
</ng-container>
26+
<ng-container *ngIf="globals.listGrid">
27+
<div *ngFor="let feedVideo of globals.feedVideos; let i = index" class="video">
28+
<app-video-item [videoIndex]="i" [videoItem]="feedVideo" [listID]="0" videoType="list">
29+
</app-video-item>
30+
</div>
31+
</ng-container>
4032
</ng-container>
4133
</div>
4234
</div>
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,3 @@
1-
.feed-video-list {
2-
top: inherit;
3-
bottom: 0;
4-
width: 100%;
5-
&.grid-list {
6-
display: flex;
7-
flex-wrap: wrap;
8-
.video-item {
9-
width: calc(33.333% - 10px);
10-
display: block;
11-
margin: 0 5px 10px;
12-
padding: 0;
13-
position: relative;
14-
overflow: hidden;
15-
&-details {
16-
text-align: center;
17-
margin-top: 5px;
18-
margin-bottom: 0;
19-
p {
20-
width: 100%;
21-
margin: 0 5px;
22-
}
23-
}
24-
&-image {
25-
margin: 0;
26-
position: relative;
27-
width: 100%;
28-
height: 200px;
29-
background-size: 160% auto;
30-
background-repeat: no-repeat;
31-
background-position: bottom center;
32-
transition: all 0.1s ease-in-out;
33-
}
34-
&-content {
35-
margin: 0;
36-
position: absolute;
37-
bottom: 0;
38-
background-color: rgba(#000000, 0.6);
39-
-webkit-backdrop-filter: blur(30px);
40-
backdrop-filter: blur(30px);
41-
padding: 5px 10px 10px;
42-
}
43-
&-info {
44-
display: block;
45-
padding: 0;
46-
}
47-
&.hidden-thumbnails {
48-
.video-item-content {
49-
position: relative;
50-
padding: 10px;
51-
}
52-
}
53-
&:hover {
54-
.video-item {
55-
&-info {
56-
left: 0;
57-
}
58-
&-settings {
59-
opacity: 1;
60-
visibility: visible;
61-
top: 0;
62-
}
63-
&-image {
64-
transform: scale(1.1);
65-
}
66-
}
67-
}
68-
@media screen and (max-width: 1400px) and (min-width: 992px) {
69-
width: calc(50% - 10px);
70-
}
71-
@media screen and (max-width: 991px) {
72-
width: calc(100% - 10px);
73-
}
74-
}
75-
}
76-
&.video-list:not(.grid-list) {
77-
padding-bottom: 10px;
78-
.video-item {
79-
margin-top: 10px;
80-
padding: 5px 15px;
81-
}
82-
}
83-
&::-webkit-scrollbar {
84-
width: 6px;
85-
background-color: transparent;
86-
}
87-
}
88-
891
.categories {
902
display: flex;
913
flex-wrap: wrap;
@@ -97,11 +9,3 @@
979
transform: translateY(-50%);
9810
}
9911
}
100-
101-
@media screen and (min-width: 768px) and (max-width: 991px) {
102-
.feed-video-list {
103-
&.grid-list .video-item-image {
104-
height: 200px;
105-
}
106-
}
107-
}

src/app/components/category/category.component.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,23 +54,23 @@ export class CategoryComponent implements OnInit {
5454
getCategories() {
5555
this.youtube.categories().then(catData => {
5656
this.converFilterObject(catData);
57-
this.globals.isFeedLoading = true;
5857
this.getCategoriesVideos(this.globals.currentCategory);
5958
});
6059
}
6160

6261
async getCategoriesVideos(val: string) {
62+
this.globals.loadingState.feed = true;
6363
const res2 = await this.youtube.feedVideos(val);
6464
this.shared.convertVideoObject(res2['items'], 'feedVideos');
65-
this.globals.isFeedLoading = false;
65+
this.globals.loadingState.feed = false;
6666
}
6767

6868
resetCategories() {
69-
this.globals.isFeedLoading = true;
69+
this.globals.loadingState.feed = true;
7070
this.globals.currentCategory = 'all';
7171
this.globals.feedVideos = null;
7272
this.shared.initFeed().then(() => {
73-
this.globals.isFeedLoading = false;
73+
this.globals.loadingState.feed = false;
7474
});
7575
}
7676
}

src/app/components/history/history.component.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<div class="app-content app-container">
1+
<div class="app-container">
22
<div class="app-head">
33
<h2>History</h2>
44
</div>
5-
<div class="history-video-content">
5+
<div class="history-video-content video-list">
66
<div *ngIf="globals.historyVideos.length === 0">
77
No history
88
</div>
9-
<div *ngFor="let historyVideo of globals.historyVideos; let i = index" [attr.data-index]="i">
9+
<div *ngFor="let historyVideo of globals.historyVideos; let i = index" [attr.data-index]="i" class="video">
1010
<app-video-item [videoIndex]="i" [videoItem]="historyVideo" [listID]="4"></app-video-item>
1111
</div>
1212
</div>
Original file line numberDiff line numberDiff line change
@@ -1,9 +0,0 @@
1-
.history-video-content app-video-item .video-item {
2-
margin-bottom: 10px;
3-
width: 100%;
4-
padding: 5px;
5-
}
6-
7-
.history-video-content app-video-item {
8-
width: 100%;
9-
}

0 commit comments

Comments
 (0)