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>
|
<span class="xlargePaperIconButton material-icons skip_previous"></span>
|
||||||
</button>
|
</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)">
|
<button is="paper-icon-button-light" class="btnRewind" title="${Rewind} (j)">
|
||||||
<span class="xlargePaperIconButton material-icons fast_rewind"></span>
|
<span class="xlargePaperIconButton material-icons fast_rewind"></span>
|
||||||
</button>
|
</button>
|
||||||
@ -47,6 +51,10 @@
|
|||||||
<span class="xlargePaperIconButton material-icons fast_forward"></span>
|
<span class="xlargePaperIconButton material-icons fast_forward"></span>
|
||||||
</button>
|
</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}">
|
<button is="paper-icon-button-light" class="btnNextTrack autoSize hide" title="${NextTrack}">
|
||||||
<span class="xlargePaperIconButton material-icons skip_next"></span>
|
<span class="xlargePaperIconButton material-icons skip_next"></span>
|
||||||
</button>
|
</button>
|
||||||
|
@ -181,6 +181,14 @@ import { appRouter } from '../../../components/appRouter';
|
|||||||
} else {
|
} else {
|
||||||
view.querySelector('.btnAudio').classList.add('hide');
|
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) {
|
function setTitle(item, parentName) {
|
||||||
@ -1513,9 +1521,15 @@ import { appRouter } from '../../../components/appRouter';
|
|||||||
view.querySelector('.btnPreviousTrack').addEventListener('click', function () {
|
view.querySelector('.btnPreviousTrack').addEventListener('click', function () {
|
||||||
playbackManager.previousTrack(currentPlayer);
|
playbackManager.previousTrack(currentPlayer);
|
||||||
});
|
});
|
||||||
|
view.querySelector('.btnPreviousChapter').addEventListener('click', function () {
|
||||||
|
playbackManager.previousChapter(currentPlayer);
|
||||||
|
});
|
||||||
view.querySelector('.btnPause').addEventListener('click', function () {
|
view.querySelector('.btnPause').addEventListener('click', function () {
|
||||||
playbackManager.playPause(currentPlayer);
|
playbackManager.playPause(currentPlayer);
|
||||||
});
|
});
|
||||||
|
view.querySelector('.btnNextChapter').addEventListener('click', function () {
|
||||||
|
playbackManager.nextChapter(currentPlayer);
|
||||||
|
});
|
||||||
view.querySelector('.btnNextTrack').addEventListener('click', function () {
|
view.querySelector('.btnNextTrack').addEventListener('click', function () {
|
||||||
playbackManager.nextTrack(currentPlayer);
|
playbackManager.nextTrack(currentPlayer);
|
||||||
});
|
});
|
||||||
|
@ -1111,6 +1111,7 @@
|
|||||||
"NewEpisodesOnly": "New episodes only",
|
"NewEpisodesOnly": "New episodes only",
|
||||||
"News": "News",
|
"News": "News",
|
||||||
"Next": "Next",
|
"Next": "Next",
|
||||||
|
"NextChapter": "Next chapter",
|
||||||
"NextTrack": "Skip to next",
|
"NextTrack": "Skip to next",
|
||||||
"NextUp": "Next Up",
|
"NextUp": "Next Up",
|
||||||
"No": "No",
|
"No": "No",
|
||||||
@ -1278,6 +1279,7 @@
|
|||||||
"Premieres": "Premieres",
|
"Premieres": "Premieres",
|
||||||
"Preview": "Preview",
|
"Preview": "Preview",
|
||||||
"Previous": "Previous",
|
"Previous": "Previous",
|
||||||
|
"PreviousChapter": "Previous chapter",
|
||||||
"PreviousTrack": "Skip to previous",
|
"PreviousTrack": "Skip to previous",
|
||||||
"Primary": "Primary",
|
"Primary": "Primary",
|
||||||
"Producer": "Producer",
|
"Producer": "Producer",
|
||||||
|
Loading…
Reference in New Issue
Block a user