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.ts8
1 files changed, 5 insertions, 3 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 5cd7550be..c27133f74 100644
--- a/client/src/app/videos/video-watch/video-watch.component.ts
+++ b/client/src/app/videos/video-watch/video-watch.component.ts
@@ -1,8 +1,9 @@
1import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core'; 1import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from '@angular/core';
2import { ActivatedRoute } from '@angular/router'; 2import { ActivatedRoute } from '@angular/router';
3 3
4import { MetaService } from 'ng2-meta';
5import * as videojs from 'video.js'; 4import * as videojs from 'video.js';
5import { MetaService } from 'ng2-meta';
6import { NotificationsService } from 'angular2-notifications';
6 7
7import { AuthService } from '../../core'; 8import { AuthService } from '../../core';
8import { VideoMagnetComponent } from './video-magnet.component'; 9import { VideoMagnetComponent } from './video-magnet.component';
@@ -45,7 +46,8 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
45 private videoService: VideoService, 46 private videoService: VideoService,
46 private metaService: MetaService, 47 private metaService: MetaService,
47 private webTorrentService: WebTorrentService, 48 private webTorrentService: WebTorrentService,
48 private authService: AuthService 49 private authService: AuthService,
50 private notificationsService: NotificationsService
49 ) {} 51 ) {}
50 52
51 ngOnInit() { 53 ngOnInit() {
@@ -117,7 +119,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
117 console.log('Added ' + this.video.magnetUri + '.'); 119 console.log('Added ' + this.video.magnetUri + '.');
118 torrent.files[0].renderTo(this.playerElement, { autoplay: true }, (err) => { 120 torrent.files[0].renderTo(this.playerElement, { autoplay: true }, (err) => {
119 if (err) { 121 if (err) {
120 alert('Cannot append the file.'); 122 this.notificationsService.error('Error', 'Cannot append the file in the video element.');
121 console.error(err); 123 console.error(err);
122 } 124 }
123 }); 125 });