Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display previous/next keyboard shortcuts #5759

Merged
merged 4 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions src/controllers/playback/video/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,39 @@ <h3 class="osdTitle"></h3>
<span class="xlargePaperIconButton material-icons fiber_manual_record" aria-hidden="true"></span>
</button>

<button is="paper-icon-button-light" class="btnPreviousTrack autoSize hide" title="${PreviousTrack}">
<button is="paper-icon-button-light" class="btnPreviousTrack autoSize hide" title="${PreviousTrack} (Shift+P)" aria-label="${PreviousTrack}">
<span class="xlargePaperIconButton material-icons skip_previous" aria-hidden="true"></span>
</button>

<button is="paper-icon-button-light" class="btnPreviousChapter autoSize hide" title="${PreviousChapter}">
<button is="paper-icon-button-light" class="btnPreviousChapter autoSize hide" title="${PreviousChapter} (PageDown)" aria-label="${PreviousChapter}">
<span class="xlargePaperIconButton material-icons undo" aria-hidden="true"></span>
</button>

<button is="paper-icon-button-light" class="btnRewind" title="${Rewind} (j)" aria-label="${Rewind}">
<button is="paper-icon-button-light" class="btnRewind" title="${Rewind} (J)" aria-label="${Rewind}">
<span class="xlargePaperIconButton material-icons fast_rewind" aria-hidden="true"></span>
</button>

<button is="paper-icon-button-light" class="btnPause autoSize">
<span class="xlargePaperIconButton material-icons pause" aria-hidden="true"></span>
</button>

<button is="paper-icon-button-light" class="btnFastForward" title="${FastForward} (l)" aria-label="${FastForward}">
<button is="paper-icon-button-light" class="btnFastForward" title="${FastForward} (L)" aria-label="${FastForward}">
<span class="xlargePaperIconButton material-icons fast_forward" aria-hidden="true"></span>
</button>

<button is="paper-icon-button-light" class="btnNextChapter autoSize hide" title="${NextChapter}">
<button is="paper-icon-button-light" class="btnNextChapter autoSize hide" title="${NextChapter} (PageUp)" aria-label="${NextChapter}">
<span class="xlargePaperIconButton material-icons redo" aria-hidden="true"></span>
</button>

<button is="paper-icon-button-light" class="btnNextTrack autoSize hide" title="${NextTrack}">
<button is="paper-icon-button-light" class="btnNextTrack autoSize hide" title="${NextTrack} (Shift+N)" aria-label="${NextTrack}">
<span class="xlargePaperIconButton material-icons skip_next" aria-hidden="true"></span>
</button>
</div>

<div class="osdTimeText">
<span class="endsAtText"></span>
</div>

<div class="osdRatingsText">
</div>

Expand All @@ -80,7 +80,7 @@ <h3 class="osdTitle"></h3>
<span class="xlargePaperIconButton material-icons audiotrack" aria-hidden="true"></span>
</button>
<div class="volumeButtons hide-mouse-idle-tv">
<button is="paper-icon-button-light" class="buttonMute autoSize" title="${Mute} (m)" aria-label="${Mute}">
<button is="paper-icon-button-light" class="buttonMute autoSize" title="${Mute} (M)" aria-label="${Mute}">
<span class="xlargePaperIconButton material-icons volume_up" aria-hidden="true"></span>
</button>
<div class="sliderContainer osdVolumeSliderContainer">
Expand All @@ -96,7 +96,7 @@ <h3 class="osdTitle"></h3>
<button is="paper-icon-button-light" class="btnPip hide autoSize" title="${PictureInPicture}">
<span class="xlargePaperIconButton material-icons picture_in_picture_alt" aria-hidden="true"></span>
</button>
<button is="paper-icon-button-light" class="btnFullscreen hide autoSize" title="${Fullscreen} (f)" aria-label="${Fullscreen}">
<button is="paper-icon-button-light" class="btnFullscreen hide autoSize" title="${Fullscreen} (F)" aria-label="${Fullscreen}">
<span class="xlargePaperIconButton material-icons fullscreen" aria-hidden="true"></span>
</button>
</div>
Expand Down
11 changes: 8 additions & 3 deletions src/controllers/playback/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -496,10 +496,10 @@ export default function (view) {
icon.classList.remove('fullscreen_exit', 'fullscreen');

if (playbackManager.isFullscreen(currentPlayer)) {
button.setAttribute('title', globalize.translate('ExitFullscreen') + ' (f)');
button.setAttribute('title', globalize.translate('ExitFullscreen') + ' (F)');
icon.classList.add('fullscreen_exit');
} else {
button.setAttribute('title', globalize.translate('Fullscreen') + ' (f)');
button.setAttribute('title', globalize.translate('Fullscreen') + ' (F)');
icon.classList.add('fullscreen');
}
}
Expand Down Expand Up @@ -721,7 +721,7 @@ export default function (view) {
}

btnPlayPauseIcon.classList.add(icon);
dom.setElementTitle(btnPlayPause, title + ' (k)', title);
dom.setElementTitle(btnPlayPause, title + ' (K)', title);
}

function updatePlayerStateInternal(event, player, state) {
Expand Down Expand Up @@ -1245,6 +1245,7 @@ export default function (view) {
}
break;
case 'k':
case 'K':
playbackManager.playPause(currentPlayer);
showOsd(btnPlayPause);
break;
Expand All @@ -1257,23 +1258,27 @@ export default function (view) {
playbackManager.volumeDown(currentPlayer);
break;
case 'l':
case 'L':
case 'ArrowRight':
case 'Right':
playbackManager.fastForward(currentPlayer);
showOsd(btnFastForward);
break;
case 'j':
case 'J':
case 'ArrowLeft':
case 'Left':
playbackManager.rewind(currentPlayer);
showOsd(btnRewind);
break;
case 'f':
case 'F':
if (!e.ctrlKey && !e.metaKey) {
playbackManager.toggleFullscreen(currentPlayer);
}
break;
case 'm':
case 'M':
playbackManager.toggleMute(currentPlayer);
break;
case 'p':
Expand Down
Loading