import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
+import { AuthService } from '../../core';
+import { VideoMagnetComponent } from './video-magnet.component';
+import { VideoShareComponent } from './video-share.component';
+import { VideoReportComponent } from './video-report.component';
import { Video, VideoService } from '../shared';
import { WebTorrentService } from './webtorrent.service';
import { Video, VideoService } from '../shared';
import { WebTorrentService } from './webtorrent.service';
export class VideoWatchComponent implements OnInit, OnDestroy {
private static LOADTIME_TOO_LONG: number = 30000;
export class VideoWatchComponent implements OnInit, OnDestroy {
private static LOADTIME_TOO_LONG: number = 30000;
- @ViewChild('magnetUriModal') magnetUriModal: ModalDirective;
- @ViewChild('shareModal') shareModal: ModalDirective;
+ @ViewChild('videoMagnetModal') videoMagnetModal: VideoMagnetComponent;
+ @ViewChild('videoShareModal') videoShareModal: VideoShareComponent;
+ @ViewChild('videoReportModal') videoReportModal: VideoReportComponent;
private route: ActivatedRoute,
private videoService: VideoService,
private metaService: MetaService,
private route: ActivatedRoute,
private videoService: VideoService,
private metaService: MetaService,
console.log('Removing video from webtorrent.');
clearInterval(this.torrentInfosInterval);
clearTimeout(this.errorTimer);
console.log('Removing video from webtorrent.');
clearInterval(this.torrentInfosInterval);
clearTimeout(this.errorTimer);
- showMagnetUriModal() {
- this.magnetUriModal.show();
- }
-
- hideMagnetUriModal() {
- this.magnetUriModal.hide();
+ showReportModal(event: Event) {
+ event.preventDefault();
+ this.videoReportModal.show();