@@ -23,19 +23,19 @@ <h1><span class="favicon-app"></span>YouTube Player v2.0</h1>
23
23
< button type ="button " class ="trigger-nav " (click) ="openMobileMenu() "> < span class ="fa fa-navicon "> </ span > Menu</ button >
24
24
< div id ="logo ">
25
25
< a routerLink ="" class ="logo-svg-small " title ="Homepage "> </ a >
26
- < small *ngIf ="regionCode "> {{ regionCode }}</ small >
26
+ < small *ngIf ="globals. regionCode "> {{ globals. regionCode }}</ small >
27
27
</ div >
28
28
</ div >
29
29
</ header >
30
- < div id ="app-container " [ngClass] ="{'light-mode': !darkMode, 'menu-active': menuActive } ">
30
+ < div id ="app-container " [ngClass] ="{'light-mode': !globals. darkMode, 'menu-active': menuActive } ">
31
31
< input type ="text " class ="hide-input " #videoItemIDvalue />
32
32
< div class ="container ">
33
33
< div class ="col col-1 ">
34
34
< div class ="app app-services ">
35
35
< div class ="app-head ">
36
36
< div id ="logo ">
37
37
< a routerLink ="/category/all " class ="logo-svg " title ="Homepage "> </ a >
38
- < small *ngIf ="regionCode "> {{ regionCode }}</ small >
38
+ < small *ngIf ="globals. regionCode "> {{ globals. regionCode }}</ small >
39
39
</ div >
40
40
</ div >
41
41
< div class ="app-content ">
@@ -53,18 +53,18 @@ <h1><span class="favicon-app"></span>YouTube Player v2.0</h1>
53
53
< button type ="button " class ="video-item-head-btn " (click) ="clearPlaylist() "> < span class ="fa fa-close "> </ span > clear</ button >
54
54
< button type ="button " class ="video-item-head-btn " (click) ="exportPlaylist() "> < span class ="fa fa-cog "> </ span > manage</ button >
55
55
</ div >
56
- < div class ="playlist-video-content " [dragula] ='"playlistDrag" ' [dragulaModel] ='globals.playlist ' #playlistContainer >
57
- < ng-container *ngIf ="globals.playlist .length === 0 ">
56
+ < div class ="playlist-video-content " [dragula] ='"playlistDrag" ' [dragulaModel] ='globals.playlistVideos ' #playlistContainer >
57
+ < ng-container *ngIf ="globals.playlistVideos .length === 0 ">
58
58
< div *ngFor ="let i of [1,2,3,4,5] " class ="video-item ">
59
59
< div class ="video-item-info ">
60
60
< div class ="video-item-image loading-featured "> </ div >
61
61
< div class ="video-item-content loading-featured "> </ div >
62
62
</ div >
63
63
</ div >
64
64
</ ng-container >
65
- < div *ngFor ="let playlistVideo of globals.playlist ; let i = index " [ngClass] ="currentPlaylistItem === i ? 'active' : '' " [attr.data-index] ="i " class ="video-item ">
65
+ < div *ngFor ="let playlistVideo of globals.playlistVideos ; let i = index " [ngClass] ="currentPlaylistItem === i ? 'active' : '' " [attr.data-index] ="i " class ="video-item ">
66
66
< div class ="video-item-info ">
67
- < div *ngIf ="globals.thumbnails " class ="video-item-image " [ngStyle] ="{'background-image': 'url(' + playlistVideo.snippet. thumbnails.default.url +')'} "> </ div >
67
+ < div *ngIf ="globals.thumbnails " class ="video-item-image " [ngStyle] ="{'background-image': 'url(' + playlistVideo.thumbnails.default +')'} "> </ div >
68
68
< div class ="video-item-content ">
69
69
< ng-container *ngIf ="currentPlaylistItem === i && currentState === 1 ">
70
70
< p class ="video-item-hint "> < span class ="fa fa-play "> </ span > Playing</ p >
@@ -75,8 +75,8 @@ <h1><span class="favicon-app"></span>YouTube Player v2.0</h1>
75
75
< ng-container *ngIf ="currentPlaylistItem === i && currentState === -1 ">
76
76
< p class ="video-item-hint "> < span class ="fa fa-stop "> </ span > Not started</ p >
77
77
</ ng-container >
78
- < p class ="video-item-title "> {{ playlistVideo.snippet. title }}</ p >
79
- < p class ="video-item-autor "> by < span > {{ playlistVideo.snippet. channelTitle }}</ span > </ p >
78
+ < p class ="video-item-title "> {{ playlistVideo.title }}</ p >
79
+ < p class ="video-item-autor "> by < span > {{ playlistVideo.channelTitle }}</ span > </ p >
80
80
</ div >
81
81
</ div >
82
82
< div class ="video-item-settings ">
@@ -104,18 +104,18 @@ <h2>Player</h2>
104
104
< p (click) ="addPlaylistItem(0, 3) "> < span class ="fa fa-plus "> </ span > Add to playlist</ p >
105
105
</ div >
106
106
</ div >
107
- < div *ngIf ="!currentVideo.id " class ="app-content ">
107
+ < div *ngIf ="!globals.currentVideo " class ="app-content ">
108
108
< div class ="youtube-player active loading-featured "> </ div >
109
109
</ div >
110
110
< div class ="app-content ">
111
- < div class ="youtube-player " *ngIf ="currentVideo.id " [ngClass] ="{'active': displayVideoPlayer } ">
112
- < youtube-player [videoId] ="currentVideo.id " (ready) ="savePlayer($event) " (change) ="onStateChange($event) " [playerVars] ="playerVars() "> </ youtube-player >
111
+ < div class ="youtube-player " *ngIf ="globals.currentVideo " [ngClass] ="{'active': globals. displayVideoPlayer } ">
112
+ < youtube-player [videoId] ="globals. currentVideo.id " (ready) ="savePlayer($event) " (change) ="onStateChange($event) " [playerVars] ="playerVars() "> </ youtube-player >
113
113
</ div >
114
- < div class ="current-video-all " *ngIf ="currentVideo.id ">
114
+ < div class ="current-video-all " *ngIf ="globals.currentVideo ">
115
115
< div class ="current-video-details ">
116
- < p class ="current-video-name "> {{ currentVideo.title }}</ p >
116
+ < p class ="current-video-name "> {{ globals. currentVideo.title }}</ p >
117
117
</ div >
118
- < div *ngIf ="!displayVideoPlayer " id ="player-controls ">
118
+ < div *ngIf ="!globals. displayVideoPlayer " id ="player-controls ">
119
119
< div class ="player-buttons ">
120
120
< button id ="previous-song " (click) ="playPlaylistItem('prev', currentPlaylistItem) "> < span class ="fa fa-backward "> </ span > </ button >
121
121
< button id ="play-song " (click) ="playPauseVideo() " > < span class ="fa " [ngClass] ="currentState === 1 ? 'fa-pause' : 'fa-play' "> </ span > </ button >
@@ -138,16 +138,16 @@ <h2>Player</h2>
138
138
</ div >
139
139
</ div >
140
140
< div class ="current-video-stats ">
141
- < p class ="stats-views "> {{ currentVideo.stats.views | number:'1.0' }} Views</ p >
142
- < p class ="stats-likes "> < span class ="fa fa-thumbs-up "> </ span > {{ currentVideo.stats.likes | number:'1.0' }}</ p >
143
- < p class ="stats-dislikes "> < span class ="fa fa-thumbs-down "> </ span > {{ currentVideo.stats.dislikes | number:'1.0' }}</ p >
141
+ < p class ="stats-views "> {{ globals. currentVideo.stats.views | number:'1.0' }} Views</ p >
142
+ < p class ="stats-likes "> < span class ="fa fa-thumbs-up "> </ span > {{ globals. currentVideo.stats.likes | number:'1.0' }}</ p >
143
+ < p class ="stats-dislikes "> < span class ="fa fa-thumbs-down "> </ span > {{ globals. currentVideo.stats.dislikes | number:'1.0' }}</ p >
144
144
</ div >
145
145
< div class ="current-video-share ">
146
146
< label for ="shareInput "> Share link</ label >
147
147
< input id ="shareInput " type ="text " name ="current video share " #shareInput [value] ="shareLink " (click) ="copyShareLink(shareInput.select()) " readonly >
148
148
</ div >
149
149
</ div >
150
- < div *ngIf =" globals.relatedVideos " id ="related-video-list " class ="video-list " [ngClass] ="{'activePlayer': displayVideoPlayer } ">
150
+ < div id ="related-video-list " class ="video-list " [ngClass] ="{'activePlayer': globals. displayVideoPlayer } ">
151
151
< div class ="video-item-head ">
152
152
Similar videos
153
153
</ div >
@@ -160,26 +160,28 @@ <h2>Player</h2>
160
160
</ div >
161
161
</ div >
162
162
</ ng-container >
163
- < div *ngFor ="let relatedVideo of globals.relatedVideos; let i = index " [attr.data-index] ="i " class ="video-item ">
164
- < div class ="video-item-info ">
165
- < div *ngIf ="globals.thumbnails " class ="video-item-image " [ngStyle] ="{'background-image': 'url(' + relatedVideo.snippet.thumbnails.default.url +')'} "> </ div >
166
- < div class ="video-item-content ">
167
- < p class ="video-item-title "> {{ relatedVideo.snippet.title }}</ p >
168
- < p class ="video-item-autor "> by < span > {{ relatedVideo.snippet.channelTitle }}</ span > </ p >
163
+ < ng-container *ngIf ="globals.relatedVideos ">
164
+ < div *ngFor ="let relatedVideo of globals.relatedVideos; let i = index " [attr.data-index] ="i " class ="video-item ">
165
+ < div class ="video-item-info ">
166
+ < div *ngIf ="globals.thumbnails " class ="video-item-image " [ngStyle] ="{'background-image': 'url(' + relatedVideo.thumbnails.default +')'} "> </ div >
167
+ < div class ="video-item-content ">
168
+ < p class ="video-item-title "> {{ relatedVideo.title }}</ p >
169
+ < p class ="video-item-autor "> by < span > {{ relatedVideo.channelTitle }}</ span > </ p >
170
+ </ div >
171
+ </ div >
172
+ < div class ="video-item-settings ">
173
+ < button class ="video-item-play " (click) ="onClickRelated($event, i) ">
174
+ < span class ="fa fa-play "> </ span >
175
+ </ button >
176
+ < button class ="video-item-share " (click) ="onCopyVideoItemLink(i, 2) ">
177
+ < span class ="fa fa-share-alt "> </ span >
178
+ </ button >
179
+ < button class ="video-item-add " (click) ="addPlaylistItem(i, 2) ">
180
+ < span class ="fa fa-plus "> </ span >
181
+ </ button >
169
182
</ div >
170
183
</ div >
171
- < div class ="video-item-settings ">
172
- < button class ="video-item-play " (click) ="onClickRelated($event, i) ">
173
- < span class ="fa fa-play "> </ span >
174
- </ button >
175
- < button class ="video-item-share " (click) ="onCopyVideoItemLink(i, 2) ">
176
- < span class ="fa fa-share-alt "> </ span >
177
- </ button >
178
- < button class ="video-item-add " (click) ="addPlaylistItem(i, 2) ">
179
- < span class ="fa fa-plus "> </ span >
180
- </ button >
181
- </ div >
182
- </ div >
184
+ </ ng-container >
183
185
</ div >
184
186
</ div >
185
187
</ div >
@@ -189,9 +191,9 @@ <h2>Player</h2>
189
191
< div class ="app app-feed ">
190
192
< router-outlet > </ router-outlet >
191
193
</ div >
192
- < div [ngClass] ="{'active': _shared .notify.enabled } " class ="notif notif-primary ">
194
+ < div [ngClass] ="{'active': shared .notify.enabled } " class ="notif notif-primary ">
193
195
< span class ="fa fa-cog fa-spin fa-fw "> </ span >
194
- < p > {{ _shared .notify.message }}</ p >
196
+ < p > {{ shared .notify.message }}</ p >
195
197
</ div >
196
198
</ div >
197
199
</ div >
@@ -200,8 +202,8 @@ <h2>Player</h2>
200
202
< div *ngIf ="modalPlaylist " class ="modal-container ">
201
203
< h2 > Do you want to remove this item from playlist?</ h2 >
202
204
< div class ="modal-content ">
203
- < img *ngIf ="globals.thumbnails " src ="{{ globals.playlist [modalPlaylistItem].snippet. thumbnails.medium.url }} " alt ="{{ globals.playlist [modalPlaylistItem].snippet .title }} " />
204
- < p > {{ globals.playlist [modalPlaylistItem].snippet .title }}</ p >
205
+ < img *ngIf ="globals.thumbnails " src ="{{ globals.playlistVideos [modalPlaylistItem].thumbnails.medium }} " alt ="{{ globals.playlistVideos [modalPlaylistItem].title }} " />
206
+ < p > {{ globals.playlistVideos [modalPlaylistItem].title }}</ p >
205
207
</ div >
206
208
< button class ="modal-close " (click) ="closeModal() ">
207
209
< span class ="fa fa-times "> </ span >
@@ -224,7 +226,7 @@ <h3>Import Playlist</h3>
224
226
< button type ="button " class ="btn btn-round btn-primary " (click) ="importPlaylist(importPlaylistInput) "> Replace</ button >
225
227
</ div >
226
228
< h3 > Export Playlist</ h3 >
227
- < p > Number of videos to export: {{globals.playlist .length}}</ p >
229
+ < p > Number of videos to export: {{globals.playlistVideos .length}}</ p >
228
230
</ div >
229
231
< button class ="modal-close " (click) ="closeModal() ">
230
232
< span class ="fa fa-times "> </ span >
0 commit comments