diff options
author | Chocobozzz <me@florianbigard.com> | 2020-06-04 16:06:03 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-06-23 16:57:35 +0200 |
commit | 7ede74add2d41958f3aad0053afc812698f261a0 (patch) | |
tree | 3a367952321e64455604f708b286a8aff5f7700e /client/src/assets/player | |
parent | 275350614fbb83b3cd51e52d74428860d696c6c7 (diff) | |
download | PeerTube-7ede74add2d41958f3aad0053afc812698f261a0.tar.gz PeerTube-7ede74add2d41958f3aad0053afc812698f261a0.tar.zst PeerTube-7ede74add2d41958f3aad0053afc812698f261a0.zip |
Support player hotkeys when it is not focused
Diffstat (limited to 'client/src/assets/player')
-rw-r--r-- | client/src/assets/player/peertube-player-manager.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/client/src/assets/player/peertube-player-manager.ts b/client/src/assets/player/peertube-player-manager.ts index ebb1e454a..630eebbca 100644 --- a/client/src/assets/player/peertube-player-manager.ts +++ b/client/src/assets/player/peertube-player-manager.ts | |||
@@ -452,6 +452,13 @@ export class PeertubePlayerManager { | |||
452 | private static addHotkeysOptions (plugins: VideoJSPluginOptions) { | 452 | private static addHotkeysOptions (plugins: VideoJSPluginOptions) { |
453 | Object.assign(plugins, { | 453 | Object.assign(plugins, { |
454 | hotkeys: { | 454 | hotkeys: { |
455 | skipInitialFocus: true, | ||
456 | enableInactiveFocus: false, | ||
457 | captureDocumentHotkeys: true, | ||
458 | documentHotkeysFocusElementFilter: (e: HTMLElement) => { | ||
459 | return e.id === 'content' || e.tagName.toLowerCase() === 'body' | ||
460 | }, | ||
461 | |||
455 | enableVolumeScroll: false, | 462 | enableVolumeScroll: false, |
456 | enableModifiersForNumbers: false, | 463 | enableModifiersForNumbers: false, |
457 | 464 | ||