diff options
Diffstat (limited to 'client/src/app/videos/+video-watch')
7 files changed, 16 insertions, 16 deletions
diff --git a/client/src/app/videos/+video-watch/comment/linkifier.service.ts b/client/src/app/videos/+video-watch/comment/linkifier.service.ts index 3f4072efd..9ad419a69 100644 --- a/client/src/app/videos/+video-watch/comment/linkifier.service.ts +++ b/client/src/app/videos/+video-watch/comment/linkifier.service.ts | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Injectable } from '@angular/core' | 1 | import { Injectable } from '@angular/core' |
2 | import { getAbsoluteAPIUrl } from '@app/shared/misc/utils' | 2 | import { getAbsoluteAPIUrl } from '@app/shared/misc/utils' |
3 | import * as linkify from 'linkifyjs' | 3 | const linkify = require('linkifyjs') |
4 | import * as linkifyHtml from 'linkifyjs/html' | 4 | const linkifyHtml = require('linkifyjs/html') |
5 | 5 | ||
6 | @Injectable() | 6 | @Injectable() |
7 | export class LinkifierService { | 7 | export class LinkifierService { |
@@ -40,7 +40,7 @@ export class LinkifierService { | |||
40 | const TT_UNDERSCORE = TT.UNDERSCORE | 40 | const TT_UNDERSCORE = TT.UNDERSCORE |
41 | const TT_DOT = TT.DOT | 41 | const TT_DOT = TT.DOT |
42 | 42 | ||
43 | function MENTION (value) { | 43 | function MENTION (value: any) { |
44 | this.v = value | 44 | this.v = value |
45 | } | 45 | } |
46 | 46 | ||
diff --git a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts index fb7de0e04..ba3c0398e 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment-add.component.ts | |||
@@ -76,7 +76,7 @@ export class VideoCommentAddComponent extends FormReactive implements OnInit { | |||
76 | this.formValidated() | 76 | this.formValidated() |
77 | } | 77 | } |
78 | 78 | ||
79 | openVisitorModal (event) { | 79 | openVisitorModal (event: any) { |
80 | if (this.user === null) { // we only open it for visitors | 80 | if (this.user === null) { // we only open it for visitors |
81 | // fixing ng-bootstrap ModalService and the "Expression Changed After It Has Been Checked" Error | 81 | // fixing ng-bootstrap ModalService and the "Expression Changed After It Has Been Checked" Error |
82 | event.srcElement.blur() | 82 | event.srcElement.blur() |
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.component.ts b/client/src/app/videos/+video-watch/comment/video-comment.component.ts index e90008de9..982470786 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment.component.ts | |||
@@ -26,7 +26,7 @@ export class VideoCommentComponent implements OnInit, OnChanges { | |||
26 | @Output() resetReply = new EventEmitter() | 26 | @Output() resetReply = new EventEmitter() |
27 | 27 | ||
28 | sanitizedCommentHTML = '' | 28 | sanitizedCommentHTML = '' |
29 | newParentComments = [] | 29 | newParentComments: any = [] |
30 | 30 | ||
31 | constructor ( | 31 | constructor ( |
32 | private linkifierService: LinkifierService, | 32 | private linkifierService: LinkifierService, |
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.model.ts b/client/src/app/videos/+video-watch/comment/video-comment.model.ts index fe591811e..824fb24c3 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.model.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment.model.ts | |||
@@ -14,7 +14,7 @@ export class VideoComment implements VideoCommentServerModel { | |||
14 | account: AccountInterface | 14 | account: AccountInterface |
15 | totalReplies: number | 15 | totalReplies: number |
16 | by: string | 16 | by: string |
17 | accountAvatarUrl | 17 | accountAvatarUrl: string |
18 | 18 | ||
19 | constructor (hash: VideoCommentServerModel) { | 19 | constructor (hash: VideoCommentServerModel) { |
20 | this.id = hash.id | 20 | this.id = hash.id |
diff --git a/client/src/app/videos/+video-watch/comment/video-comment.service.ts b/client/src/app/videos/+video-watch/comment/video-comment.service.ts index 9bcb4b7de..7d9c2d0ad 100644 --- a/client/src/app/videos/+video-watch/comment/video-comment.service.ts +++ b/client/src/app/videos/+video-watch/comment/video-comment.service.ts | |||
@@ -32,7 +32,7 @@ export class VideoCommentService { | |||
32 | 32 | ||
33 | return this.authHttp.post(url, normalizedComment) | 33 | return this.authHttp.post(url, normalizedComment) |
34 | .pipe( | 34 | .pipe( |
35 | map(data => this.extractVideoComment(data['comment'])), | 35 | map((data: any) => this.extractVideoComment(data['comment'])), |
36 | catchError(err => this.restExtractor.handleError(err)) | 36 | catchError(err => this.restExtractor.handleError(err)) |
37 | ) | 37 | ) |
38 | } | 38 | } |
@@ -43,7 +43,7 @@ export class VideoCommentService { | |||
43 | 43 | ||
44 | return this.authHttp.post(url, normalizedComment) | 44 | return this.authHttp.post(url, normalizedComment) |
45 | .pipe( | 45 | .pipe( |
46 | map(data => this.extractVideoComment(data[ 'comment' ])), | 46 | map((data: any) => this.extractVideoComment(data[ 'comment' ])), |
47 | catchError(err => this.restExtractor.handleError(err)) | 47 | catchError(err => this.restExtractor.handleError(err)) |
48 | ) | 48 | ) |
49 | } | 49 | } |
diff --git a/client/src/app/videos/+video-watch/comment/video-comments.component.ts b/client/src/app/videos/+video-watch/comment/video-comments.component.ts index c864d82b7..4c1bdf2dd 100644 --- a/client/src/app/videos/+video-watch/comment/video-comments.component.ts +++ b/client/src/app/videos/+video-watch/comment/video-comments.component.ts | |||
@@ -35,7 +35,7 @@ export class VideoCommentsComponent implements OnInit, OnChanges, OnDestroy { | |||
35 | threadComments: { [ id: number ]: VideoCommentThreadTree } = {} | 35 | threadComments: { [ id: number ]: VideoCommentThreadTree } = {} |
36 | threadLoading: { [ id: number ]: boolean } = {} | 36 | threadLoading: { [ id: number ]: boolean } = {} |
37 | 37 | ||
38 | syndicationItems = [] | 38 | syndicationItems: any = [] |
39 | 39 | ||
40 | private sub: Subscription | 40 | private sub: Subscription |
41 | 41 | ||
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 | |||
7 | import { MetaService } from '@ngx-meta/core' | 7 | import { MetaService } from '@ngx-meta/core' |
8 | import { NotificationsService } from 'angular2-notifications' | 8 | import { NotificationsService } from 'angular2-notifications' |
9 | import { forkJoin, Subscription } from 'rxjs' | 9 | import { forkJoin, Subscription } from 'rxjs' |
10 | import * as videojs from 'video.js' | 10 | const videojs = require('video.js') |
11 | import 'videojs-hotkeys' | 11 | import 'videojs-hotkeys' |
12 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' | 12 | import { Hotkey, HotkeysService } from 'angular2-hotkeys' |
13 | import * as WebTorrent from 'webtorrent' | 13 | import * 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 | ||