Skip to content

Commit b3573f0

Browse files
committed
Merge branch 'master' into 2.x-develop
2 parents cafafbb + be679bf commit b3573f0

Some content is hidden

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

72 files changed

+4779
-2500
lines changed

.angular-cli.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
33
"project": {
4-
"name": "yt-app"
4+
"name": "a2-youtube"
55
},
66
"apps": [
77
{
@@ -19,7 +19,7 @@
1919
"testTsconfig": "tsconfig.spec.json",
2020
"prefix": "app",
2121
"styles": [
22-
"styles.css"
22+
"assets/scss/main.scss"
2323
],
2424
"scripts": [],
2525
"environmentSource": "environments/environment.ts",
@@ -36,13 +36,16 @@
3636
},
3737
"lint": [
3838
{
39-
"project": "src/tsconfig.app.json"
39+
"project": "src/tsconfig.app.json",
40+
"exclude": "**/node_modules/**"
4041
},
4142
{
42-
"project": "src/tsconfig.spec.json"
43+
"project": "src/tsconfig.spec.json",
44+
"exclude": "**/node_modules/**"
4345
},
4446
{
45-
"project": "e2e/tsconfig.e2e.json"
47+
"project": "e2e/tsconfig.e2e.json",
48+
"exclude": "**/node_modules/**"
4649
}
4750
],
4851
"test": {
@@ -51,7 +54,7 @@
5154
}
5255
},
5356
"defaults": {
54-
"styleExt": "css",
57+
"styleExt": "scss",
5558
"component": {}
5659
}
5760
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# compiled output
44
/dist
5+
/dist-server
56
/tmp
67
/out-tsc
78

README.md

Lines changed: 129 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
11
<p align="center">
2-
<a href="https://quead.github.io/demo/" title="YouTube Player Demo">View Demo</a>
3-
<img alt="Angular YouTube Player Logo" src="http://i.imgur.com/5DS0zFh.jpg" style="height: auto; max-width:100%;" />
2+
Check
3+
<a href="https://quead.github.io/demo/" title="YouTube Player Demo">Demo</a>
4+
or
5+
<a href="https://youtu.be/KB803dWQM-o/" title="Video Presentation">Video Presentation</a>
6+
<img alt="Angular YouTube Player Logo" src="https://i.imgur.com/EKqK4ip.png" style="height: auto; max-width:100%;" />
47
</p>
58

69
# About Player
7-
[![Version](https://img.shields.io/badge/Current%20version-v2-brightgreen.svg?style=flat)](https://github.com/quead/angular2-yt-player)
10+
[![Version](https://img.shields.io/badge/Current%20version-v2.1-brightgreen.svg?style=flat)](https://github.com/quead/angular2-yt-player)
11+
[![Build Status](https://semaphoreci.com/api/v1/quead/angular2-yt-player/branches/master/badge.svg)](https://semaphoreci.com/quead/angular2-yt-player)
812

913
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/quead/angular2-yt-player/master/LICENSE)
1014
[![GitHub forks](https://img.shields.io/github/forks/quead/angular2-yt-player.svg)](https://github.com/quead/angular2-yt-player/network)
1115
[![GitHub stars](https://img.shields.io/github/stars/quead/angular2-yt-player.svg)](https://github.com/quead/angular2-yt-player/stargazers)
1216

13-
This is a simple youtube player based on [angular-cli](https://github.com/angular/angular-cli "Angular Cli") 1.0, [ng2-youtube-player](https://github.com/orizens/ng2-youtube-player "ng2 youtube player") 0.0.3 (used for youtube iFrame API), SCSS (CSS3), HTML5 and webkit functions.
17+
This is a simple youtube web player and desktop player based on [angular-cli](https://github.com/angular/angular-cli "Angular Cli") 1.4, [NWjs 0.25.0](https://nwjs.io/ "NWJS Page"), [ngx-youtube-player](https://github.com/orizens/ng2-youtube-player "ngx youtube player") 0.0.41 (used for youtube iFrame API), SCSS (CSS3), HTML5 and webkit functions.
1418

15-
This player is compatible only with Chrome/webkit browsers because in future I want to implement [NW.js](https://nwjs.io/ 'NWjs website') for compiling the code in Windows/Mac OS X/Linux desktop app.
19+
This player is compatible only with Chrome/webkit browsers.
1620

17-
*This is pre-alpha.*
21+
*The project status is beta.*
1822

1923
## Usage
2024

21-
**For angular2/typescript development**
22-
1. Install [NodeJS 6.10.2+](https://nodejs.org/en/download/ "Node JS Download")
23-
2. Install latest version of [angular-cli](https://github.com/angular/angular-cli "Angular Cli")
25+
**For Angular and Typescript Development**
26+
1. Install [NodeJS 6.11.0+](https://nodejs.org/en/download/ "Node JS Download")
27+
2. Install [angular-cli 1.1.3+](https://github.com/angular/angular-cli "Angular Cli")
2428

2529
`npm install -g @angular/cli`
2630

@@ -32,35 +36,124 @@ This player is compatible only with Chrome/webkit browsers because in future I w
3236

3337
`npm start` in root folder
3438

35-
------
39+
5. Add your youtube api key
3640

3741
**For SASS development**
3842

39-
*You must go in **src** folder*
4043
1. Install [Sass](http://sass-lang.com/install "Sass website")
41-
2. Install [Gulp](https://github.com/gulpjs/gulp "Gulp download")
4244

43-
`npm install -g gulp`
45+
2. Start project by
46+
47+
`npm start`
4448

45-
3. Then install all packages
49+
3. Edit files from src/assets/scss
50+
51+
------
4652

47-
`npm install`
53+
**For building app**
4854

49-
4. Start compiling the SCSS files by
55+
1. Add to body classes application app-win / app-linux
56+
`<body class="application app-win">`
57+
2. Build the src folder with
58+
`ng build` in root folder
59+
*You need to have angular-cli installed on global (check above)*
60+
*This is compiling typescript into Javascript*
5061

51-
`gulp`
62+
3. Copy package.json from **/app** folder and paste it to **dist** folder
63+
4. Download [NWjs v0.25.0 +](https://nwjs.io/ "NWJS Download")
64+
5. Path your system enviroment to folder where you unarchived
65+
6. Run
66+
67+
`gulp build` in root folder
68+
*This is compiling javascript into desktop app*
69+
70+
7. In release folder (root) you have the compiled apps
5271

5372
**For personal use**
5473

5574
Just take files from ***dist*** folder
5675

57-
<a href="https://quead.github.io/demo/" title="YouTube Player Demo">View Demo</a>
76+
Check
77+
<a href="https://quead.github.io/demo/" title="YouTube Player Demo">Demo</a>
78+
or
79+
<a href="https://youtu.be/KB803dWQM-o/" title="Video Presentation">Video Presentation</a>
5880

5981
## Changelog
82+
Angular2 YT Player v2.1
83+
- Categories with videos like (music, gaming, autos, films, sports, etc.)
84+
- Refactoring code
85+
- Search on specific region
86+
- Fixing copy link for featured video
87+
- UX improvements
88+
89+
Angular2 YT Player v2.0.1
90+
- Import & export youtube playlist as .JSON file
91+
92+
Angular2 YT Player v2.0
93+
- Global hotkeys for application in desktop (play/pause/next/prev, for keyboards with media buttons)
94+
- Adding support for NW.js to export the app for desktop compatible: Windows x64, Linux x64
95+
- Auto updating the app (desktop version)
96+
97+
Angular2 YT Player v1.9.2
98+
- UX improvements and fixes
99+
- Preparing files for 2.0
100+
101+
Angular2 YT Player v1.9.1
102+
- Get settings.json for localstorage if your localstorage is empty
103+
- The playlist automatically saving, if is empty it will be populated with related videos
104+
- Toggle light/dark theme mode
105+
- Share link button for all videos
106+
- Reorganised settings page
107+
- Auto saving for internal settings (check settings)
108+
- Manual saving for external settings (check settings)
109+
- Performance, UI and UX improvements and fixes
110+
111+
Angular2 YT Player v1.9
112+
- Add/remove items from playlist, first time when is initialized It is prepopulated with related videos
113+
- Next/prev video from your playlist
114+
- Moved history to separate page
115+
- Adding toggle video, repeat mode and list & grid on trending to settings.json
116+
- Small fixes
117+
118+
Angular2 YT Player v1.7
119+
- Added featured video as first video from trending
120+
- Notifications for important actions you do
121+
- Removed debugging mode
122+
- Preparing packages, code and files for v2.0
123+
- Improved UI/UX for lists
124+
125+
Angular2 YT Player v1.6
126+
- Video details for current video and trending videos like number of views, likes and dislikes
127+
- Share link for current video
128+
- Added new setting for hiding all thumbnails
129+
- Custom player buttons shows now only when you hide video
130+
131+
Angular2 YT Player v1.4
132+
- History of your watched videos
133+
- Small fixes
134+
135+
Angular2 YT Player v1.3
136+
- Show/hide video player
137+
- Repeat video
138+
- Grid/list mode for trending videos
139+
- **Settings (you can set default from "assets/settings.json", soon will be directly from settings)**
140+
- *Change country for trending videos (currently only three countries, US, UK and RO)*
141+
- *Max results show in search (0 to 50)*
142+
- *YOUR_API Key*
143+
- *Max related videos (0 to 50)*
144+
145+
Angular2 YT Player v1.2
146+
- Introducing trending videos, currently default trending videos are from United States
147+
- Refactoring the code
148+
- Adding routes for future components which it will show in left navbar
149+
- Default video will be first from trending videos
150+
- Adding the video player
151+
- Update the design to match the new features
60152

61153
Angular2 YT Player v1.1
62154
- Adding mute/unmute functionality
63155
- Improved user interface and user experience
156+
- Adding settings functionality, the settings will get from ***assets/settings.json***
64157
- **Settings**
65158
- *Show/hide debugging features*
66159
- *Show/hide thumbnails in search*
@@ -76,21 +169,24 @@ Angular2 YT Player v1.0.0
76169
- Change time of your video that you want to listen
77170

78171
## Future features
79-
- Repeat mode **(in v1.3)**
80-
- Copy link for current video and related videos **(in v1.6)**
81-
- Copy link for current video at your playing time **(in v1.6)**
82-
- Video details for current video and related videos like number of views, likes and dislikes **(in v1.6)**
83-
- Add your videos in playlist **(in v1.9)**
84-
- Next/prev video from your playlist **(in v1.9)**
85-
- Adding support for NW.js to export the app for desktop compatible: Windows/Mac OS X/Linux **(in v2.0)**
86-
- Hotkeys for application in desktop (play/pause/next/prev) **(in v2.0)**
87-
- **Settings**
88-
- *Show/hide video **(possible in v1.3)***
89-
- *Set how many results to show in search (0 to 50) **(in v1.3)***
90-
- *Enable loop video **(in v1.3)***
91-
- *Change/add YOUR_API Key **(in v1.3)***
92-
- *Max related videos (0 to 50) **(in v1.3)***
93-
- *Save your settings **(possible in v1.9)***
172+
#### Backlog
173+
- iOS 8+ / android 5+ app **(unversioned)**
174+
- Change and create theme **(unversioned)**
175+
- macOS app release **(unversioned)**
176+
- **Rooms**
177+
- *Room chat **(unversioned)***
178+
179+
#### Roadmap to 3.0
180+
- Drag and drop videos to playlist **(in v2.2)**
181+
- Arrange playlist by drag and drop **(in v2.2)**
182+
- Integrating Google accounts **(in v2.4)**
183+
- Integrating firebase **(in v2.5)**
184+
185+
- **Rooms**
186+
- *Create room where you can watch videos with others in sync by sharing the room link **(in v3.0)***
187+
- *Set private/public room **(in v3.0)***
188+
- *List of public rooms **(in v3.0)***
189+
- *Room moderators which can add videos, kick roommates, mute roommates, rename room title and description **(in v3.3)***
94190

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

app/package.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"main": "index.html",
3+
"name": "yt-app",
4+
"description": "YouTube Player",
5+
"author": "Alex Olari <queadx@gmail.com>",
6+
"version": "2.0.0",
7+
"keywords": [
8+
"youtube app",
9+
"node-webkit"
10+
],
11+
"license": "MIT",
12+
"manifestUrl": "http://noxien.net/quead/package.json",
13+
"window": {
14+
"height": 720,
15+
"width": 1270,
16+
"min_width": 1270,
17+
"min_height": 720,
18+
"frame": false,
19+
"icon": "favicon.ico",
20+
"toolbar": false
21+
},
22+
"webkit": {
23+
"plugin": true
24+
},
25+
"scripts": {
26+
"postversion": "npm run package",
27+
"package": "nwb nwbuild -v 0.25.2-sdk . -o ../release --output-format=ZIP --output-name={name}-v{version}-{target}"
28+
},
29+
"dependencies": {
30+
"nw-autoupdater": "*"
31+
},
32+
"devDependencies": {
33+
"nwjs-builder": "^1.14.0"
34+
}
35+
}

e2e/app.e2e-spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { AppPage } from './app.po';
2+
3+
describe('masterclean App', () => {
4+
let page: AppPage;
5+
6+
beforeEach(() => {
7+
page = new AppPage();
8+
});
9+
10+
it('should display welcome message', () => {
11+
page.navigateTo();
12+
expect(page.getParagraphText()).toEqual('Welcome to app!');
13+
});
14+
});

e2e/app.po.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { browser, by, element } from 'protractor';
2+
3+
export class AppPage {
4+
navigateTo() {
5+
return browser.get('/');
6+
}
7+
8+
getParagraphText() {
9+
return element(by.css('app-root h1')).getText();
10+
}
11+
}

e2e/tsconfig.e2e.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "../tsconfig.json",
3+
"compilerOptions": {
4+
"outDir": "../out-tsc/e2e",
5+
"baseUrl": "./",
6+
"module": "commonjs",
7+
"target": "es5",
8+
"types": [
9+
"jasmine",
10+
"jasminewd2",
11+
"node"
12+
]
13+
}
14+
}

gulpfile.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
'use strict';
2+
3+
var gulp = require('gulp');
4+
var exec = require('child_process').exec;
5+
6+
gulp.task('build', function() {
7+
console.log('Installing packages...');
8+
exec('npm install', { cwd: 'dist', stdio: 'inherit' }, function (error, stdout, stderr) {
9+
if (stderr !== null) {
10+
console.log(stderr);
11+
}
12+
if (stdout !== null) {
13+
console.log(stdout);
14+
}
15+
if (error !== null) {
16+
console.log(error);
17+
}
18+
}).on('close', done);
19+
20+
function done() {
21+
exec('npm run package', { cwd: 'dist', stdio: 'inherit' }, function (error, stdout, stderr) {
22+
if (stderr !== null) {
23+
console.log(stderr);
24+
}
25+
if (stdout !== null) {
26+
console.log(stdout);
27+
}
28+
if (error !== null) {
29+
console.log(error);
30+
}
31+
});
32+
}
33+
});

0 commit comments

Comments
 (0)