diff options
| author | leonklingele <5585491+leonklingele@users.noreply.github.com> | 2019-08-16 23:01:14 +0200 |
|---|---|---|
| committer | Omar Roth <omarroth@protonmail.com> | 2019-08-16 16:01:14 -0500 |
| commit | e6b4e1268945777c5d07dfca4362a1af23f6d970 (patch) | |
| tree | d2ec039c99ef9ed956e486fc8b7e29cab428e998 /src | |
| parent | 7eaac995bd549b03f53930fbbfc5d77e2b051362 (diff) | |
| download | invidious-e6b4e1268945777c5d07dfca4362a1af23f6d970.tar.gz invidious-e6b4e1268945777c5d07dfca4362a1af23f6d970.tar.bz2 invidious-e6b4e1268945777c5d07dfca4362a1af23f6d970.zip | |
js: add support for keydown events (#678)
* js: add support for keydown events
This will modify the player behavior even if the player element is unfocused.
Based on the YouTube key bindings, allow to
- toggle playback with space and 'k' key
- increase and decrease player volume with up / down arrow key
- mute and unmute player with 'm' key
- jump forwards and backwards by 5 seconds with right / left arrow key
- jump forwards and backwards by 10 seconds with 'l' / 'j' key
- set video progress with number keys 0–9
- toggle captions with 'c' key
- toggle fullscreen mode with 'f' key
- play next video with 'N' key
- increase and decrease playback speed with '>' / '<' key
* js: remove unused dependency 'videojs.hotkeys.min.js'
Support for controlling the player volume by scrolling over it is
still retained by copying over the relevant code part from the
aforementioned library.
Diffstat (limited to 'src')
| -rw-r--r-- | src/invidious/views/components/player_sources.ecr | 1 | ||||
| -rw-r--r-- | src/invidious/views/licenses.ecr | 14 |
2 files changed, 0 insertions, 15 deletions
diff --git a/src/invidious/views/components/player_sources.ecr b/src/invidious/views/components/player_sources.ecr index 003d2c3a..d950e0da 100644 --- a/src/invidious/views/components/player_sources.ecr +++ b/src/invidious/views/components/player_sources.ecr @@ -6,7 +6,6 @@ <script src="/js/video.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-contrib-quality-levels.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-http-source-selector.min.js?v=<%= ASSET_COMMIT %>"></script> -<script src="/js/videojs.hotkeys.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-markers.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-share.min.js?v=<%= ASSET_COMMIT %>"></script> <script src="/js/videojs-vtt-thumbnails.min.js?v=<%= ASSET_COMMIT %>"></script> diff --git a/src/invidious/views/licenses.ecr b/src/invidious/views/licenses.ecr index 7cffb7fc..aae8bb19 100644 --- a/src/invidious/views/licenses.ecr +++ b/src/invidious/views/licenses.ecr @@ -137,20 +137,6 @@ <tr> <td> - <a href="/js/videojs.hotkeys.min.js?v=<%= ASSET_COMMIT %>">videojs.hotkeys.min.js</a> - </td> - - <td> - <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache-2.0-only</a> - </td> - - <td> - <a href="https://github.com/ctd1500/videojs-hotkeys"><%= translate(locale, "source") %></a> - </td> - </tr> - - <tr> - <td> <a href="/js/videojs-http-source-selector.min.js?v=<%= ASSET_COMMIT %>">videojs-http-source-selector.min.js</a> </td> |
