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

limit number of people in dlna responses

This commit is contained in:
Luke Pulverenti 2016-10-18 14:23:41 -04:00
parent 11615f4399
commit 46d25396c6
8 changed files with 191 additions and 53 deletions

View file

@ -14,12 +14,12 @@
},
"devDependencies": {},
"ignore": [],
"version": "1.4.320",
"_release": "1.4.320",
"version": "1.4.321",
"_release": "1.4.321",
"_resolution": {
"type": "version",
"tag": "1.4.320",
"commit": "5b3dc54cf24d4f615a59e5954726231e446cfced"
"tag": "1.4.321",
"commit": "fb270e69c8391f62e762ee03d77a7b8a495c5a6f"
},
"_source": "https://github.com/MediaBrowser/emby-webcomponents.git",
"_target": "^1.2.1",

View file

@ -51,15 +51,21 @@
return;
}
setTimeout(function () {
var onAnimationComplete = function () {
dom.removeEventListener(backdropImage, 'animationend', onAnimationComplete, {
once: true
});
if (backdropImage === currentAnimatingElement) {
currentAnimatingElement = null;
}
if (existingBackdropImage && existingBackdropImage.parentNode) {
existingBackdropImage.parentNode.removeChild(existingBackdropImage);
}
}, 800);
};
dom.addEventListener(backdropImage, 'animationend', onAnimationComplete, {
once: true
});
internalBackdrop(true);
};

View file

@ -3,6 +3,24 @@
var globalOnOpenCallback;
function enableAnimation() {
if (browser.animate) {
return true;
}
if (browser.edge) {
return true;
}
// An indication of an older browser
if (browser.noFlex) {
return false;
}
return true;
}
function removeCenterFocus(dlg) {
if (layoutManager.tv) {
@ -136,10 +154,9 @@
backdropParent.parentNode.insertBefore(backdrop, backdropParent);
dlg.backdrop = backdrop;
// Doing this immediately causes the opacity to jump immediately without animating
setTimeout(function () {
backdrop.classList.add('dialogBackdropOpened');
}, 0);
// trigger reflow or the backdrop will not animate
void backdrop.offsetWidth;
backdrop.classList.add('dialogBackdropOpened');
dom.addEventListener((dlg.dialogContainer || backdrop), 'click', function (e) {
if (e.target === dlg.dialogContainer) {
@ -226,27 +243,59 @@
}
};
setTimeout(onAnimationFinish, dlg.animationConfig.entry.timing.duration);
if (enableAnimation()) {
var onFinish = function () {
dom.removeEventListener(dlg, 'animationend', onFinish, {
once: true
});
onAnimationFinish();
};
dom.addEventListener(dlg, 'animationend', onFinish, {
once: true
});
return;
}
onAnimationFinish();
}
function animateDialogClose(dlg, onAnimationFinish) {
switch (dlg.animationConfig.exit.name) {
if (enableAnimation()) {
case 'fadeout':
dlg.style.animation = 'fadeout ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both';
break;
case 'scaledown':
dlg.style.animation = 'scaledown ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both';
break;
case 'slidedown':
dlg.style.animation = 'slidedown ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both';
break;
default:
break;
var animated = true;
switch (dlg.animationConfig.exit.name) {
case 'fadeout':
dlg.style.animation = 'fadeout ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both';
break;
case 'scaledown':
dlg.style.animation = 'scaledown ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both';
break;
case 'slidedown':
dlg.style.animation = 'slidedown ' + dlg.animationConfig.exit.timing.duration + 'ms ease-out normal both';
break;
default:
animated = false;
break;
}
var onFinish = function () {
dom.removeEventListener(dlg, 'animationend', onFinish, {
once: true
});
onAnimationFinish();
};
dom.addEventListener(dlg, 'animationend', onFinish, {
once: true
});
if (animated) {
return;
}
}
setTimeout(onAnimationFinish, dlg.animationConfig.exit.timing.duration);
onAnimationFinish();
}
function shouldLockDocumentScroll(options) {
@ -270,15 +319,26 @@
var backdrop = dlg.backdrop;
if (backdrop) {
dlg.backdrop = null;
if (!backdrop) {
return;
}
dlg.backdrop = null;
var onAnimationFinish = function () {
backdrop.parentNode.removeChild(backdrop);
};
if (enableAnimation()) {
backdrop.classList.remove('dialogBackdropOpened');
setTimeout(function () {
backdrop.parentNode.removeChild(backdrop);
}, 300);
// this is not firing animatonend
setTimeout(onAnimationFinish, 300);
return;
}
onAnimationFinish();
}
function centerFocus(elem, horiz, on) {
@ -375,19 +435,21 @@
dlg.classList.add('dialog-' + options.size);
}
switch (dlg.animationConfig.entry.name) {
if (enableAnimation()) {
switch (dlg.animationConfig.entry.name) {
case 'fadein':
dlg.style.animation = 'fadein ' + entryAnimationDuration + 'ms ease-out normal';
break;
case 'scaleup':
dlg.style.animation = 'scaleup ' + entryAnimationDuration + 'ms ease-out normal both';
break;
case 'slideup':
dlg.style.animation = 'slideup ' + entryAnimationDuration + 'ms ease-out normal';
break;
default:
break;
case 'fadein':
dlg.style.animation = 'fadein ' + entryAnimationDuration + 'ms ease-out normal';
break;
case 'scaleup':
dlg.style.animation = 'scaleup ' + entryAnimationDuration + 'ms ease-out normal both';
break;
case 'slideup':
dlg.style.animation = 'slideup ' + entryAnimationDuration + 'ms ease-out normal';
break;
default:
break;
}
}
return dlg;

View file

@ -151,7 +151,7 @@
console.log('validateFeature: ' + feature);
return iapManager.isUnlockedByDefault(feature).then(function () {
return iapManager.isUnlockedByDefault(feature, options).then(function () {
return showPeriodicMessageIfNeeded(feature);

View file

@ -1,4 +1,4 @@
define(['browser', 'css!./viewcontainer-lite'], function (browser) {
define(['browser', 'dom', 'css!./viewcontainer-lite'], function (browser, dom) {
'use strict';
var mainAnimatedPages = document.querySelector('.mainAnimatedPages');
@ -140,7 +140,16 @@ define(['browser', 'css!./viewcontainer-lite'], function (browser) {
currentAnimations = animations;
setTimeout(resolve, duration);
var onAnimationComplete = function () {
dom.removeEventListener(newAnimatedPage, 'animationend', onAnimationComplete, {
once: true
});
resolve();
};
dom.addEventListener(newAnimatedPage, 'animationend', onAnimationComplete, {
once: true
});
});
}
@ -161,7 +170,16 @@ define(['browser', 'css!./viewcontainer-lite'], function (browser) {
currentAnimations = animations;
setTimeout(resolve, duration);
var onAnimationComplete = function () {
dom.removeEventListener(newAnimatedPage, 'animationend', onAnimationComplete, {
once: true
});
resolve();
};
dom.addEventListener(newAnimatedPage, 'animationend', onAnimationComplete, {
once: true
});
});
}