mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
Merge pull request #2670 from viggy96/chapter-buttons
Add next/previous chapter buttons to video player
This commit is contained in:
commit
6a2c83c8d6
@ -35,6 +35,10 @@
|
||||
<span class="xlargePaperIconButton material-icons skip_previous"></span>
|
||||
</button>
|
||||
|
||||
<button is="paper-icon-button-light" class="btnPreviousChapter autoSize hide" title="${PreviousChapter}">
|
||||
<span class="xlargePaperIconButton material-icons undo"></span>
|
||||
</button>
|
||||
|
||||
<button is="paper-icon-button-light" class="btnRewind" title="${Rewind} (j)">
|
||||
<span class="xlargePaperIconButton material-icons fast_rewind"></span>
|
||||
</button>
|
||||
@ -47,6 +51,10 @@
|
||||
<span class="xlargePaperIconButton material-icons fast_forward"></span>
|
||||
</button>
|
||||
|
||||
<button is="paper-icon-button-light" class="btnNextChapter autoSize hide" title="${NextChapter}">
|
||||
<span class="xlargePaperIconButton material-icons redo"></span>
|
||||
</button>
|
||||
|
||||
<button is="paper-icon-button-light" class="btnNextTrack autoSize hide" title="${NextTrack}">
|
||||
<span class="xlargePaperIconButton material-icons skip_next"></span>
|
||||
</button>
|
||||
|
@ -181,6 +181,14 @@ import { appRouter } from '../../../components/appRouter';
|
||||
} else {
|
||||
view.querySelector('.btnAudio').classList.add('hide');
|
||||
}
|
||||
|
||||
if (currentItem.Chapters.length > 1) {
|
||||
view.querySelector('.btnPreviousChapter').classList.remove('hide');
|
||||
view.querySelector('.btnNextChapter').classList.remove('hide');
|
||||
} else {
|
||||
view.querySelector('.btnPreviousChapter').classList.add('hide');
|
||||
view.querySelector('.btnNextChapter').classList.add('hide');
|
||||
}
|
||||
}
|
||||
|
||||
function setTitle(item, parentName) {
|
||||
@ -1513,9 +1521,15 @@ import { appRouter } from '../../../components/appRouter';
|
||||
view.querySelector('.btnPreviousTrack').addEventListener('click', function () {
|
||||
playbackManager.previousTrack(currentPlayer);
|
||||
});
|
||||
view.querySelector('.btnPreviousChapter').addEventListener('click', function () {
|
||||
playbackManager.previousChapter(currentPlayer);
|
||||
});
|
||||
view.querySelector('.btnPause').addEventListener('click', function () {
|
||||
playbackManager.playPause(currentPlayer);
|
||||
});
|
||||
view.querySelector('.btnNextChapter').addEventListener('click', function () {
|
||||
playbackManager.nextChapter(currentPlayer);
|
||||
});
|
||||
view.querySelector('.btnNextTrack').addEventListener('click', function () {
|
||||
playbackManager.nextTrack(currentPlayer);
|
||||
});
|
||||
|
@ -1111,6 +1111,7 @@
|
||||
"NewEpisodesOnly": "New episodes only",
|
||||
"News": "News",
|
||||
"Next": "Next",
|
||||
"NextChapter": "Next chapter",
|
||||
"NextTrack": "Skip to next",
|
||||
"NextUp": "Next Up",
|
||||
"No": "No",
|
||||
@ -1278,6 +1279,7 @@
|
||||
"Premieres": "Premieres",
|
||||
"Preview": "Preview",
|
||||
"Previous": "Previous",
|
||||
"PreviousChapter": "Previous chapter",
|
||||
"PreviousTrack": "Skip to previous",
|
||||
"Primary": "Primary",
|
||||
"Producer": "Producer",
|
||||
|
Loading…
Reference in New Issue
Block a user