diff options
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.ts | 14 |
1 files changed, 13 insertions, 1 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 9a36c17e2..736ca7d5a 100644 --- a/client/src/app/videos/video-watch/video-watch.component.ts +++ b/client/src/app/videos/video-watch/video-watch.component.ts | |||
@@ -1,6 +1,8 @@ | |||
1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit } from '@angular/core'; | 1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'; |
2 | import { ActivatedRoute } from '@angular/router'; | 2 | import { ActivatedRoute } from '@angular/router'; |
3 | 3 | ||
4 | import { ModalDirective } from 'ng2-bootstrap/components/modal'; | ||
5 | |||
4 | import { Video, VideoService } from '../shared'; | 6 | import { Video, VideoService } from '../shared'; |
5 | import { WebTorrentService } from './webtorrent.service'; | 7 | import { WebTorrentService } from './webtorrent.service'; |
6 | 8 | ||
@@ -13,6 +15,8 @@ import { WebTorrentService } from './webtorrent.service'; | |||
13 | export class VideoWatchComponent implements OnInit, OnDestroy { | 15 | export class VideoWatchComponent implements OnInit, OnDestroy { |
14 | private static LOADTIME_TOO_LONG: number = 30000; | 16 | private static LOADTIME_TOO_LONG: number = 30000; |
15 | 17 | ||
18 | @ViewChild('magnetUriModal') magnetUriModal: ModalDirective; | ||
19 | |||
16 | downloadSpeed: number; | 20 | downloadSpeed: number; |
17 | error: boolean = false; | 21 | error: boolean = false; |
18 | loading: boolean = false; | 22 | loading: boolean = false; |
@@ -87,6 +91,14 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
87 | }); | 91 | }); |
88 | } | 92 | } |
89 | 93 | ||
94 | showMagnetUriModal() { | ||
95 | this.magnetUriModal.show(); | ||
96 | } | ||
97 | |||
98 | hideMagnetUriModal() { | ||
99 | this.magnetUriModal.hide(); | ||
100 | } | ||
101 | |||
90 | private loadTooLong() { | 102 | private loadTooLong() { |
91 | this.error = true; | 103 | this.error = true; |
92 | console.error('The video load seems to be abnormally long.'); | 104 | console.error('The video load seems to be abnormally long.'); |