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

update audio animation

This commit is contained in:
Luke Pulverenti 2015-11-30 01:19:31 -05:00
parent 7dd1eedf26
commit 0a96f8e0bf
6 changed files with 22 additions and 13 deletions

View file

@ -169,6 +169,7 @@
position: absolute;
left: 0;
right: 0;
top: 0;
}
.nowPlayingBarPositionContainer {

View file

@ -99,7 +99,7 @@
document.body.appendChild(dlg);
// The animations flicker in IE and Firefox (probably wherever the polyfill is used)
if (browserInfo.chrome) {
if (browserInfo.animate) {
dlg.animationConfig = {
// scale up
'entry': {

View file

@ -2794,7 +2794,7 @@
dlg.exitAnimation = 'fade-out-animation';
// The animations flicker in IE and Firefox (probably wherever the polyfill is used)
if (browserInfo.chrome) {
if (browserInfo.animate) {
dlg.animationConfig = {
// scale up
'entry': {

View file

@ -70,7 +70,6 @@
return html;
}
var isSlidUp;
var height;
function getHeight(elem) {
@ -85,35 +84,42 @@
function slideDown(elem) {
if (!isSlidUp) {
if (elem.classList.contains('hide')) {
return;
}
isSlidUp = false;
var onfinish = function() {
elem.classList.add('hide');
};
if (!browserInfo.animate) {
onfinish();
return;
}
requestAnimationFrame(function () {
var keyframes = [
{ height: getHeight(elem), offset: 0 },
{ height: '0', display: 'none', offset: 1 }];
var timing = { duration: 200, iterations: 1, fill: 'both', easing: 'ease-out' };
elem.animate(keyframes, timing).onfinish = function () {
elem.classList.add('hide');
};
elem.animate(keyframes, timing).onfinish = onfinish;
});
}
function slideUp(elem) {
if (isSlidUp) {
if (!elem.classList.contains('hide')) {
return;
}
isSlidUp = true;
elem.classList.remove('hide');
if (!browserInfo.animate) {
return;
}
requestAnimationFrame(function () {
elem.classList.remove('hide');
var keyframes = [
{ height: '0', offset: 0 },
{ height: getHeight(elem), offset: 1 }];

View file

@ -2387,6 +2387,8 @@ var AppInfo = {};
browser.mobile = true;
}
browser.animate = document.documentElement.animate != null;
window.browserInfo = browser;
}

View file

@ -158,7 +158,7 @@
elem.setAttribute("src", url);
}
if (browserInfo.chrome && !browserInfo.mobile) {
if (browserInfo.animate && !browserInfo.mobile) {
if (!elem.classList.contains('noFade')) {
fadeIn(elem, 1);
}