1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Update function and class names as suggested.

More generic name without the inclusion of "chapters" allows potential
reuse in the future.
This commit is contained in:
Viperinius 2022-07-05 17:11:58 +02:00
parent ba2c365ac9
commit 04072523ca
4 changed files with 63 additions and 55 deletions

View file

@ -21,7 +21,7 @@
<div class="flex flex-direction-row align-items-center">
<div class="osdTextContainer startTimeText osdPositionText" style="margin: 0 .25em 0 0;"></div>
<div class="sliderContainer flex-grow" style="margin: .5em 0 .25em;">
<div class="sliderChapterMarkContainer hide"></div>
<div class="sliderMarkerContainer hide"></div>
<input type="range" step=".01" min="0" max="100" value="0" is="emby-slider" class="osdPositionSlider" data-slider-keep-progress="true" />
</div>
<div class="osdTextContainer endTimeText osdDurationText" style="margin: 0 0 0 .25em;"></div>

View file

@ -1574,13 +1574,14 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
return '<h1 class="sliderBubbleText">' + datetime.getDisplayRunningTime(ticks) + '</h1>';
};
nowPlayingPositionSlider.getChapterNamesAndFractions = function () {
nowPlayingPositionSlider.getMarkerInfo = function () {
showOsd();
const markers = [];
const item = currentItem;
// use markers based on chapters
if (item && item.Chapters && item.Chapters.length) {
const runtimeDuration = item.RunTimeTicks;
@ -1590,6 +1591,7 @@ import { setBackdropTransparency, TRANSPARENCY_LEVEL } from '../../../components
const fraction = currentChapter.StartPositionTicks / runtimeDuration;
markers.push({
className: 'chapterMarker',
name: currentChapter.Name,
progress: fraction
});