aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/video-watch/video-watch.component.ts
diff options
context:
space:
mode:
authorChocobozzz <florian.bigard@gmail.com>2017-06-17 11:28:11 +0200
committerChocobozzz <florian.bigard@gmail.com>2017-06-17 11:28:11 +0200
commit154898b0b7bc1af41fc5a94974e338a3590c90f3 (patch)
tree5fb90f66da7587aed53c99ac1884c7acd0c1f7ca /client/src/app/videos/video-watch/video-watch.component.ts
parentdf98563e2104b82b119c00a3cd83cd0dc1242d25 (diff)
downloadPeerTube-154898b0b7bc1af41fc5a94974e338a3590c90f3.tar.gz
PeerTube-154898b0b7bc1af41fc5a94974e338a3590c90f3.tar.zst
PeerTube-154898b0b7bc1af41fc5a94974e338a3590c90f3.zip
Share models between server and client
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.ts10
1 files changed, 5 insertions, 5 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 4a547f7e4..808e0eda9 100644
--- a/client/src/app/videos/video-watch/video-watch.component.ts
+++ b/client/src/app/videos/video-watch/video-watch.component.ts
@@ -11,15 +11,15 @@ import { AuthService, ConfirmService } from '../../core'
11import { VideoMagnetComponent } from './video-magnet.component' 11import { VideoMagnetComponent } from './video-magnet.component'
12import { VideoShareComponent } from './video-share.component' 12import { VideoShareComponent } from './video-share.component'
13import { VideoReportComponent } from './video-report.component' 13import { VideoReportComponent } from './video-report.component'
14import { RateType, Video, VideoService } from '../shared' 14import { Video, VideoService } from '../shared'
15import { WebTorrentService } from './webtorrent.service' 15import { WebTorrentService } from './webtorrent.service'
16import { UserVideoRateType, VideoRateType, UserVideoRate } from '../../../../../shared'
16 17
17@Component({ 18@Component({
18 selector: 'my-video-watch', 19 selector: 'my-video-watch',
19 templateUrl: './video-watch.component.html', 20 templateUrl: './video-watch.component.html',
20 styleUrls: [ './video-watch.component.scss' ] 21 styleUrls: [ './video-watch.component.scss' ]
21}) 22})
22
23export class VideoWatchComponent implements OnInit, OnDestroy { 23export class VideoWatchComponent implements OnInit, OnDestroy {
24 private static LOADTIME_TOO_LONG = 20000 24 private static LOADTIME_TOO_LONG = 20000
25 25
@@ -34,7 +34,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
34 player: videojs.Player 34 player: videojs.Player
35 playerElement: Element 35 playerElement: Element
36 uploadSpeed: number 36 uploadSpeed: number
37 userRating: RateType = null 37 userRating: UserVideoRateType = null
38 video: Video = null 38 video: Video = null
39 videoNotFound = false 39 videoNotFound = false
40 40
@@ -249,7 +249,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
249 249
250 this.videoService.getUserVideoRating(this.video.id) 250 this.videoService.getUserVideoRating(this.video.id)
251 .subscribe( 251 .subscribe(
252 ratingObject => { 252 (ratingObject: UserVideoRate) => {
253 if (ratingObject) { 253 if (ratingObject) {
254 this.userRating = ratingObject.rating 254 this.userRating = ratingObject.rating
255 } 255 }
@@ -282,7 +282,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
282 ) 282 )
283 } 283 }
284 284
285 private updateVideoRating (oldRating: RateType, newRating: RateType) { 285 private updateVideoRating (oldRating: UserVideoRateType, newRating: VideoRateType) {
286 let likesToIncrement = 0 286 let likesToIncrement = 0
287 let dislikesToIncrement = 0 287 let dislikesToIncrement = 0
288 288