diff options
Diffstat (limited to 'client/src/app/+videos/+video-watch')
-rw-r--r-- | client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts | 3 | ||||
-rw-r--r-- | client/src/app/+videos/+video-watch/video-watch.component.ts | 13 |
2 files changed, 9 insertions, 7 deletions
diff --git a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts index e002b3c22..b5444facb 100644 --- a/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts +++ b/client/src/app/+videos/+video-watch/shared/metadata/video-description.component.ts | |||
@@ -1,6 +1,7 @@ | |||
1 | import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnChanges, Output } from '@angular/core' |
2 | import { MarkdownService, Notifier } from '@app/core' | 2 | import { MarkdownService, Notifier } from '@app/core' |
3 | import { VideoDetails, VideoService } from '@app/shared/shared-main' | 3 | import { VideoDetails, VideoService } from '@app/shared/shared-main' |
4 | import { logger } from '@root-helpers/logger' | ||
4 | 5 | ||
5 | @Component({ | 6 | @Component({ |
6 | selector: 'my-video-description', | 7 | selector: 'my-video-description', |
@@ -75,7 +76,7 @@ export class VideoDescriptionComponent implements OnChanges { | |||
75 | private updateVideoDescription (description: string) { | 76 | private updateVideoDescription (description: string) { |
76 | this.video.description = description | 77 | this.video.description = description |
77 | this.setVideoDescriptionHTML() | 78 | this.setVideoDescriptionHTML() |
78 | .catch(err => console.error(err)) | 79 | .catch(err => logger.error(err)) |
79 | } | 80 | } |
80 | 81 | ||
81 | private async setVideoDescriptionHTML () { | 82 | private async setVideoDescriptionHTML () { |
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 6a3bd1522..292ce6441 100644 --- a/client/src/app/+videos/+video-watch/video-watch.component.ts +++ b/client/src/app/+videos/+video-watch/video-watch.component.ts | |||
@@ -24,6 +24,7 @@ import { Video, VideoCaptionService, VideoDetails, VideoService } from '@app/sha | |||
24 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' | 24 | import { SubscribeButtonComponent } from '@app/shared/shared-user-subscription' |
25 | import { LiveVideoService } from '@app/shared/shared-video-live' | 25 | import { LiveVideoService } from '@app/shared/shared-video-live' |
26 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' | 26 | import { VideoPlaylist, VideoPlaylistService } from '@app/shared/shared-video-playlist' |
27 | import { logger } from '@root-helpers/logger' | ||
27 | import { isP2PEnabled } from '@root-helpers/video' | 28 | import { isP2PEnabled } from '@root-helpers/video' |
28 | import { timeToInt } from '@shared/core-utils' | 29 | import { timeToInt } from '@shared/core-utils' |
29 | import { | 30 | import { |
@@ -225,7 +226,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
225 | : parseInt(positionParam + '', 10) | 226 | : parseInt(positionParam + '', 10) |
226 | 227 | ||
227 | if (isNaN(this.playlistPosition)) { | 228 | if (isNaN(this.playlistPosition)) { |
228 | console.error(`playlistPosition query param '${positionParam}' was parsed as NaN, defaulting to 1.`) | 229 | logger.error(`playlistPosition query param '${positionParam}' was parsed as NaN, defaulting to 1.`) |
229 | this.playlistPosition = 1 | 230 | this.playlistPosition = 1 |
230 | } | 231 | } |
231 | 232 | ||
@@ -378,7 +379,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
378 | } | 379 | } |
379 | 380 | ||
380 | this.buildPlayer(urlOptions, loggedInOrAnonymousUser) | 381 | this.buildPlayer(urlOptions, loggedInOrAnonymousUser) |
381 | .catch(err => console.error('Cannot build the player', err)) | 382 | .catch(err => logger.error('Cannot build the player', err)) |
382 | 383 | ||
383 | this.setOpenGraphTags() | 384 | this.setOpenGraphTags() |
384 | 385 | ||
@@ -550,7 +551,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
550 | this.player.dispose() | 551 | this.player.dispose() |
551 | this.player = undefined | 552 | this.player = undefined |
552 | } catch (err) { | 553 | } catch (err) { |
553 | console.error('Cannot dispose player.', err) | 554 | logger.error('Cannot dispose player.', err) |
554 | } | 555 | } |
555 | } | 556 | } |
556 | 557 | ||
@@ -717,7 +718,7 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
717 | private handleLiveStateChange (newState: VideoState) { | 718 | private handleLiveStateChange (newState: VideoState) { |
718 | if (newState !== VideoState.PUBLISHED) return | 719 | if (newState !== VideoState.PUBLISHED) return |
719 | 720 | ||
720 | console.log('Loading video after live update.') | 721 | logger.info('Loading video after live update.') |
721 | 722 | ||
722 | const videoUUID = this.video.uuid | 723 | const videoUUID = this.video.uuid |
723 | 724 | ||
@@ -728,11 +729,11 @@ export class VideoWatchComponent implements OnInit, OnDestroy { | |||
728 | 729 | ||
729 | private handleLiveViewsChange (newViewers: number) { | 730 | private handleLiveViewsChange (newViewers: number) { |
730 | if (!this.video) { | 731 | if (!this.video) { |
731 | console.error('Cannot update video live views because video is no defined.') | 732 | logger.error('Cannot update video live views because video is no defined.') |
732 | return | 733 | return |
733 | } | 734 | } |
734 | 735 | ||
735 | console.log('Updating live views.') | 736 | logger.info('Updating live views.') |
736 | 737 | ||
737 | this.video.viewers = newViewers | 738 | this.video.viewers = newViewers |
738 | } | 739 | } |