diff options
Diffstat (limited to 'client/src/assets/player/shared/peertube')
-rw-r--r-- | client/src/assets/player/shared/peertube/peertube-plugin.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/src/assets/player/shared/peertube/peertube-plugin.ts b/client/src/assets/player/shared/peertube/peertube-plugin.ts index a29a0921f..69a7b2d65 100644 --- a/client/src/assets/player/shared/peertube/peertube-plugin.ts +++ b/client/src/assets/player/shared/peertube/peertube-plugin.ts | |||
@@ -1,5 +1,6 @@ | |||
1 | import debug from 'debug' | 1 | import debug from 'debug' |
2 | import videojs from 'video.js' | 2 | import videojs from 'video.js' |
3 | import { logger } from '@root-helpers/logger' | ||
3 | import { isMobile } from '@root-helpers/web-browser' | 4 | import { isMobile } from '@root-helpers/web-browser' |
4 | import { timeToInt } from '@shared/core-utils' | 5 | import { timeToInt } from '@shared/core-utils' |
5 | import { VideoView, VideoViewEvent } from '@shared/models/videos' | 6 | import { VideoView, VideoViewEvent } from '@shared/models/videos' |
@@ -15,7 +16,7 @@ import { | |||
15 | import { PeerTubePluginOptions, VideoJSCaption } from '../../types' | 16 | import { PeerTubePluginOptions, VideoJSCaption } from '../../types' |
16 | import { SettingsButton } from '../settings/settings-menu-button' | 17 | import { SettingsButton } from '../settings/settings-menu-button' |
17 | 18 | ||
18 | const logger = debug('peertube:player:peertube') | 19 | const debugLogger = debug('peertube:player:peertube') |
19 | 20 | ||
20 | const Plugin = videojs.getPlugin('plugin') | 21 | const Plugin = videojs.getPlugin('plugin') |
21 | 22 | ||
@@ -176,7 +177,7 @@ class PeerTubePlugin extends Plugin { | |||
176 | lastCurrentTime = currentTime | 177 | lastCurrentTime = currentTime |
177 | 178 | ||
178 | this.notifyUserIsWatching(currentTime, lastViewEvent) | 179 | this.notifyUserIsWatching(currentTime, lastViewEvent) |
179 | .catch(err => console.error('Cannot notify user is watching.', err)) | 180 | .catch(err => logger.error('Cannot notify user is watching.', err)) |
180 | 181 | ||
181 | lastViewEvent = undefined | 182 | lastViewEvent = undefined |
182 | 183 | ||
@@ -249,7 +250,7 @@ class PeerTubePlugin extends Plugin { | |||
249 | (this.player as any).cache_.inactivityTimeout = timeout | 250 | (this.player as any).cache_.inactivityTimeout = timeout |
250 | this.player.options_.inactivityTimeout = timeout | 251 | this.player.options_.inactivityTimeout = timeout |
251 | 252 | ||
252 | logger('Set player inactivity to ' + timeout) | 253 | debugLogger('Set player inactivity to ' + timeout) |
253 | } | 254 | } |
254 | 255 | ||
255 | private initCaptions () { | 256 | private initCaptions () { |