Skip to content

Commit

Permalink
feat(UI): Add more keyboard shortcuts (#5942)
Browse files Browse the repository at this point in the history
Closes #3223
  • Loading branch information
avelad committed Nov 29, 2023
1 parent 0deb25b commit 2fcc2f8
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ui/controls.js
Original file line number Diff line number Diff line change
Expand Up @@ -1443,6 +1443,23 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
this.seek_(this.player_.seekRange().end);
}
break;
case 'f':
if (this.isFullScreenSupported()) {
this.toggleFullScreen();
}
break;
case 'm':
if (this.ad_ && this.ad_.isLinear()) {
this.ad_.setMuted(!this.ad_.isMuted());
} else {
this.localVideo_.muted = !this.localVideo_.muted;
}
break;
case 'p':
if (this.isPiPAllowed()) {
this.togglePiP();
}
break;
// Pause or play by pressing space on the seek bar.
case ' ':
if (isSeekBar) {
Expand Down

0 comments on commit 2fcc2f8

Please sign in to comment.