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.ts14
1 files changed, 7 insertions, 7 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 c5deddf05..ed5e723c9 100644
--- a/client/src/app/videos/+video-watch/video-watch.component.ts
+++ b/client/src/app/videos/+video-watch/video-watch.component.ts
@@ -7,7 +7,7 @@ import { VideoSupportComponent } from '@app/videos/+video-watch/modal/video-supp
7import { MetaService } from '@ngx-meta/core' 7import { MetaService } from '@ngx-meta/core'
8import { NotificationsService } from 'angular2-notifications' 8import { NotificationsService } from 'angular2-notifications'
9import { forkJoin, Subscription } from 'rxjs' 9import { forkJoin, Subscription } from 'rxjs'
10import * as videojs from 'video.js' 10const videojs = require('video.js')
11import 'videojs-hotkeys' 11import 'videojs-hotkeys'
12import { Hotkey, HotkeysService } from 'angular2-hotkeys' 12import { Hotkey, HotkeysService } from 'angular2-hotkeys'
13import * as WebTorrent from 'webtorrent' 13import * as WebTorrent from 'webtorrent'
@@ -45,7 +45,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
45 @ViewChild('videoBlacklistModal') videoBlacklistModal: VideoBlacklistComponent 45 @ViewChild('videoBlacklistModal') videoBlacklistModal: VideoBlacklistComponent
46 @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent 46 @ViewChild('subscribeButton') subscribeButton: SubscribeButtonComponent
47 47
48 player: videojs.Player 48 player: any
49 playerElement: HTMLVideoElement 49 playerElement: HTMLVideoElement
50 userRating: UserVideoRateType = null 50 userRating: UserVideoRateType = null
51 video: VideoDetails = null 51 video: VideoDetails = null
@@ -435,7 +435,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
435 this.zone.runOutsideAngular(async () => { 435 this.zone.runOutsideAngular(async () => {
436 videojs(this.playerElement, videojsOptions, function () { 436 videojs(this.playerElement, videojsOptions, function () {
437 self.player = this 437 self.player = this
438 this.on('customError', (event, data) => self.handleError(data.err)) 438 this.on('customError', (data: any) => self.handleError(data.err))
439 439
440 addContextMenu(self.player, self.video.embedUrl) 440 addContextMenu(self.player, self.video.embedUrl)
441 }) 441 })
@@ -448,7 +448,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
448 this.checkUserRating() 448 this.checkUserRating()
449 } 449 }
450 450
451 private setRating (nextRating) { 451 private setRating (nextRating: string) {
452 let method 452 let method
453 switch (nextRating) { 453 switch (nextRating) {
454 case 'like': 454 case 'like':
@@ -466,11 +466,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy {
466 .subscribe( 466 .subscribe(
467 () => { 467 () => {
468 // Update the video like attribute 468 // Update the video like attribute
469 this.updateVideoRating(this.userRating, nextRating) 469 this.updateVideoRating(this.userRating, nextRating as VideoRateType)
470 this.userRating = nextRating 470 this.userRating = nextRating as UserVideoRateType
471 }, 471 },
472 472
473 err => this.notificationsService.error(this.i18n('Error'), err.message) 473 (err: any) => this.notificationsService.error(this.i18n('Error'), err.message)
474 ) 474 )
475 } 475 }
476 476