aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/angular/videos/components/watch/videos-watch.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2016-04-29 14:18:14 +0200
committerChocobozzz <florian.bigard@gmail.com>2016-04-29 14:18:14 +0200
commitda932efc8199e2d9fe5d830432fb3833865a9a42 (patch)
tree5cd67542971ec695a7f546ae3d129825c4e6c607 /client/angular/videos/components/watch/videos-watch.component.ts
parente9a2578e952a361b042fee45d211c6f88d89209e (diff)
downloadPeerTube-da932efc8199e2d9fe5d830432fb3833865a9a42.tar.gz
PeerTube-da932efc8199e2d9fe5d830432fb3833865a9a42.tar.zst
PeerTube-da932efc8199e2d9fe5d830432fb3833865a9a42.zip
Add loader gif when loading the video
Diffstat (limited to 'client/angular/videos/components/watch/videos-watch.component.ts')
-rw-r--r--client/angular/videos/components/watch/videos-watch.component.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/angular/videos/components/watch/videos-watch.component.ts b/client/angular/videos/components/watch/videos-watch.component.ts
index d2203727e..52c31fe32 100644
--- a/client/angular/videos/components/watch/videos-watch.component.ts
+++ b/client/angular/videos/components/watch/videos-watch.component.ts
@@ -20,6 +20,7 @@ export class VideosWatchComponent implements OnInit, CanDeactivate {
20 downloadSpeed: number; 20 downloadSpeed: number;
21 uploadSpeed: number; 21 uploadSpeed: number;
22 numPeers: number; 22 numPeers: number;
23 loading: boolean = false;
23 24
24 private _interval: number; 25 private _interval: number;
25 private client: any; 26 private client: any;
@@ -42,9 +43,11 @@ export class VideosWatchComponent implements OnInit, CanDeactivate {
42 } 43 }
43 44
44 loadVideo(video: Video) { 45 loadVideo(video: Video) {
46 this.loading = true;
45 this.video = video; 47 this.video = video;
46 console.log('Adding ' + this.video.magnetUri + '.'); 48 console.log('Adding ' + this.video.magnetUri + '.');
47 this.client.add(this.video.magnetUri, (torrent) => { 49 this.client.add(this.video.magnetUri, (torrent) => {
50 this.loading = false;
48 console.log('Added ' + this.video.magnetUri + '.'); 51 console.log('Added ' + this.video.magnetUri + '.');
49 torrent.files[0].appendTo(this._elementRef.nativeElement.querySelector('.embed-responsive'), (err) => { 52 torrent.files[0].appendTo(this._elementRef.nativeElement.querySelector('.embed-responsive'), (err) => {
50 if (err) { 53 if (err) {