mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Backport pull request #5719 from jellyfin-web/release-10.9.z
Fix Trickplay thumbnail in older web engines
Original-merge: 9501c5097b
Merged-by: thornbill <thornbill@users.noreply.github.com>
Backported-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
parent
a3c0fb05c3
commit
fa9621e31a
1 changed files with 10 additions and 20 deletions
|
@ -1382,7 +1382,7 @@ export default function (view) {
|
||||||
|
|
||||||
// Create bubble elements if they don't already exist
|
// Create bubble elements if they don't already exist
|
||||||
if (chapterThumbContainer) {
|
if (chapterThumbContainer) {
|
||||||
chapterThumb = chapterThumbContainer.querySelector('.chapterThumb');
|
chapterThumb = chapterThumbContainer.querySelector('.chapterThumbWrapper');
|
||||||
chapterThumbText = chapterThumbContainer.querySelector('.chapterThumbText');
|
chapterThumbText = chapterThumbContainer.querySelector('.chapterThumbText');
|
||||||
} else {
|
} else {
|
||||||
doFullUpdate = true;
|
doFullUpdate = true;
|
||||||
|
@ -1391,22 +1391,12 @@ export default function (view) {
|
||||||
chapterThumbContainer.classList.add('chapterThumbContainer');
|
chapterThumbContainer.classList.add('chapterThumbContainer');
|
||||||
chapterThumbContainer.style.overflow = 'hidden';
|
chapterThumbContainer.style.overflow = 'hidden';
|
||||||
|
|
||||||
const chapterThumbWrapper = document.createElement('div');
|
chapterThumb = document.createElement('div');
|
||||||
chapterThumbWrapper.classList.add('chapterThumbWrapper');
|
chapterThumb.classList.add('chapterThumbWrapper');
|
||||||
chapterThumbWrapper.style.overflow = 'hidden';
|
chapterThumb.style.overflow = 'hidden';
|
||||||
chapterThumbWrapper.style.position = 'relative';
|
chapterThumb.style.width = trickplayInfo.Width + 'px';
|
||||||
chapterThumbWrapper.style.width = trickplayInfo.Width + 'px';
|
chapterThumb.style.height = trickplayInfo.Height + 'px';
|
||||||
chapterThumbWrapper.style.height = trickplayInfo.Height + 'px';
|
chapterThumbContainer.appendChild(chapterThumb);
|
||||||
chapterThumbContainer.appendChild(chapterThumbWrapper);
|
|
||||||
|
|
||||||
chapterThumb = document.createElement('img');
|
|
||||||
chapterThumb.classList.add('chapterThumb');
|
|
||||||
chapterThumb.style.position = 'absolute';
|
|
||||||
chapterThumb.style.width = 'unset';
|
|
||||||
chapterThumb.style.minWidth = 'unset';
|
|
||||||
chapterThumb.style.height = 'unset';
|
|
||||||
chapterThumb.style.minHeight = 'unset';
|
|
||||||
chapterThumbWrapper.appendChild(chapterThumb);
|
|
||||||
|
|
||||||
const chapterThumbTextContainer = document.createElement('div');
|
const chapterThumbTextContainer = document.createElement('div');
|
||||||
chapterThumbTextContainer.classList.add('chapterThumbTextContainer');
|
chapterThumbTextContainer.classList.add('chapterThumbTextContainer');
|
||||||
|
@ -1435,9 +1425,9 @@ export default function (view) {
|
||||||
MediaSourceId: mediaSourceId
|
MediaSourceId: mediaSourceId
|
||||||
});
|
});
|
||||||
|
|
||||||
if (chapterThumb.src != imgSrc) chapterThumb.src = imgSrc;
|
chapterThumb.style.backgroundImage = `url('${imgSrc}')`;
|
||||||
chapterThumb.style.left = offsetX + 'px';
|
chapterThumb.style.backgroundPositionX = offsetX + 'px';
|
||||||
chapterThumb.style.top = offsetY + 'px';
|
chapterThumb.style.backgroundPositionY = offsetY + 'px';
|
||||||
|
|
||||||
chapterThumbText.textContent = datetime.getDisplayRunningTime(positionTicks);
|
chapterThumbText.textContent = datetime.getDisplayRunningTime(positionTicks);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue