mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-19 11:58:20 -07:00
Hide scrollbar only for fullscreen
This commit is contained in:
parent
78a3c971ff
commit
da50605b4e
@ -15,6 +15,10 @@ function zoomIn(elem, iterations) {
|
|||||||
return elem.animate(keyframes, timing);
|
return elem.animate(keyframes, timing);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function hideScroll() {
|
||||||
|
document.body.classList.add('hide-scroll');
|
||||||
|
}
|
||||||
|
|
||||||
function createMediaElement(instance, options) {
|
function createMediaElement(instance, options) {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
const dlg = document.querySelector('.youtubePlayerContainer');
|
const dlg = document.querySelector('.youtubePlayerContainer');
|
||||||
@ -37,8 +41,9 @@ function createMediaElement(instance, options) {
|
|||||||
document.body.insertBefore(dlg, document.body.firstChild);
|
document.body.insertBefore(dlg, document.body.firstChild);
|
||||||
instance.videoDialog = dlg;
|
instance.videoDialog = dlg;
|
||||||
|
|
||||||
// At this point, we must hide the scrollbar placeholder, so it's not being displayed while the item is being loaded
|
if (options.fullscreen) {
|
||||||
document.body.classList.add('hide-scroll');
|
hideScroll();
|
||||||
|
}
|
||||||
|
|
||||||
if (options.fullscreen && dlg.animate && !browser.slow) {
|
if (options.fullscreen && dlg.animate && !browser.slow) {
|
||||||
zoomIn(dlg, 1).onfinish = function () {
|
zoomIn(dlg, 1).onfinish = function () {
|
||||||
@ -49,6 +54,10 @@ function createMediaElement(instance, options) {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
if (options.fullscreen) {
|
||||||
|
hideScroll();
|
||||||
|
}
|
||||||
|
|
||||||
resolve(dlg.querySelector('#player'));
|
resolve(dlg.querySelector('#player'));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user