@@ -54,43 +54,45 @@ <h1><span class="favicon-app"></span>YouTube Player v2.0</h1>
54
54
< button type ="button " class ="video-item-head-btn " (click) ="exportPlaylist() "> < span class ="fa fa-cog "> </ span > manage</ button >
55
55
</ div >
56
56
< div class ="playlist-video-content " [dragula] ='"playlistDrag" ' [dragulaModel] ='globals.playlistVideos ' #playlistContainer >
57
- < ng-container *ngIf ="globals.playlistVideos.length === 0 ">
57
+ < ng-container *ngIf ="loading ">
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.playlistVideos; let i = index " [ngClass] ="currentPlaylistItem === i ? 'active' : '' " [attr.data-index] ="i " class ="video-item ">
66
- < div class ="video-item-info ">
67
- < div *ngIf ="globals.thumbnails " class ="video-item-image " [ngStyle] ="{'background-image': 'url(' + playlistVideo.thumbnails.default +')'} "> </ div >
68
- < div class ="video-item-content ">
69
- < ng-container *ngIf ="currentPlaylistItem === i && currentState === 1 ">
70
- < p class ="video-item-hint "> < span class ="fa fa-play "> </ span > Playing</ p >
71
- </ ng-container >
72
- < ng-container *ngIf ="currentPlaylistItem === i && currentState !== 1 && currentState !== -1 ">
73
- < p class ="video-item-hint "> < span class ="fa fa-pause "> </ span > Paused</ p >
74
- </ ng-container >
75
- < ng-container *ngIf ="currentPlaylistItem === i && currentState === -1 ">
76
- < p class ="video-item-hint "> < span class ="fa fa-stop "> </ span > Not started</ p >
77
- </ ng-container >
78
- < p class ="video-item-title "> {{ playlistVideo.title }}</ p >
79
- < p class ="video-item-autor "> by < span > {{ playlistVideo.channelTitle }}</ span > </ p >
65
+ < ng-container *ngIf ="!loading ">
66
+ < div *ngFor ="let playlistVideo of globals.playlistVideos; let i = index " [ngClass] ="currentPlaylistItem === i ? 'active' : '' " [attr.data-index] ="i " class ="video-item ">
67
+ < div class ="video-item-info ">
68
+ < div *ngIf ="globals.thumbnails " class ="video-item-image " [ngStyle] ="{'background-image': 'url(' + playlistVideo.thumbnails.default +')'} "> </ div >
69
+ < div class ="video-item-content ">
70
+ < ng-container *ngIf ="currentPlaylistItem === i && currentState === 1 ">
71
+ < p class ="video-item-hint "> < span class ="fa fa-play "> </ span > Playing</ p >
72
+ </ ng-container >
73
+ < ng-container *ngIf ="currentPlaylistItem === i && currentState !== 1 && currentState !== -1 ">
74
+ < p class ="video-item-hint "> < span class ="fa fa-pause "> </ span > Paused</ p >
75
+ </ ng-container >
76
+ < ng-container *ngIf ="currentPlaylistItem === i && currentState === -1 ">
77
+ < p class ="video-item-hint "> < span class ="fa fa-stop "> </ span > Not started</ p >
78
+ </ ng-container >
79
+ < p class ="video-item-title "> {{ playlistVideo.title }}</ p >
80
+ < p class ="video-item-autor "> by < span > {{ playlistVideo.channelTitle }}</ span > </ p >
81
+ </ div >
82
+ </ div >
83
+ < div class ="video-item-settings ">
84
+ < button class ="video-item-play " (click) ="onClickPlaylist($event, i) ">
85
+ < span class ="fa " [ngClass] ="currentPlaylistItem === i && currentState === 1 ? 'fa-pause' : 'fa-play' "> </ span >
86
+ </ button >
87
+ < button class ="video-item-share " (click) ="onCopyVideoItemLink(i, 3) ">
88
+ < span class ="fa fa-share-alt "> </ span >
89
+ </ button >
90
+ < button class ="video-item-remove " (click) ="showPlaylistModal(i) ">
91
+ < span class ="fa fa-times "> </ span >
92
+ </ button >
80
93
</ div >
81
94
</ div >
82
- < div class ="video-item-settings ">
83
- < button class ="video-item-play " (click) ="onClickPlaylist($event, i) ">
84
- < span class ="fa " [ngClass] ="currentPlaylistItem === i && currentState === 1 ? 'fa-pause' : 'fa-play' "> </ span >
85
- </ button >
86
- < button class ="video-item-share " (click) ="onCopyVideoItemLink(i, 3) ">
87
- < span class ="fa fa-share-alt "> </ span >
88
- </ button >
89
- < button class ="video-item-remove " (click) ="showPlaylistModal(i) ">
90
- < span class ="fa fa-times "> </ span >
91
- </ button >
92
- </ div >
93
- </ div >
95
+ </ ng-container >
94
96
</ div >
95
97
</ div >
96
98
</ div >
@@ -104,11 +106,11 @@ <h2>Player</h2>
104
106
< p (click) ="addPlaylistItem(0, 3) "> < span class ="fa fa-plus "> </ span > Add to playlist</ p >
105
107
</ div >
106
108
</ div >
107
- < div *ngIf ="!globals.currentVideo " class ="app-content ">
109
+ < div *ngIf ="loading " class ="app-content ">
108
110
< div class ="youtube-player active loading-featured "> </ div >
109
111
</ div >
110
112
< div class ="app-content ">
111
- < div class ="youtube-player " *ngIf ="globals.currentVideo " [ngClass] ="{'active': globals.displayVideoPlayer } ">
113
+ < div class ="youtube-player " *ngIf ="!loading " [ngClass] ="{'active': globals.displayVideoPlayer } ">
112
114
< youtube-player [videoId] ="globals.currentVideo.id " (ready) ="savePlayer($event) " (change) ="onStateChange($event) " [playerVars] ="playerVars() "> </ youtube-player >
113
115
</ div >
114
116
< div class ="current-video-all " *ngIf ="globals.currentVideo ">
@@ -152,15 +154,15 @@ <h2>Player</h2>
152
154
Similar videos
153
155
</ div >
154
156
< div class ="related-video-content ">
155
- < ng-container *ngIf ="globals.relatedVideos.length === 0 ">
157
+ < ng-container *ngIf ="loading ">
156
158
< div *ngFor ="let i of [1,2,3,4] " class ="video-item ">
157
159
< div class ="video-item-info ">
158
160
< div class ="video-item-image loading-featured "> </ div >
159
161
< div class ="video-item-content loading-featured "> </ div >
160
162
</ div >
161
163
</ div >
162
164
</ ng-container >
163
- < ng-container *ngIf ="globals.relatedVideos ">
165
+ < ng-container *ngIf ="!loading ">
164
166
< div *ngFor ="let relatedVideo of globals.relatedVideos; let i = index " [attr.data-index] ="i " class ="video-item ">
165
167
< div class ="video-item-info ">
166
168
< div *ngIf ="globals.thumbnails " class ="video-item-image " [ngStyle] ="{'background-image': 'url(' + relatedVideo.thumbnails.default +')'} "> </ div >
0 commit comments