aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/angular/videos/components/watch/videos-watch.component.ts
diff options
context:
space:
mode:
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) {