aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch/video-watch.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/videos/video-watch/video-watch.component.ts')
-rw-r--r--client/src/app/videos/video-watch/video-watch.component.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/client/src/app/videos/video-watch/video-watch.component.ts b/client/src/app/videos/video-watch/video-watch.component.ts
index 05e844f60..99188bfb3 100644
--- a/client/src/app/videos/video-watch/video-watch.component.ts
+++ b/client/src/app/videos/video-watch/video-watch.component.ts
@@ -1,5 +1,5 @@
1import { Component, ElementRef, OnInit } from '@angular/core'; 1import { Component, ElementRef, OnInit } from '@angular/core';
2import { CanDeactivate, ComponentInstruction, RouteParams } from '@angular/router-deprecated'; 2import { CanDeactivate, RouteSegment } from '@angular/router';
3 3
4import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe'; 4import { BytesPipe } from 'angular-pipes/src/math/bytes.pipe';
5 5
@@ -30,7 +30,7 @@ export class VideoWatchComponent implements OnInit, CanDeactivate {
30 30
31 constructor( 31 constructor(
32 private elementRef: ElementRef, 32 private elementRef: ElementRef,
33 private routeParams: RouteParams, 33 private routeSegment: RouteSegment,
34 private videoService: VideoService, 34 private videoService: VideoService,
35 private webTorrentService: WebTorrentService 35 private webTorrentService: WebTorrentService
36 ) {} 36 ) {}
@@ -74,7 +74,7 @@ export class VideoWatchComponent implements OnInit, CanDeactivate {
74 } 74 }
75 75
76 ngOnInit() { 76 ngOnInit() {
77 let id = this.routeParams.get('id'); 77 let id = this.routeSegment.getParam('id');
78 this.videoService.getVideo(id).subscribe( 78 this.videoService.getVideo(id).subscribe(
79 video => { 79 video => {
80 this.video = video; 80 this.video = video;
@@ -84,11 +84,11 @@ export class VideoWatchComponent implements OnInit, CanDeactivate {
84 ); 84 );
85 } 85 }
86 86
87 routerCanDeactivate(next: ComponentInstruction, prev: ComponentInstruction) { 87 routerCanDeactivate() {
88 console.log('Removing video from webtorrent.'); 88 console.log('Removing video from webtorrent.');
89 clearInterval(this.torrentInfosInterval); 89 clearInterval(this.torrentInfosInterval);
90 this.webTorrentService.remove(this.video.magnetUri); 90 this.webTorrentService.remove(this.video.magnetUri);
91 return true; 91 return Promise.resolve(true);
92 } 92 }
93 93
94 private loadTooLong() { 94 private loadTooLong() {