diff options
Diffstat (limited to 'client/src/assets/player/peertube-plugin.ts')
-rw-r--r-- | client/src/assets/player/peertube-plugin.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/src/assets/player/peertube-plugin.ts b/client/src/assets/player/peertube-plugin.ts index 451b4a161..272f5353d 100644 --- a/client/src/assets/player/peertube-plugin.ts +++ b/client/src/assets/player/peertube-plugin.ts | |||
@@ -12,6 +12,9 @@ import { | |||
12 | import { PeerTubePluginOptions, UserWatching, VideoJSCaption } from './peertube-videojs-typings' | 12 | import { PeerTubePluginOptions, UserWatching, VideoJSCaption } from './peertube-videojs-typings' |
13 | import { isMobile } from './utils' | 13 | import { isMobile } from './utils' |
14 | import { SettingsButton } from './videojs-components/settings-menu-button' | 14 | import { SettingsButton } from './videojs-components/settings-menu-button' |
15 | import debug from 'debug' | ||
16 | |||
17 | const logger = debug('peertube:player:peertube') | ||
15 | 18 | ||
16 | const Plugin = videojs.getPlugin('plugin') | 19 | const Plugin = videojs.getPlugin('plugin') |
17 | 20 | ||
@@ -233,7 +236,7 @@ class PeerTubePlugin extends Plugin { | |||
233 | } | 236 | } |
234 | 237 | ||
235 | private alterInactivity () { | 238 | private alterInactivity () { |
236 | if (this.menuOpened || this.mouseInSettings || this.mouseInControlBar || this.isTouchEnabled()) { | 239 | if (this.menuOpened || this.mouseInSettings || this.mouseInControlBar) { |
237 | this.setInactivityTimeout(0) | 240 | this.setInactivityTimeout(0) |
238 | return | 241 | return |
239 | } | 242 | } |
@@ -245,6 +248,8 @@ class PeerTubePlugin extends Plugin { | |||
245 | private setInactivityTimeout (timeout: number) { | 248 | private setInactivityTimeout (timeout: number) { |
246 | (this.player as any).cache_.inactivityTimeout = timeout | 249 | (this.player as any).cache_.inactivityTimeout = timeout |
247 | this.player.options_.inactivityTimeout = timeout | 250 | this.player.options_.inactivityTimeout = timeout |
251 | |||
252 | logger('Set player inactivity to ' + timeout) | ||
248 | } | 253 | } |
249 | 254 | ||
250 | private isTouchEnabled () { | 255 | private isTouchEnabled () { |