mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
Add hotkey to enable captions with "c" (#627)
Co-authored-by: metzgegu <guillaume.metzger@wizbii.com>
This commit is contained in:
parent
78f0372707
commit
f1f45551f4
1 changed files with 5 additions and 1 deletions
|
@ -81,7 +81,7 @@ export default {
|
||||||
.then(hotkeys => {
|
.then(hotkeys => {
|
||||||
this.hotkeys = hotkeys;
|
this.hotkeys = hotkeys;
|
||||||
var self = this;
|
var self = this;
|
||||||
hotkeys("f,m,j,k,l,space,up,down,left,right", function(e, handler) {
|
hotkeys("f,m,j,k,l,c,space,up,down,left,right", function(e, handler) {
|
||||||
const videoEl = self.$refs.videoEl;
|
const videoEl = self.$refs.videoEl;
|
||||||
switch (handler.key) {
|
switch (handler.key) {
|
||||||
case "f":
|
case "f":
|
||||||
|
@ -100,6 +100,10 @@ export default {
|
||||||
videoEl.currentTime = videoEl.currentTime + 15;
|
videoEl.currentTime = videoEl.currentTime + 15;
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
break;
|
break;
|
||||||
|
case "c":
|
||||||
|
self.$player.setTextTrackVisibility(!self.$player.isTextTrackVisible());
|
||||||
|
e.preventDefault();
|
||||||
|
break;
|
||||||
case "k":
|
case "k":
|
||||||
case "space":
|
case "space":
|
||||||
if (videoEl.paused) videoEl.play();
|
if (videoEl.paused) videoEl.play();
|
||||||
|
|
Loading…
Reference in a new issue