diff options
author | Chocobozzz <florian.bigard@gmail.com> | 2017-01-27 16:14:11 +0100 |
---|---|---|
committer | Chocobozzz <florian.bigard@gmail.com> | 2017-01-27 16:14:11 +0100 |
commit | 7ddd02c9b8c1e088f6679a2227f105e6439fc992 (patch) | |
tree | a1ff7af17f2a95abe85a2380834957e44032e8c2 /client/src/app/videos/video-watch/video-watch.component.ts | |
parent | cddadde81f91219204cec1f4057a191c02a70894 (diff) | |
download | PeerTube-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.ts | 8 |
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 @@ | |||
1 | import { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } 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 { MetaService } from 'ng2-meta'; | ||
5 | import * as videojs from 'video.js'; | 4 | import * as videojs from 'video.js'; |
5 | import { MetaService } from 'ng2-meta'; | ||
6 | import { NotificationsService } from 'angular2-notifications'; | ||
6 | 7 | ||
7 | import { AuthService } from '../../core'; | 8 | import { AuthService } from '../../core'; |
8 | import { VideoMagnetComponent } from './video-magnet.component'; | 9 | import { 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 | }); |