aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch/video-watch.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-01-27 16:14:11 +0100
committerChocobozzz <florian.bigard@gmail.com>2017-01-27 16:14:11 +0100
commit7ddd02c9b8c1e088f6679a2227f105e6439fc992 (patch)
treea1ff7af17f2a95abe85a2380834957e44032e8c2 /client/src/app/videos/video-watch/video-watch.component.ts
parentcddadde81f91219204cec1f4057a191c02a70894 (diff)
downloadPeerTube-7ddd02c9b8c1e088f6679a2227f105e6439fc992.tar.gz
PeerTube-7ddd02c9b8c1e088f6679a2227f105e6439fc992.tar.zst
PeerTube-7ddd02c9b8c1e088f6679a2227f105e6439fc992.zip
Client: better notifications for a beautiful world
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 });